Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mongodb installation failure to run mongod

Tags:

I have downloaded the newest version of mongodb and have moved and renamed the file to mongodb to the directory usr/local/mongodb. When I try to run mongod i get the following error

`./bin/mongod --help` for help and startup options Sun Apr 15 18:08:25 [initandlisten] MongoDB starting : pid=8801 port=27017 dbpath=/data/db/ 64-bit host=Hanss-MacBook-Air.local Sun Apr 15 18:08:25 [initandlisten] db version v2.0.4, pdfile version 4.5 Sun Apr 15 18:08:25 [initandlisten] git version: 329f3c47fe8136c03392c8f0e548506cb21f8ebf Sun Apr 15 18:08:25 [initandlisten] build info: Darwin erh2.10gen.cc 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40 Sun Apr 15 18:08:25 [initandlisten] options: {} Sun Apr 15 18:08:25 [initandlisten] exception in initAndListen: 10309 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating Sun Apr 15 18:08:25 dbexit:  Sun Apr 15 18:08:25 [initandlisten] shutdown: going to close listening sockets... Sun Apr 15 18:08:25 [initandlisten] shutdown: going to flush diaglog... Sun Apr 15 18:08:25 [initandlisten] shutdown: going to close sockets... Sun Apr 15 18:08:25 [initandlisten] shutdown: waiting for fs preallocator... Sun Apr 15 18:08:25 [initandlisten] shutdown: lock for final commit... Sun Apr 15 18:08:25 [initandlisten] shutdown: final commit... Sun Apr 15 18:08:25 [initandlisten] shutdown: closing all files... Sun Apr 15 18:08:25 [initandlisten] closeAllFiles() finished Sun Apr 15 18:08:25 [initandlisten] shutdown: removing fs lock... Sun Apr 15 18:08:25 [initandlisten] couldn't remove fs lock errno:9 Bad file descriptor Sun Apr 15 18:08:25 dbexit: really exiting now 
like image 742
Hans Adiputra Arijanto Avatar asked Apr 15 '12 22:04

Hans Adiputra Arijanto


People also ask

Why mongod command is not working?

mongo is not recognized as an internal or external command This error usually occurs because the system can not find the executable that you are asking to launch so to launch the file you have to provide the full path and after that, it will run without any issues.

Which MongoDB is compatible with Windows 8?

Your understanding is correct. MongoDB 4.2 was the last version of MongoDB server to support Windows 8.


1 Answers

sudo chown -R <your-username> /data/db

Which user runs mongod? Are you running it with your regular login?

like image 113
Joe Frambach Avatar answered Sep 25 '22 12:09

Joe Frambach