If you use --bind_ip without including the loopback IP address (127.0.0.1) this also has the unexpected side effect of not creating a unix domain socket. Expected behaviour is that a unix socket should still be created unless --nounixsocket was specified.
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
The unix domain socket is required for initial set up of users when a node has been started with authentication enabled and an admin needs to connect to the DB as a "local" user without authentication.
A potential workaround until this is fixed 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
- depends on
-
SERVER-29403 Implement TransportLayerASIO
- Closed
- is depended on by
-
SERVER-9384 Unix domain socket name does not allow for multiple mongods on the same port but different bind_ips
- Closed