Mongodb – Issues in starting MongoDB service

mongodbmongodb-3.0startup

I've installed MongoDB 3.0 in RHEL 6. From root user, I'm trying to start the mongo service but it is getting failed and the log file is not getting updated as well.

2015-10-13T09:53:26.133+0530 E NETWORK  [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted
2015-10-13T09:53:26.133+0530 I -        [initandlisten] Fatal Assertion 28578
2015-10-13T09:53:26.133+0530 I -        [initandlisten]

***aborting after fassert() failure

The above is the last updated log.

I have another user 'oracle' from which also it is not starting.

I also tried running mongod --repair

It gives:

2015-10-13T11:02:59.473+0530 I CONTROL  [initandlisten] MongoDB starting : pid=11033 port=27017 dbpath=/data/db 64-bit host=vmrac2 
2015-10-13T11:02:59.473+0530 I CONTROL  [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended. 
2015-10-13T11:02:59.473+0530 I CONTROL  [initandlisten] 2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] ** WARNING: You are running on a NUMA machine. 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] **          We suggest launching mongod like this to avoid performance problems: 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] **              numactl --interleave=all mongod [other options] 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] **        We suggest setting it to 'never' 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] **        We suggest setting it to 'never' 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 16384 processes, 65536 files. Number of processes should be at least 32768 : 0.5 times number of files. 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] db version v3.0.6 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] git version: 1ef45a23a4c5e3480ac919b28afcba3c615488f2 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] build info: Linux ip-10-67-194-123 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 BOOST_LIB_VERSION=1_49 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] allocator: tcmalloc 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] options: { repair: true } 
2015-10-13T11:02:59.474+0530 I STORAGE  [initandlisten] finished checking dbs 
2015-10-13T11:02:59.474+0530 I CONTROL  [initandlisten] now exiting 
2015-10-13T11:02:59.474+0530 I NETWORK  [initandlisten] shutdown: going to close listening sockets... 
2015-10-13T11:02:59.474+0530 I NETWORK  [initandlisten] removing socket file: /tmp/mongodb-27017.sock 
2015-10-13T11:02:59.474+0530 I NETWORK  [initandlisten] shutdown: going to flush diaglog... 
2015-10-13T11:02:59.474+0530 I NETWORK  [initandlisten] shutdown: going to close sockets... 
2015-10-13T11:02:59.474+0530 I STORAGE  [initandlisten] shutdown: waiting for fs preallocator... 
2015-10-13T11:02:59.474+0530 I STORAGE  [initandlisten] shutdown: closing all files... 
2015-10-13T11:02:59.474+0530 I STORAGE  [initandlisten] closeAllFiles() finished 
2015-10-13T11:02:59.474+0530 I STORAGE  [initandlisten] shutdown: removing fs lock... 
2015-10-13T11:02:59.475+0530 I CONTROL  [initandlisten] dbexit:  rc: 0

Things I have tried:

  • Deleting /tmp/mongodb-27017.sock but it says no file found with that name.
  • Changing the net.port in the config file to change the .sock file.
  • Setting unixDomainSocket : enabled: false

Best Answer

run these commands for ubuntu

  1. sudo rm -rf /tmp/mongodb-27017.sock
  2. sudo service mongod start
  3. sudo ps aux | grep mongo
  4. sudo kill