4

I created a instance of linux debian on Google Compute Engine.

I Install git, node.js, python and some other things without problems

But when I install mongodb, when finish the installation and the installation try to run mongod, said: [FAIL] Starting database: mongod failed!

I try with: sudo service mongod start and was the same.

I try many thing like:

rm mongodb.lock

Change path of data to / data / db Change permisions to mongodb.log

But nothing work.

When I run /etc/init.d/mongod start

The error is: start-stop-daemon: unable to September gid to 65534 (Operation not permitted)   failed!

Any idea what could be the error?

The mongodb.log is empty so, I can paste here the results of verbose.

Thanks

BrettJ
  • 6,801
  • 1
  • 23
  • 26
cmarrero01
  • 691
  • 7
  • 21

2 Answers2

8

If you are seeing this kind of error log in the apt-get log of mongodb-org:

Package mongodb-org-server is not configured yet.

This maybe related to the GCE debian image bug with the locale https://github.com/andsens/bootstrap-vz/issues/49

So a way around this is to do:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales

The dpkg-reconfigure command will open a dialog for selecting the desires locales. Just select generate all, then choose e_US.UTF-8

Then you can follow the steps in :

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/

As you have probably have done before.

This worked for me in gce debian-7 image today.

Wan B.
  • 18,367
  • 4
  • 54
  • 71
  • I S. Bachtiar, thanks for your reply, the only error that the console show is [FAIL] Starting database: mongod failed!, but, this is only when I run service mongod start. If I run mongod widthout service before, the server of mongodb works perfectly. – cmarrero01 Jun 26 '14 at 11:52
  • hi, unfortunately I can't replicate your problem on gce debian-7. mongod starts straight away after installation (apt-get) as documented, I was able to run sudo service mongod stop/start, its logging properly in /var/log/mongodb/mongod.log file as well. My only suggestion is probably try with a new debian-7 image, set the language locales, follow the installation steps. Im thinking maybe the prior installations to mongodb might interfere. (as you mentioned python, git, nodejs, etc) cheers – Wan B. Jun 28 '14 at 01:10
  • Thank you, sir! You saved my day today. – Gx1sptDTDa May 27 '15 at 14:36
0

I had to download without apt-get install, and install the deb package separatly.

Before install the package, I run this commands..

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales

And that was all, now I have mongodb running in my debian machine.

Thanks.

cmarrero01
  • 691
  • 7
  • 21