[GRLUG] Can't get mongod service to work in Ubuntu

Robert Citek robert.citek at gmail.com
Tue Dec 16 17:45:56 EST 2014


On Tue, Dec 16, 2014 at 2:15 PM, Dave Brondsema <dave at brondsema.net> wrote:
> In Ubuntu I can't seem to get a standard mongod service to run.  I've installed
> it according to http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

Here are the commands I ran:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist
10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongod start

I also am unable to start mongo.  A look through the mongodb logs shows this:

# grep -A 5 -i error  /var/log/mongodb/mongod.log
2014-12-16T14:30:35.269-0800 [initandlisten] ERROR: Insufficient free
space for journal files
2014-12-16T14:30:35.269-0800 [initandlisten] Please make at least
3379MB available in /var/lib/mongodb/journal or use --smallfiles
2014-12-16T14:30:35.269-0800 [initandlisten]
2014-12-16T14:30:35.270-0800 [initandlisten] exception in
initAndListen: 15926 Insufficient free space for journals, terminating
2014-12-16T14:30:35.270-0800 [initandlisten] dbexit:
2014-12-16T14:30:35.270-0800 [initandlisten] shutdown: going to close
listening sockets...

So I expanded my /var/ volume and tried again:

# lvextend -L +5000M -r /dev/systemvg/varlv
# netstat  -plnt | grep mongo
tcp        0      0 127.0.0.1:27017         0.0.0.0:*
LISTEN      2465/mongod

# echo 'show dbs' | mongo
MongoDB shell version: 2.6.6
connecting to: test
admin  (empty)
local  0.078GB
bye

Regards,
- Robert


More information about the grlug mailing list