mongodb service failed to start

191 views
Skip to first unread message

Yanhong Wu

unread,
May 17, 2013, 1:23:50 PM5/17/13
to mongod...@googlegroups.com
sudo service mongodb start 

sudo start mongodb 

sudo /etc/init.d/mongodb start 

All above three script failed on ubuntu 12.04 system after a crash due to namespaces overwhelmed in a replicaset. 

I stopped relicaset, changed nssize, repaired the db, and restored replicaset then. But from that I couldn't use service to start mongodb. 

Though, mongodb --config /etc/mongodb.conf works well

I tried to change dbpath and log file owner to mongodb, but not working as well. I changed back to root since manual didn't mention changing owner. 



--
wyh


Bernie Hackett

unread,
May 17, 2013, 10:18:40 PM5/17/13
to mongod...@googlegroups.com
When you say it won't start, what do you mean? Does mongod start up and immediately shut down again? If so, are there any errors in the log?


--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
 
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Yanhong Wu

unread,
May 18, 2013, 9:05:03 AM5/18/13
to mongod...@googlegroups.com
no, nothing could be read from log.
--
wyh


Russell Bateman

unread,
May 18, 2013, 9:52:40 AM5/18/13
to mongod...@googlegroups.com
Typically, the log should tell you, in this case, that there's a lock file present. You remove that lock file and restart. At least, this is what's happened to me many times. I'd give more details, but I'm in a hurry and thought this quick note might help even if it's not complete.

Best of luck.

Yanhong Wu

unread,
May 18, 2013, 12:02:41 PM5/18/13
to mongod...@googlegroups.com
thanks. Though I've tried removing lock file, no luck is with me. 

I use numactl mongod --config /etc/mongodb.conf and kill mongodb process to start or stop mongodb. 

Luckily I don't need to start the server very often, so I'm not in a hurry. 

Just be curious what was happening.  

Bernie Hackett

unread,
May 18, 2013, 12:29:30 PM5/18/13
to mongod...@googlegroups.com
To help you solve this problem we need more information. When you try to start mongod using the three methods in your original post, how do you know it doesn't start? Is there an error message of some sort? Just saying "it failed to start" doesn't give us anything to work with.

Yanhong Wu

unread,
May 19, 2013, 2:38:43 AM5/19/13
to mongod...@googlegroups.com
 
After executing the command, I found : 

Rather than invoking init scripts through /etc/init.d, 
use the service utility, e.g. service mongodb start 

then immediately I grepped  ps -ef |grep mongodb, but no mongodb process could be found.

If tail -f /var/log/mongodb/mongodb.log, nothing had been written in log. Log was still at last time db exiting. I checked the log time, which was definitely the last time exiting, not by invoking /etc/init.d/mongodb 

And I cann't stop mongodb as well via invoking service stop or the other two commands. 



Russell Bateman

unread,
May 19, 2013, 9:52:48 AM5/19/13
to mongod...@googlegroups.com
You realize that the name of the process is 'mongod' and not 'mongodb'. don't you?

Yanhong Wu

unread,
May 21, 2013, 11:00:04 AM5/21/13
to mongod...@googlegroups.com
sorry for the mistake. I actually grepped only "mong". I'm sure about it.  Because of no log had been written to the log file, the process couldn't be initialized it. 

It's fine for me to start mongodb via mongd --config=/path/to/config_file as we don't start the server frequently. 

I'd like to have more tests on my test servers as the production server is running now. 
Reply all
Reply to author
Forward
0 new messages