2013-06-01 130 views
4

我在啓動Meteor示例時遇到問題。 這是當我在應用程序文件夾中鍵入meteor流星未啓動

[[[[[ ~/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. 

我已經嘗試meteor reset和刪除.meteor/local/db/mongo.lock我所得到的 - 沒有什麼變化

我試着輸入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 

然而,當我使用sudo service mongodb stopstart一切工作正常,我可以查詢數據庫

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

我使用Ubuntu 12.04(VPS),如果它的事項

+0

您是否使用sudo創建了流星應用程序? 也許該文件夾的權限不正確。鍵入ls -la。並檢查當前文件夾是否等於您的用戶(whoami) – gabrielhpugliese

+0

@gabrielhpugliese我剛剛用sudo創建了一個新應用程序。我現在需要用'sudo meteor'啓動流星,或者它顯示錯誤'錯誤:EACCES,權限被拒絕'/ home/alexander/permissiontest/.meteor/local''。但即使我使用sudo - 沒有任何變化。我仍然得到'意外的mongo退出代碼100.重新啓動。' – Alexander

+0

那麼,根據您的日誌,mongod無法啓動的原因是錯誤的LC_ALL語言環境值。嘗試在啓動mongod之前執行「export LC_ALL = C」。相關問題[在bugtracker中](https://jira.mongodb.org/browse/SERVER-8910?focusedCommentId=284153&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-284153)。 – icanhazbroccoli

回答

16

根據你的日誌的mongod的原因無法啓動,是錯誤的LC_ALL語言環境值。嘗試在啓動mongod之前執行「export LC_ALL = C」。相關問題in bugtracker

+0

這有幫助。謝謝。你能解釋它做了什麼? –