[DOCS-1404] Clarification on --bind_ip interaction with unix socket Created: 17/Apr/13  Updated: 30/Oct/23  Resolved: 23/Apr/13

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: mongodb-2.4
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Stennie Steneker (Inactive) Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 10 years, 44 weeks, 1 day ago

 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


Generated at Thu Feb 08 07:40:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.