-1

I was trying to run this command

#mongod --fork --logpath /var/log/mongod.log  

but I got this message

about to fork child process, waiting until server is ready for connections.
forked process: 10750
all output going to: /var/log/mongod.log
log file [/var/log/mongod.log] exists; copied to temporary file
[/var/log/mongod.log.2017-05-23T14-57-31]
ERROR: child process failed, exited with error number 4

Could you please help me resolve the problem?

ale
  • 6,369
  • 7
  • 55
  • 65
dhouha
  • 1
  • 2

1 Answers1

0

Per the MongoDB docs:

4
The version of the database is different from the version supported by the mongod (or mongod.exe) instance. The instance exits cleanly.

ale
  • 6,369
  • 7
  • 55
  • 65
Treefish Zhang
  • 1,131
  • 1
  • 15
  • 27
  • Did you try to [find out the version of your db](https://stackoverflow.com/questions/38160412/how-to-find-the-exact-version-of-installed-mongodb) by db.version() ? If it is different from what your mongod.exe supports, you have to [upgrade it](https://docs.mongodb.com/manual/tutorial/upgrade-revision/), (see 'Follow this upgrade procedure:...'). – Treefish Zhang May 24 '17 at 18:15
  • my mongodb version is db version v2.4.9 – dhouha May 25 '17 at 09:17
  • Great! Do you have a standalone, a replica set, or sharded cluster? Did you try to [upgrade your database accordingly](https://docs.mongodb.com/manual/release-notes/3.4-upgrade-standalone/)? – Treefish Zhang May 25 '17 at 13:27