0

I update mongodb from 2.4 to 2.6. At command line mongodb starts as mongod but as

sudo service mongod  start

has the error

ERROR: child process failed, exited with error number 1

What is wrong?I have centos 6.7

dimis283
  • 222
  • 3
  • 10
  • http://stackoverflow.com/questions/28591101/starting-mongod-fork-error-child-process-failed-exited-with-error-number-1 Have you checked this question? – Anirudh Modi Sep 02 '16 at 13:20
  • I see log files and there are permision errors.Now I have the error at log file:exception in initAndListen: 10310 Unable to lock file: /var/lib/mongo/mongod.lock. what is wrong? – dimis283 Sep 02 '16 at 13:34

2 Answers2

1

Just in case the log settings are correct, you may also want to make sure that you pid file path is not a directory but the full path to a file

bisharkha
  • 11
  • 3
0

Try running the below command to start mongo manually

mongod --verbose --fork --logpath ~/mongodb.log

Read the log files for errors, it can be some path not available for the home data or log files or a permission issue.

sys0dm1n
  • 819
  • 6
  • 13