[SERVER-9383] Unix domain socket is not created if bind_ip does not include 127.0.0.1 Created: 18/Apr/13  Updated: 06/Dec/17  Resolved: 19/Jun/17

Status: Closed
Project: Core Server
Component/s: Usability
Affects Version/s: 2.2.4, 2.4.1, 2.6.4, 2.7.6
Fix Version/s: 3.5.9

Type: Bug Priority: Major - P3
Reporter: Stennie Steneker (Inactive) Assignee: Jonathan Reams
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-29403 Implement TransportLayerASIO Closed
is depended on by SERVER-9384 Unix domain socket name does not allo... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2017-06-19, Platforms 2017-07-10
Participants:

 Description   

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



 Comments   
Comment by Jonathan Reams [ 19/Jun/17 ]

I believe this is fixed as a part of SERVER-29403. The new TransportLayer creates always creates a UNIX socket unless --nounixsocket is specified.

Generated at Thu Feb 08 03:20:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.