Cannot restart mongodb on Ubuntu 10.04

1,174 views
Skip to first unread message

Andrei Zmievski

unread,
Oct 15, 2010, 7:34:32 PM10/15/10
to mongodb-user
Just installed mongodb-stable (from 10gen repo) on Ubuntu 10.04. I can
start the service fine with 'service mongodb start', but neither
'service mongodb status' nor 'service mongodb restart' seem to work:

root@db01:/var/log$ service mongodb status
mongodb stop/waiting
root@db01:/var/log$ service mongodb restart
restart: Unknown instance:
root@db01:/var/log$ ps ax G mongodb
17605 ? Sl 0:00 /usr/bin/mongod --config /etc/mongodb.conf

The config is pretty bare:

dbpath = /data/mongo/db
logpath = /data/mongo/logs/mongodb.log
logappend = true
fork = true
directoryperdb = true
rest = true

Scott Hernandez

unread,
Oct 15, 2010, 7:50:30 PM10/15/10
to mongod...@googlegroups.com
What is at the end of the mongodb log?

It probably says you should delete your lock file and repair since it
wasn't a clean shutdown. Or not... you tell me.

> --
> 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.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

Alvin Richards

unread,
Oct 15, 2010, 7:53:28 PM10/15/10
to mongodb-user
Humm... I have just tried this on 10.04 with the latest stable, and I
get the following

alvin-ubuntu910:HarpoonGWTClientMK9b$ ps -ef | grep mongo
oracle 9979 1938 0 16:47 pts/0 00:00:00 grep --color=auto
mongo

alvin-ubuntu910:HarpoonGWTClientMK9b$ sudo service mongodb start
mongodb start/running, process 9987

alvin-ubuntu910:HarpoonGWTClientMK9b$ ps -ef | grep mongo
mongodb 9987 1 1 16:47 ? 00:00:00 /usr/bin/mongod --
config /etc/mongodb.conf

alvin-ubuntu910:HarpoonGWTClientMK9b$ sudo service mongodb restart
mongodb start/running, process 10004

alvin-ubuntu910:HarpoonGWTClientMK9b$ ps -ef | grep mongo
mongodb 10004 1 1 16:48 ? 00:00:00 /usr/bin/mongod --
config /etc/mongodb.conf

alvin-ubuntu910:HarpoonGWTClientMK9b$ sudo service mongodb status
mongodb start/running, process 10004

So its looks like all things seem "normal".

My config is just this

dbpath=/var/lib/mongodb
logpath=/var/log/mongodb/mongodb.log
logappend=true

Let me try with your config options.

-Alvin

Alvin Richards

unread,
Oct 15, 2010, 7:55:34 PM10/15/10
to mongodb-user
Ok, if you remove the following you will now be ok

fork = true

Feel free to add a bug into Jira for this!

-Alvin

Tim Hawkins

unread,
Oct 15, 2010, 8:10:10 PM10/15/10
to mongod...@googlegroups.com
Have you checked the logs to see if its is not starting up because of an existing pid file. ?

Generally if i have problems starting up mongodb on ubuntu its because there is a pid file already on the drive.

Reply all
Reply to author
Forward
0 new messages