I am trying to install MongoDB first time on my Windows 7 machine. I am installing it to default location (c:/).
When I execute the mongod.exe first time, I get the message 'the waiting for connections message in the console'. The documentation of MongoDB asks to connect on another cmd prompt and execute mongod.exe again.
When I do this I get the following message:
C:\Program Files\MongoDB\Server\3.0\bin>mongod.exe
2015-09-04T11:31:23.880+0530 I CONTROL Hotfix KB2731284 or later update is not installed, will zero-out data files
2015-09-04T11:31:23.905+0530 W - [initandlisten] Detected unclean shutdown - C:\data\db\mongod.lock is not empty.
2015-09-04T11:31:23.907+0530 I STORAGE [initandlisten] exception in initAndListen: 98 Unable to create/open lock file:
C:\data\db\mongod.lock errno:32 The process cannot access the file because it is being used by another process.. Is a mo
ngod instance already running?, terminating
2015-09-04T11:31:23.907+0530 I CONTROL [initandlisten] dbexit: rc: 100
C:\Program Files\MongoDB\Server\3.0\bin>mongod.exe
2015-09-04T11:33:52.437+0530 I CONTROL Hotfix KB2731284 or later update is not installed, will zero-out data files
2015-09-04T11:33:52.442+0530 W - [initandlisten] Detected unclean shutdown - C:\data\db\mongod.lock is not empty.
2015-09-04T11:33:52.445+0530 I STORAGE [initandlisten] exception in initAndListen: 98 Unable to create/open lock file:
C:\data\db\mongod.lock errno:32 The process cannot access the file because it is being used by another process.. Is a mo
ngod instance already running?, terminating
2015-09-04T11:33:52.445+0530 I CONTROL [initandlisten] dbexit: rc: 100
P.S.: I have created /data/db in C:/.
Well, I just faced the same issue. I installed the fix, but saw nothing but same error. So that's how I got over it: just create a folder structure in your C catalog like this one: C:\data\db. So it worked for me perfectly. I use Windows 7 x64.
Related
I have a mongodb on a remote machine. I restarted the machine the other day without closing the mongodb service first, when I try to restart it today using command sudo service mogod start, nothing happened. I checked the log file /var/log/mongodb/mongod.log there was no error message but a message that seems to be a succesfful restart atempt today. Further restart, stop, start commands are not logged to the log file. And there are no error message on either the log file or terminal window.
2018-06-11T22:47:50.191+0800 I FTDC [signalProcessingThread] Shutting down full-time diagnostic data capture
2018-06-11T22:47:50.697+0800 I STORAGE [signalProcessingThread] WiredTigerKVEngine shutting down
2018-06-11T22:47:56.309+0800 I STORAGE [signalProcessingThread] shutdown: removing fs lock...
2018-06-11T22:47:57.269+0800 I CONTROL [signalProcessingThread] now exiting
2018-06-11T22:47:57.269+0800 I CONTROL [signalProcessingThread] shutting down with code:0
2018-06-19T11:48:33.985+0800 I CONTROL [main] ***** SERVER RESTARTED *****
2018-06-19T11:48:34.115+0800 I CONTROL [initandlisten] MongoDB starting : pid=6614 port=27017 dbpath=/var/lib/mongodb 64-bit host=ubuntu
2018-06-19T11:48:34.115+0800 I CONTROL [initandlisten] db version v3.6.4
2018-06-19T11:48:34.115+0800 I CONTROL [initandlisten] git version: d0181a711f7e7f39e60b5aeb1dc7097bf6ae5856
When I tried sudo mongod it comes up with exception in initAndListen: NonExistentPath: Data directory /data/db not found. error. When I tried sudo mongod --dbpath=/var/lib/mongodb the database start successfully.
What should I check or do to start the process using sudo service mogod start again?
You will have to create map "data/db" in at your disk.
Usually on Windows there should be path C://data/db. I am guessing that you should create same map on disk even though it is Ubuntu. You can try with that
Suddenly my mongodb server has stopped working on my Mac and I just try to start it again It'll throw me an error described here https://jira.mongodb.org/browse/WT-4135.
So run a database repair and I keep getting this error,
2018-06-19T13:18:38.428+0530 I STORAGE [initandlisten] repairDatabase pdg_db
2018-06-19T13:18:38.428+0530 I STORAGE [initandlisten] Repairing collection ipd_db.app_sessions
2018-06-19T13:18:38.428+0530 I STORAGE [initandlisten] Verify failed on uri table:collection-1--4208304830224804148. Running a salvage operation.
2018-06-19T13:18:38.428+0530 F - [initandlisten] Invariant failure rs.get() src/mongo/db/catalog/database_impl.cpp 226
So I can't even start the server. As my understanding if I drop pdg_db this issue will be solved. But how to drop database without running the mongodb server? Is there any other way to do this?
Thanks
I'm working on this automatic drink dispenser and ran into an issue when I downloaded the Mongo 3.0.7 I tried to run it but I keep getting this error:
I got the idea from this website. http://yujiangtham.com/2014/05/30/build-your-very-own-drink-mixing-robot-part-2/
2016-02-02T15:56:42.585-0500 E NETWORK [initandlisten] listen():
bind() failed errno:48 Address already in use for socket:
0.0.0.0:27017
2016-02-02T15:56:42.585-0500 E NETWORK [initandlisten] addr already
in use 2016-02-02T15:56:42.593-0500 W - [initandlisten]
Detected unclean shutdown - /data/db/mongod.lock is not empty.
2016-02-02T15:56:42.593-0500 I STORAGE [initandlisten] exception in
initAndListen: 98 Unable to lock file: /data/db/mongod.lock errno:35
Resource temporarily unavailable. Is a mongod instance already
running?, terminating
2016-02-02T15:56:42.593-0500 I CONTROL [initandlisten] dbexit: rc:
100
I need help on how to run this. The website I'm using as a reference is
http://yujiangtham.com/2014/05/30/build-your-very-own-drink-mixing-robot-part-2/
It is stating that Mongo is already running. If you are certain it is not, then the lock file still exists from a previous unclean shutdown.
ps aux | grep mongo
if that returns nothing, it will mean the lock file still exists. looking at your error, the file is /data/db/mongod.lock
rm /data/db/mongod.lock
Should get rid of it so you'll be able to start the mongo service running again.
Try running pkill mongod to kill the process
Greetings I am learning mongodb and have encountered with following issue. I am pretty newbie in all of that and dived to into meanstack development after spending some hours messing with setups, I decided to spend some time learning first before doing something and found great corse of mongodb on their official website, following their lessons I cant start mongo server as it says I have already started it somewhere... :)
Error message:
2015-10-13T21:55:01.900+0200 E NETWORK [initandlisten] listen(): bind() failed errno:48 Address already in use for socket: 0.0.0.0:27017
2015-10-13T21:55:01.900+0200 E NETWORK [initandlisten] addr already in use
2015-10-13T21:55:01.912+0200 W - [initandlisten] Detected unclean shutdown - /data/db/mongod.lock is not empty.
2015-10-13T21:55:01.935+0200 I STORAGE [initandlisten] exception in initAndListen: 98 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
2015-10-13T21:55:01.935+0200 I CONTROL [initandlisten] dbexit: rc: 100
Can you please explain how can I find and remove that one or at least shut it down?
There may be already a mongodb instance running. Check it with below command.
ps -ef | grep 'mongo'
You can shutdown existing mongod instance using: http://docs.mongodb.org/master/tutorial/manage-mongodb-processes/#use-shutdown
mongod --shutdown
If no instance is running then go to the data location and remove the lock file.
cd /data/db/
sudo rm mongod.lock
Note: This is only for learning / local machine. This process might not be suitable for production.
I am using MongoDB version 3.0. I have installed mongodb as windows service which was working all this while. Now suddenly, the service does not start & the event logs shows this error The MongoDB service terminated with service-specific error Cannot create another system semaphore.
I am not sure how can I handle this error message.
I am not sure if its helpful but some of other services on my windows 2008 server also stopped to start on their own.
One of the windows service gives Not enough storage is available to proceess this request error.
First find your mongod.cfg file (for me in C:\Program Files\MongoDB 2.6 Standard)
#where to log
logpath=D:\MongoDatas\log\mongod.log
Then have a look at the last lines of you log file.
As suggested by JPBlanc, I looked at the log and found following entries:
2015-10-06T11:17:48.403-0400 I CONTROL Hotfix KB2731284 or later update is not installed, will zero-out data files
2015-10-06T11:17:48.403-0400 I CONTROL Trying to start Windows service 'MongoDB'
2015-10-06T11:17:48.403-0400 I STORAGE Service running
2015-10-06T11:17:48.423-0400 I JOURNAL [initandlisten] journal dir=C:\Program Files\MongoDB\data\db\journal
2015-10-06T11:17:48.424-0400 I JOURNAL [initandlisten] recover : no journal files present, no recovery needed
2015-10-06T11:17:48.425-0400 I JOURNAL [initandlisten]
2015-10-06T11:17:48.425-0400 E JOURNAL [initandlisten] Insufficient free space for journal files
2015-10-06T11:17:48.425-0400 I JOURNAL [initandlisten] Please make at least 3379MB available in C:\Program Files\MongoDB\data\db\journal or use --smallfiles
2015-10-06T11:17:48.425-0400 I JOURNAL [initandlisten]
2015-10-06T11:17:48.428-0400 I STORAGE [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
2015-10-06T11:17:48.429-0400 I CONTROL [serviceStopWorker] now exiting
2015-10-06T11:17:48.429-0400 I NETWORK [serviceStopWorker] shutdown: going to close listening sockets...
2015-10-06T11:17:48.429-0400 I NETWORK [serviceStopWorker] shutdown: going to flush diaglog...
2015-10-06T11:17:48.429-0400 I NETWORK [serviceStopWorker] shutdown: going to close sockets...
2015-10-06T11:17:48.429-0400 I STORAGE [serviceStopWorker] shutdown: waiting for fs preallocator...
2015-10-06T11:17:48.429-0400 I STORAGE [serviceStopWorker] shutdown: final commit...
2015-10-06T11:17:48.429-0400 I STORAGE [serviceStopWorker] shutdown: closing all files...
2015-10-06T11:17:48.429-0400 I STORAGE [serviceStopWorker] closeAllFiles() finished
2015-10-06T11:17:48.429-0400 I CONTROL [serviceStopWorker] dbexit: rc: 49
It looks like space issue on the drive I was using
I have encountered a similar issue as bellow:
The Apache Tomcat 8.5 Tomcat8 service terminated with service-specific error Incorrect function.
And I found there is a error message in tomcat log:
[error] [ 3304] Failed creating java C:\Program Files\Java\jre1.8.0_101\bin\server\jvm.dll
After fixing this error, we can start tomcat normally.
Just FYI.
Make sure data directories and log directories are created as specified in mongodb.cfg file or mongo DB configuration file. In my case, I was missing one of the files. For more information please visit : https://www.mongodb.com/docs/manual/reference/configuration-options/