Answer the question
In order to leave comments, you need to log in
Why is mongod crashing and how to fix it?
The guys ran into a problem, the hoster had some technical work at night, the server was cut down.
Today I woke up, the server is not working, after contacting the TP, the server was raised, but the site could not be launched.
When mongod starts, it immediately crashes.
I deleted the file /var/lib/mongodb/mongod.lock
And again it crashes at startup, everything is fine in the /etc/mongod.conf config, the path to the collections is correct, but it can’t be started.
Now manually raised mongod --dbpath /var/lib/mongodb
So everything is in order, but if they try to raise service mongod start again, it immediately crashes
In the logs /var/log/mongodb/mongod.log
2016-07-19T13:12:09.952+0300 I CONTROL [initandlisten] MongoDB starting : pid=21729 port=27017 dbpath=/var/lib/mongodb 64-bit host=p215721
2016-07-19T13:12:09.952+0300 I CONTROL [initandlisten] db version v3.0.12
2016-07-19T13:12:09.952+0300 I CONTROL [initandlisten] git version: 33934938e0e95d534cebbaff656cde916b9c3573
2016-07-19T13:12:09.952+0300 I CONTROL [initandlisten] build info: Linux ip-10-229-66-2 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2016-07-19T13:12:09.952+0300 I CONTROL [initandlisten] allocator: tcmalloc
2016-07-19T13:12:09.952+0300 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2016-07-19T13:12:09.974+0300 I STORAGE [initandlisten] exception in initAndListen: 98 Unable to create/open lock file: /var/lib/mongodb/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
2016-07-19T13:12:09.974+0300 I CONTROL [initandlisten] dbexit: rc: 100
Answer the question
In order to leave comments, you need to log in
They write an error to you in English - there are not enough rights to write the file
Raise the demon from root, for example, through sudo
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question