[DOCS-7879] mongo on elementary(ubuntu based) Created: 15/May/16  Updated: 03/Nov/17  Resolved: 20/May/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Ravind Kumar (Inactive)
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

elementary linux

Location: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-linux/
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/49.0.2623.108 Chrome/49.0.2623.108 Safari/537.36
Referrer: https://www.google.com/
Screen Resolution: 1920 x 1080


Participants:
Days since reply: 7 years, 39 weeks, 2 days ago

 Description   

I installed per the directions, but when i run mongod, I get this.

robert@robert-UX305LA:~$ mongod
mongod --help for help and startup options
Sun May 15 17:39:48.635 [initandlisten] MongoDB starting : pid=15291 port=27017 dbpath=/data/db/ 64-bit host=robert-UX305LA
Sun May 15 17:39:48.635 [initandlisten] db version v2.4.9
Sun May 15 17:39:48.635 [initandlisten] git version: nogitversion
Sun May 15 17:39:48.635 [initandlisten] build info: Linux orlo 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 BOOST_LIB_VERSION=1_54
Sun May 15 17:39:48.635 [initandlisten] allocator: tcmalloc
Sun May 15 17:39:48.635 [initandlisten] options: {}
Sun May 15 17:39:48.636 [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 May 15 17:39:48.636 dbexit:
Sun May 15 17:39:48.636 [initandlisten] shutdown: going to close listening sockets...
Sun May 15 17:39:48.636 [initandlisten] shutdown: going to flush diaglog...
Sun May 15 17:39:48.636 [initandlisten] shutdown: going to close sockets...
Sun May 15 17:39:48.636 [initandlisten] shutdown: waiting for fs preallocator...
Sun May 15 17:39:48.636 [initandlisten] shutdown: lock for final commit...
Sun May 15 17:39:48.636 [initandlisten] shutdown: final commit...
Sun May 15 17:39:48.636 [initandlisten] shutdown: closing all files...
Sun May 15 17:39:48.636 [initandlisten] closeAllFiles() finished
Sun May 15 17:39:48.636 [initandlisten] shutdown: removing fs lock...
Sun May 15 17:39:48.636 [initandlisten] couldn't remove fs lock errno:9 Bad file descriptor
Sun May 15 17:39:48.636 dbexit: really exiting now



 Comments   
Comment by Ravind Kumar (Inactive) [ 16/May/16 ]

Hello Robert,

The logs show:

Sun May 15 17:39:48.636 [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 

This usually indicates another mongod process is running using the specified data directory.

Try to check and see if a mongod process is already running. Alternatively, try running

mongo --port 27017 and see if it connects. If it does, there is already a mongod running on your system using the specified data directory.

Can you confirm what version of MongoDB you are trying to run?

The other possibility is that a machine crash or improper shutdown has left some residual files that are causing issues.

You may have to run the mongod with the --repair option in order to restore normal functionality. See this page of the manual for more information.

Generated at Thu Feb 08 07:55:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.