Debian Jessie 上 MongoDB 3.4.1 中的多个 BindIp

hot*_*ips 4 mongodb mongodb-3.4

我刚刚从 MongoDB 3.2 升级到 3.4.1。

/etc/mongod.conf 有多个 BindIP:

bindIp: [127.0.0.1,192.168.20.1]
Run Code Online (Sandbox Code Playgroud)

这不再起作用了。我收到此错误:

Scalar option 'net.bindIp' must be a single value
Run Code Online (Sandbox Code Playgroud)

根据文档,它必须是正确的:https : //docs.mongodb.com/manual/reference/configuration-options/#net.bindIP

任何的想法 ?

小智 7

消除 []。所以解决方案是:bindIp: 127.0.0.1,192.168.20.1记住,该字符串中的任何地方都没有空格字符。