[SERVER-8910] Error while starting 2.4.0-rc2 on linux machine Created: 08/Mar/13  Updated: 11/Jul/16  Resolved: 08/Apr/13

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

Type: Bug Priority: Critical - P2
Reporter: Rachit Mittal Assignee: Gregor Macadam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Production


Operating System: ALL
Participants:

 Description   

Fri Mar 8 09:44:54.274 [initandlisten] MongoDB starting : pid=8998 port=27017 dbpath=/logs/test 64-bit host=ip-10-30-140-110
Fri Mar 8 09:44:54.274 [initandlisten] db version v2.4.0-rc2
Fri Mar 8 09:44:54.274 [initandlisten] git version: 1aa18930b39ad01a310794d7207c61da10f2c0ab
Fri Mar 8 09:44:54.274 [initandlisten] build info: Linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49
Fri Mar 8 09:44:54.274 [initandlisten] allocator: tcmalloc
Fri Mar 8 09:44:54.274 [initandlisten] options:

{ dbpath: "/logs/test" }

Fri Mar 8 09:44:54.373 [initandlisten] exception in initAndListen std::exception: locale::facet::_S_create_c_locale name not valid, terminating
Fri Mar 8 09:44:54.373 dbexit:
Fri Mar 8 09:44:54.373 [initandlisten] shutdown: going to close listening sockets...
Fri Mar 8 09:44:54.373 [initandlisten] shutdown: going to flush diaglog...
Fri Mar 8 09:44:54.373 [initandlisten] shutdown: going to close sockets...
Fri Mar 8 09:44:54.373 [initandlisten] shutdown: waiting for fs preallocator...
Fri Mar 8 09:44:54.373 [initandlisten] shutdown: lock for final commit...
Fri Mar 8 09:44:54.374 [initandlisten] shutdown: final commit...
Fri Mar 8 09:44:54.374 [initandlisten] shutdown: closing all files...
Fri Mar 8 09:44:54.374 [initandlisten] closeAllFiles() finished
Fri Mar 8 09:44:54.374 [initandlisten] shutdown: removing fs lock...
Fri Mar 8 09:44:54.374 dbexit: really exiting now



 Comments   
Comment by Tad Marshall [ 12/Apr/13 ]

I hit this on a new build on a Solaris 11 VirtualBox instance created from a "Import Appliance": OracleSolaris11_1-VM.tgz (OracleSolaris11_1.ova). The mongod I was running was built from source, but I don't know much about how the Solaris instance was configured. The "export LC_ALL=C" got me past the error; thanks for the tip!

Comment by Adam Comerford [ 08/Mar/13 ]

In this specific case from the original report, the root user was being used to start mongod (not recommended in general). Since it is somewhat unclear as to how this was being done (sudo, su, actual log in) it is also unclear as to whether this was an issue with locale settings for the root user or some issue with the method used to invoke as root.

If you see issues like this, the export (depending on your environment) of the LC_ALL variable as outlined above will temporarily fix it. If the issues is deeper, and (for example) there is an actual problem with /etc/locale.gen then for a full fix you need to correct the file to contain only valid locale entries, run the locale-gen command and then logout and back in.

Occasionally, this can just be a case of problematic environment variables for a session - so a logout and a re-login can sometimes fix the problems without any other intervention.

Comment by Gregor Macadam [ 08/Mar/13 ]

Re-opening so we can publicly document the solution.

Comment by Gregor Macadam [ 08/Mar/13 ]

Hi
Apologies I should have been clearer - I closed it as a duplicate since you had opened a CS ticket at the same time with the same issue.
Thanks
Gregor

Comment by Rachit Mittal [ 08/Mar/13 ]

Got it started by
export LC_ALL=C
thanks

Comment by Rachit Mittal [ 08/Mar/13 ]

Can you guide me to the duplicate ticket stating the solution

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