4

I have been uninstalling and reinstalling Mongodb on Ubuntu 14.04 following the official documentation for few times now. However, I keep getting this:

2015-12-22T12:46:32.091+0000 I CONTROL  ***** SERVER RESTARTED *****
2015-12-22T12:46:32.096+0000 I CONTROL  [initandlisten] MongoDB starting : pid=7039 port=27017 dbpath=/var/lib/mongodb 64-bit host=server-04
2015-12-22T12:46:32.096+0000 I CONTROL  [initandlisten] db version v3.0.8
2015-12-22T12:46:32.096+0000 I CONTROL  [initandlisten] git version: 83d8cc25e00e42856924d84e220fbe4a839e605d
2015-12-22T12:46:32.096+0000 I CONTROL  [initandlisten] build info: Linux ip-10-187-89-126 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-12-22T12:46:32.096+0000 I CONTROL  [initandlisten] allocator: tcmalloc
2015-12-22T12:46:32.096+0000 I CONTROL  [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, syste$
2015-12-22T12:46:32.120+0000 E NETWORK  [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted
2015-12-22T12:46:32.120+0000 I -        [initandlisten] Fatal Assertion 28578
2015-12-22T12:46:32.120+0000 I -        [initandlisten]

***aborting after fassert() failure

I am expecting to see: [initandlisten] waiting for connections on port <port> but can't see it. What can cause it?

rzo1
  • 5,561
  • 3
  • 25
  • 64
Kanan Farzali
  • 991
  • 13
  • 23

1 Answers1

-3

remove everything from /tmp directory

sudo rm -rf /tmp/mongod*.sock

change the ownership of the db path and log path

chown -R mongodb:mongodb /var/lib/mongodb/
chown -R mongodb:mongodb /var/log/monogdb/

restart your mongo

sudo service mongod start