-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Networking
-
None
-
Fully Compatible
-
Platforms 2016-08-26, Platforms 2016-09-19, Platforms 2016-10-10
Not sure which component this is but I have a script which starts mongod and then runs a status command against it:
Mon Nov 24 02:25:04 CST 2014 Starting mmapv1-ycsb test about to fork child process, waiting until server is ready for connections. forked process: 26239 child process started successfully, parent exiting 2014-11-24T02:26:50.744-0600 W NETWORK Failed to connect to 127.0.0.1:27077, reason: errno:111 Connection refused 2014-11-24T02:26:50.746-0600 I QUERY Error: couldn't connect to server 127.0.0.1:27077 (127.0.0.1), connection attempt failed at connect (src/mongo/shell/mongo.js:181:14) at (connect):1:21 at src/mongo/shell/mongo.js:181 exception: connect failed
Corresponding lines from the log:
2014-11-24T02:26:50.667-0600 I CONTROL [initandlisten] MongoDB starting : pid=26239 port=27077 dbpath=/disk1/db/mmapv1-ycsb 64-bit host=asya.mongodb.com 2014-11-24T02:26:50.668-0600 I CONTROL [initandlisten] db version v2.8.0-rc2-pre- 2014-11-24T02:26:50.668-0600 I CONTROL [initandlisten] git version: e4329ae5e7bfb56ef9b63a8388285b70b7ec9634 2014-11-24T02:26:50.668-0600 I CONTROL [initandlisten] build info: Linux build11.nj1.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49 2014-11-24T02:26:50.668-0600 I CONTROL [initandlisten] allocator: tcmalloc 2014-11-24T02:26:50.668-0600 I CONTROL [initandlisten] options: { net: { port: 27077 }, processManagement: { fork: true }, storage: { dbPath: "/disk1/db/mmapv1-ycsb", engine: "mmapv1", journal: { enabled: false } }, systemLog: { destination: "file", path: "/home/asya/logs/mmapv1-ycsb.log" } } 2014-11-24T02:26:50.706-0600 I INDEX [initandlisten] allocating new ns file /disk1/db/mmapv1-ycsb/local.ns, filling with zeroes... 2014-11-24T02:26:50.732-0600 I STORAGE [FileAllocator] allocating new datafile /disk1/db/mmapv1-ycsb/local.0, filling with zeroes... 2014-11-24T02:26:50.732-0600 I STORAGE [FileAllocator] creating directory /disk1/db/mmapv1-ycsb/_tmp 2014-11-24T02:26:50.745-0600 I STORAGE [FileAllocator] done allocating datafile /disk1/db/mmapv1-ycsb/local.0, size: 64MB, took 0 secs 2014-11-24T02:26:50.748-0600 I NETWORK [initandlisten] waiting for connections on port 27077 2014-11-24T02:26:51.159-0600 I NETWORK [initandlisten] connection accepted from 127.0.0.1:53032 #1 (1 connection now open)
You can see that it is waiting for connections as of T02:26:50.748 but it passed control back before T02:26:50.744 as by then the shell already tried to connect again to run command.
- is related to
-
SERVER-7306 Mongod as windows service should not claim to be 'started' until it is ready to accept connections
- Closed
- related to
-
SERVER-16581 Init script should return only after mongod port is open
- Closed
-
SERVER-31225 The mongod process forks before listening for connections
- Closed