Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to install mongodb on Ubuntu EC2 instance. However, I am confused about what user the DB would run as:

If I follow: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

Then it says : "mongodb"

If I follow : http://docs.mongodb.org/ecosystem/tutorial/install-mongodb-on-amazon-ec2/

It says : "mongod"

I think it leads me to inconsistent state. There was a process running is ps output for mongodb but sudo service mongodb status or stop says: Unknown Instance.

What should be the user of mongodb?

share|improve this question

1 Answer 1

The reason for the difference is that the articles describe two different versions of Linux. For the install MongoDB on Ubuntu tutorial you are talking about Ubuntu. If you are following the install MongoDB on Amazon EC2 tutorial then you are talking about Amazon Linux.

Ubuntu uses deb/apt based packages (which gets you the mongodb user) and Amazon Linux uses rpm/yum based packages (which gets you the mongod user). You are using Ubuntu according to your question, hence the relevant user for you is "mongodb".

I would point out though, that this likely has nothing to do with the issue you are having with the service status or shutting it down. That's more likely some sort of problem with the wrong PID being referenced by upstart, or possibly an issue with MongoDB starting in the first place (check your logs).

I would recommend:

  1. Stop MongoDB manually (log in with the mongo shell and issue the shutdown command)
  2. Start the service again, with sudo service start mongodb
  3. Verify that it started correctly (logs, login with the mongoshell again)
  4. Re-check with sudo service mongodb status
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.