After setting up MongoDB service on Windows Server 2008 R2 this error was raised.
C:mongodbbin>net start MongoDB
The Mongo DB service is starting.
The Mongo DB service could not be started.
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.
asked Sep 7, 2013 at 5:58
1
The error came from an unclean shutdown detected.
Please visit http://dochub.mongodb.org/core/repair for recovery instructions.
a few steps will fix it (as it’s written in the link above):
1) remove the file /data/db/mongod.lock
2) run mongod.exe --repair
3) start the mongod service net start MongoDB
4
For anyone who faced this error on 2020, with version 4.4.1 of mongo, and the accepted answer not solve the issue, here is what I’ve done:
- Remove all mongo services from pc (add/remove programs).
- Go to program files and backup the MongoDB folder.
- Remove the MongoDB folder.
- Re-install mongo db.
And it should work.
UPDATE for January 2021, the following saved me without re-installing MongoDB and losing all my data:
C:Program FilesMongoDBServer4.4bin>mongod --dbpath "C:Program FilesMongoDBServer4.4data" --repair
answered Oct 11, 2020 at 13:45
Or AssayagOr Assayag
5,15413 gold badges51 silver badges85 bronze badges
2
I was facing the same issue and I closed the other command prompt which was opened with mongoDB.exe, and hence created a lock on that executable. Simply only closing that command prompt window worked fine. Thanks for the help.
answered Oct 1, 2014 at 19:47
1
Make sure you have at least 5 Gb available space on the drive of the database. For me, clearing that space enabled the ability to restart Mongodb.
answered Apr 10, 2016 at 15:20
0
If you are in the Windows. you should change the mongodb’s config in the System disk.For example
1) I change C:Windowssystem32mongodb.exe
.
2) And I make the path in D:mongodbmongod.cfg
.Before this,you should remove previous.
3) Finally , you can net the serve. net start mongodb
.
I hope it can help you .English is not very good ,please forgive me.
enter image description here
answered Mar 30, 2017 at 3:04
1
I was having the problem of starting the the MongoDB. The logs are pretty descriptive and you can find suggestion from there.
There is a ‘d‘ folder that needs to be created within data folder like
datad which was missing.
This solved my problem.
answered May 23, 2017 at 7:26
sen_ssen_s
212 bronze badges
Although, not an ideal solution, I ended up deleting all of the database files in datadb
and was then able to successfully run the MongoDB
service. Note, this will delete all of the data in the database.
answered Dec 14, 2017 at 19:22
aashah7aashah7
1,9851 gold badge15 silver badges23 bronze badges
Database errors can badly affect any website functioning.
Thus MongoDB error 1067: The process terminated unexpectedly literally stops the website.
Usually, this error happens because of unclean shutdown or sometimes due to insufficient disk space.
At Bobcares, we get many requests to fix MongoDB errors, as a part of our Server Management Services.
Today, let’s have a look into the causes of 1067 error and see how our Support Engineers fix it.
Explaining the MongoDB error 1067
MongoDB is a cross-platform, document-oriented database. Today, let’s have a look into a MongoDB error in the Windows platform.
Recently one of our customers got a MongoDB error 1067. The typical error message appeared as,
There are a few possible reasons for this error. This can be due to an unclean shutdown or insufficient disk space.
Causes and Fixes for the 1067 error
Our Dedicated Engineers with expertise over a decade are familiar to fix MongoDB errors. Let’s see how we fix the 1067 error in MongoDB.
1. Remove the MongoDB lock file
The most common cause for the 1067 error is an unclean shutdown. The complete error message clearly indicates this.
The Mongo DB service is starting.
The Mongo DB service could not be started.
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.
Usually, MongoDB creates a mongodb.lock file in the dbpath when the server starts and drops it when it’s stopped. However, an unclean shutdown doesn’t remove this file. A residual lock file means that MongoDB didn’t stop correctly.
So, when the user tries to start the mongod service again, it shows the error 1067. In such cases, our Support Team manually removes the lock file,
datadbmongod.lock
Later, we repair the mongodb.exe, the build-in MongoDB daemon for the Windows platform. For this, we use the command,
mongod.exe --repair
Finally, we start the mongod service using,
net start MongoDB
Overall removing the lock file together with repairing the database fixes the error.
2. Insufficient space in hard disk
Similarly, if the server hard disk doesn’t have enough space then also it is not possible to run the MongoDB process. In most cases, this results in the termination of the process. As a result, it shows up MongoDB error 1067.
Usually, MongoDB needs at least 3.5GB as storage space. So, our Support Engineers recommend removing unwanted data. This is to create free space in the system. In addition, if we can’t free up enough space, we recommend users to add more disk space. In most situations, this resolves the error.
[Still having difficulty in fixing MongoDB error? – We’ll fix it for you.]
Conclusion
In short, MongoDB error 1067 occur due to unclean shutdown which results in the formation of mongod.lock file. Likewise, this error also occurs due to insufficient disk space. Today, we saw how our Support Engineers fix it.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
GET STARTED
var google_conversion_label = «owonCMyG5nEQ0aD71QM»;
MongoDB: System error 1067 has occurred.
After installing MongoDB as a windows service I wasn’t able to get it started. Instead the following error message was shown:
The Mongo DB service is starting.
The Mongo DB service could not be started.
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.
When MongoDB crashes like this, you have to do some clean up work before trying to start it again:
- Delete the following file inside the
/data/db/
directory:mongod.lock
mongod.exe –repair
- Start the mongod service again
Popular posts from this blog
A colleague asked me to take a look at the following code inside a test project: My first guess would be that this code checks that the specified condition(the contains) is true for every element in the list. This turns out not to be the case. The Assert.Collection expects a list of element inspectors, one for every item in the list. The first inspector is used to check the first item, the second inspector the second item and so on. The number of inspectors should match the number of elements in the list. An example: The behavior I expected could be achieved using the Assert.All method:
I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.
As long you are running your Angular application at a root URL (e.g. www.myangularapp.com ) you don’t need to worry that much about either the ‘—deploy-url’ and ‘—base-href’ parameters. But once you want to serve your Angular application from a server sub folder(e.g. www.mywebsite.com/angularapp ) these parameters become important. —base-href If you deploy your Angular app to a subfolder, the ‘—base-href’ is important to generate the correct routes. This parameter will update the <base href> tag inside the index.html. For example, if the index.html is on the server at /angularapp/index.html , the base href should be set to <base href=»/angularapp/»> . More information: https://angular.io/guide/deployment —deploy-url A second parameter that is important is ‘—deploy-url’. This parameter will update the generated url’s for our assets(scripts, css) inside the index.html. To make your assets available at /angularapp/, the deploy url should