[SERVER-20078] Failure to create unix domain socket should not be fatal Created: 21/Aug/15  Updated: 27/Aug/15  Resolved: 27/Aug/15

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: 3.1.7
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Charlie Swanson Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

mongod fails to start if it can't delete the socket file:

[js_test:testshard1] 2015-08-21T14:55:40.097-0400  m30000| 2015-08-21T14:55:40.096-0400 E NETWORK  [initandlisten] Failed to unlink socket file /tmp/mongodb-30000.sock errno:1 Operation not permitted
[js_test:testshard1] 2015-08-21T14:55:40.097-0400  m30000| 2015-08-21T14:55:40.097-0400 I -        [initandlisten] Fatal Assertion 28578



 Comments   
Comment by Andy Schwerin [ 24/Aug/15 ]

Eventually, I'd like to change the default, but since there is a flag to
disable UDS creation, I think this ticket looks like works as designed.

On Mon, Aug 24, 2015, 10:59 AM Scott Hernandez (JIRA) <jira@mongodb.org>

Comment by Scott Hernandez (Inactive) [ 24/Aug/15 ]

Andy, are you just thinking we should change the default to not create one (see option below), and keep the current behavior wrt error handling (= fassert)?

BTW, here is the option to disable the unix domain socket: http://docs.mongodb.org/manual/reference/program/mongos/#cmdoption--nounixsocket

Charlie, if the server can't start with all of the supplied options, like listening on the configured addresses/port then shutting down is the right thing to do. It seems like the worst thing the server can do is startup "successfully" but clients are unable to connect, as the server couldn't actually start listening for connections on all configured addresses/ports.

Comment by Andy Schwerin [ 24/Aug/15 ]

Perhaps we should only create the UDS if the operator requests it at startup, then refuse to start if it cannot be created.

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