2017-06-12T13:06:18.407+0300 I STORAGE [initandlisten] exception in initAndListen: 98 Unable to lock file: /data/db/mongod.lock Resource temporarily unavailable. Is a mongod instance already running?, terminating
2017-06-12T13:06:18.407+0300 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2017-06-12T13:06:18.407+0300 I NETWORK [initandlisten] shutdown: going to flush diaglog...
2017-06-12T13:06:18.407+0300 I CONTROL [initandlisten] now exiting
2017-06-12T13:06:18.407+0300 I CONTROL [initandlisten] shutting down with code:100
The error clearly says
exception in initAndListen: 98 Unable to lock file: /data/db/mongod.lock Resource temporarily unavailable. Is a mongod instance already running?, terminating
An instance of mongod is already running and it held a lock on mongod.lock
file. Run ps -eaf | grep mongod
to find the running instance. If running, kill the process sudo kill <pID>
obtained from above grep command.
Then delete the mongod.lock
file as mongod wasn't shutdown gracefully. Post deleting the lock file start the mongod process sudo mongod
.
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With