4

I am having problems with launching Meteor examples. That is what i get when I type meteor in application folder

    [[[[[ ~/parties ]]]]]

    Unexpected mongo exit code 100. Restarting.
    Unexpected mongo exit code 100. Restarting.
    Unexpected mongo exit code 100. Restarting.
    Can't start mongod

    MongoDB had an unspecified uncaught exception.
    Check to make sure that MongoDB is able to write to its database directory.

I have already tried meteor reset and removing .meteor/local/db/mongo.lock - nothing changes

I tried typing mongod

    mongod --help for help and startup options
    Sun Jun  2 00:00:39.080 [initandlisten] MongoDB starting : pid=1962 port=27017                                                   dbpath=/data/db/ 64-bit host=orion
    Sun Jun  2 00:00:39.081 [initandlisten] db version v2.4.3
    Sun Jun  2 00:00:39.081 [initandlisten] git version: fe1743177a5ea03e91e0052fb5e2cb2945f6d95f
    Sun Jun  2 00:00:39.081 [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
    Sun Jun  2 00:00:39.081 [initandlisten] allocator: tcmalloc
    Sun Jun  2 00:00:39.081 [initandlisten] options: {}
    Sun Jun  2 00:00:39.083 [initandlisten] exception in initAndListen std::exception: locale::facet::_S_create_c_locale name not valid, terminating
    Sun Jun  2 00:00:39.083 dbexit: 
    Sun Jun  2 00:00:39.083 [initandlisten] shutdown: going to close listening sockets...
    Sun Jun  2 00:00:39.083 [initandlisten] shutdown: going to flush diaglog...
    Sun Jun  2 00:00:39.083 [initandlisten] shutdown: going to close sockets...
    Sun Jun  2 00:00:39.083 [initandlisten] shutdown: waiting for fs preallocator...
    Sun Jun  2 00:00:39.083 [initandlisten] shutdown: lock for final commit...
    Sun Jun  2 00:00:39.083 [initandlisten] shutdown: final commit...
    Sun Jun  2 00:00:39.083 [initandlisten] shutdown: closing all files...
    Sun Jun  2 00:00:39.083 [initandlisten] closeAllFiles() finished
    Sun Jun  2 00:00:39.083 [initandlisten] shutdown: removing fs lock...
    Sun Jun  2 00:00:39.084 dbexit: really exiting now

However, when I use sudo service mongodb stop or start everything works fine and I can query database

    MongoDB shell version: 2.4.3
    connecting to: test
    > db.test.save( { a: 1 } )
    > db.test.find()
    { "_id" : ObjectId("51aa70cc07bf3387b90934ce"), "a" : 1 }

I am using Ubuntu 12.04 (VPS) if it matters

Alexander
  • 183
  • 2
  • 9
  • Have you created the meteor app with sudo ? Maybe the folder is with wrong permission. Type ls -la . and check if the current folder is equal to your user (whoami) – gabrielhpugliese Jun 02 '13 at 03:47
  • @gabrielhpugliese I have just created a new app with sudo. I am now required to start meteor with `sudo meteor` or it shows an error `Error: EACCES, permission denied '/home/alexander/permissiontest/.meteor/local'`. But even if i use sudo - nothing changes. I still get `Unexpected mongo exit code 100. Restarting.` – Alexander Jun 02 '13 at 06:18
  • Well, according to your logs the reason of mongod couldn't start is in wrong LC_ALL locale value. Try to execute "export LC_ALL=C" before you start mongod. Related issue [in bugtracker](https://jira.mongodb.org/browse/SERVER-8910?focusedCommentId=284153&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-284153). – icanhazbroccoli Jun 03 '13 at 13:20
  • @4pcbr you should have written that as an answer - it worked perfectly! Thank you very much! – Alexander Jun 03 '13 at 15:57

1 Answers1

16

According to your logs the reason of mongod couldn't start is in wrong LC_ALL locale value. Try to execute "export LC_ALL=C" before you start mongod. Related issue in bugtracker

icanhazbroccoli
  • 1,035
  • 9
  • 15