MongoDBを起動するときのエラーです.forkオプション
を付けて永続的に起動させようとしてましたが,パソコンが急に落ちてしまい,再起動したらERROR: child process failed, exited with error number 100
という表示が...
$ mongod --fork --logpath mongolog/log.txt --nojournal --noprealloc --dbpath mongolog/db
note: noprealloc may hurt performance in many applications
about to fork child process, waiting until server is ready for connections.
forked process: 3081
all output going to: /Users/ryousuke/Sites/node/APPFOG/poitabi/mongolog/log.txt
log file [/Users/ryousuke/Sites/node/APPFOG/poitabi/mongolog/log.txt] exists; copied to temporary file [/Users/ryousuke/Sites/node/APPFOG/poitabi/mongolog/log.txt.2014-02-10T09-12-44]
ERROR: child process failed, exited with error number 100
スタックオーバーフローに同じ様な質問がありました.
Mongodb service wont start - Stack Overflow
--repair
とオプションを付けてみるといいっぽいことが書いてたので試してみます.
$ mongod --fork --logpath mongolog/log.txt --nojournal --noprealloc --dbpath mongolog/db --repair
note: noprealloc may hurt performance in many applications
about to fork child process, waiting until server is ready for connections.
forked process: 3225
all output going to: /Users/ryousuke/Sites/node/APPFOG/poitabi/mongolog/log.txt
log file [/Users/ryousuke/Sites/node/APPFOG/poitabi/mongolog/log.txt] exists; copied to temporary file [/Users/ryousuke/Sites/node/APPFOG/poitabi/mongolog/log.txt.2014-02-10T09-19-28]
child process started successfully, parent exiting
successfullyって単語が見えると安心しますね.
再度通常通り起動させてみます.
$ mongod --fork --logpath mongolog/log.txt --nojournal --noprealloc --dbpath mongolog/db
note: noprealloc may hurt performance in many applications
about to fork child process, waiting until server is ready for connections.
forked process: 3242
all output going to: /Users/ryousuke/Sites/node/APPFOG/poitabi/mongolog/log.txt
log file [/Users/ryousuke/Sites/node/APPFOG/poitabi/mongolog/log.txt] exists; copied to temporary file [/Users/ryousuke/Sites/node/APPFOG/poitabi/mongolog/log.txt.2014-02-10T09-20-11]
child process started successfully, parent exiting
ウマく起動してくれました!