Info
We used to check for the lock file before opening sockets. This produced a better error message when inadvertently starting two copies of mongod pointing to the same dbpath and using the same ports.
The bind error message isn't as obvious because we don't know what process is sharing the port; with the lock file, at least we know that mongod is conflicting with another mongod.
Top User Comments
xgen-internal-githook commented on Thu, 14 Jan 2016 16:53:45 +0000:
Author:
{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}
Message: SERVER-21197 test fixes for lockFile changes
check correct error message on Windows in lock_file_fail_to_open.js
set dbpath in unittests prior to calling createLockFile
Branch: master
https://github.com/mongodb/mongo/commit/1fd3ccc79b31482afda983c0916f68e6b5adc0be
xgen-internal-githook commented on Wed, 13 Jan 2016 19:57:32 +0000:
Author:
{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}
Message: SERVER-21197 make lock_file_fail_to_open more robust
Branch: master
https://github.com/mongodb/mongo/commit/582d669cebbac1733f04dc7738128ab298c314fb
xgen-internal-githook commented on Wed, 13 Jan 2016 19:15:54 +0000:
Author:
{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}
Message: SERVER-21197 check for existence of lock file prior to opening sockets
Branch: master
https://github.com/mongodb/mongo/commit/c125a557ccc5d452f3b31c3fd025bb07fe355468