Details
-
Task
-
Resolution: Done
-
Major - P3
-
mongodb-2.4
-
None
Description
If you use --bind_ip without including the loopback IP address (127.0.0.1) this also has the side effect of not creating a unix socket. This isn't stated in the current documentation: http://docs.mongodb.org/manual/reference/configuration-options/#bind_ip.
There is currently (as at 2.2.4/2.4.1) an explicit assumption in the code so the socket is only created if listening to the loopback or "any" IP: https://github.com/mongodb/mongo/blob/r2.2.4/src/mongo/util/net/listen.cpp#L91
A workaround is to include the loopback IP in the bind_ip list (which supports multiple values with a comma), eg:
mongod --bind_ip 192.168.1.2,127.0.0.1
|
The docs also (incorrectly) suggest that a unix socket is always created unless --nounixsocket is true:
http://docs.mongodb.org/manual/reference/configuration-options/#nounixsocket