I am new to MongoDB. I am trying to install MongoDb 3.0 on Ubuntu 13.0 LTS, which is a VM on Windows 7 Host. I have installed MongoDB successfully (packages etc.), but when I execute the command sudo service mongod start
, I get the following error in the "/var/log/mongodb/mongod.log" log file. Can anyone help me understanding this error. There is nothing on internet related to this.
2015-04-23T00:12:00.876-0400 I CONTROL ***** SERVER RESTARTED ***** 2015-04-23T00:12:00.931-0400 E NETWORK [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted 2015-04-23T00:12:00.931-0400 I - [initandlisten] Fatal Assertion 28578 2015-04-23T00:12:00.931-0400 I - [initandlisten]
ls -lat /tmp/mongodb-27017.sock
? I suspect you may have startedmongod
as a different user (perhaps root) rather than starting with the service (which should use themongodb
user). You should be able to fix this by stopping themongod
service,sudo rm /tmp/mongodb-27017.sock
, and then starting the service again. The error here is fairly benign, unless you want to connect tomongod
over a domain socket instead of via a TCP/IP connection. – Stennie