[SERVER-17729] Cannot start mongod httpinterface: sockets higher than 1023 not supported Created: 24/Mar/15  Updated: 25/Apr/16  Resolved: 26/Mar/15

Status: Closed
Project: Core Server
Component/s: HTTP Console, Networking, WiredTiger
Affects Version/s: 2.6.9, 3.0.1
Fix Version/s: 3.0.2, 3.1.1

Type: Bug Priority: Critical - P2
Reporter: Michael Cahill (Inactive) Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:

Create more than 1023 collections, force a crash of mongod, restart with --httpinterface

Participants:

 Description   
Issue Status as of Apr 02, 2015

ISSUE SUMMARY

If a mongod process opens too many file descriptors early in the initialization process, the process may fail to start if later parts of the initialization process require the server to allocate a socket. For instance, this may arise when the mongod runs with the httpinterface option, and the storage engine needs to open a large number of file descriptors, as happens during recovery following an unclean shutdown.

If you observe the following error, this may indicate that you've encountered this issue.

sockets higher than 1023 not supported

WORKAROUNDS

Disable the httpinterface until mongod can effectively start with a smaller number of file descriptors.

AFFECTED VERSIONS
3.0.0+

FIX VERSION
The fix is included in the 3.0.2 production release.

Original description

As per SERVER-17652, attempting to start mongod --httpinterface may fail if the storage engine opens too many file descriptors. In particular, WiredTiger may trigger this if recovery is required.



 Comments   
Comment by Kaloian Manassiev [ 27/Mar/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-17653 Early allocate port for the HTTP interface

(cherry picked from commit 8136a4d3138ab17188e6eab14c42cf61444f901b)
Branch: v3.0
https://github.com/mongodb/mongo/commit/3830ebe12436c48cbf30176e4714a688b6a758fa

Comment by Kaloian Manassiev [ 26/Mar/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-17653 Early allocate port for the HTTP interface
Branch: master
https://github.com/mongodb/mongo/commit/8136a4d3138ab17188e6eab14c42cf61444f901b

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