0

I have recently updated mongodb on my AWS linux server with

sudo yum install -y mongodb-org

The result was that the mongod command would no longer successfully launch the mongodb server, because I would get an error saying the directory that it does not find the data directory /data/db/, even though in mongodb.conf if says:

storage:
  dbPath: /var/lib/mongo

and in my init.d/mongod it points to that config file: CONFIGFILE="/etc/mongod.conf"

So I now have the following questions:

  1. Why do I now have to manually start mongod with mongod --dbpath /var/lib/mongo. Starting it without the -dbpath option results it in ignoring that path that is stated in /etc/mongod.conf. Why?
  2. What can I do to make sure that on a reboot it will look in the right data directory again, as it did before I did the update?
  3. Should I have done something differently when updating instead of sudo yum install -y mongodb-org?
Tim
  • 31,888
  • 7
  • 52
  • 78
Nickpick
  • 145
  • 8
  • "yum install" installs new software, it doesn't update it. Can you do "yum list installed | grep mongo" to see if you have multiple versions installed? – Tim Jan 29 '17 at 18:57
  • Repository 'mongodb-org-3.0': Error parsing config: Error parsing "gpgcheck = '9'": invalid boolean value mongodb-org.x86_64 3.2.11-1.amzn1 mongodb-org-3.2 mongodb-org-mongos.x86_64 3.2.11-1.amzn1 mongodb-org-3.2 mongodb-org-server.x86_64 3.2.11-1.amzn1 mongodb-org-3.2 mongodb-org-shell.x86_64 3.2.11-1.amzn1 mongodb-org-3.2 mongodb-org-tools.x86_64 3.2.11-1.amzn1 mongodb-org-3.2 – Nickpick Jan 29 '17 at 19:14
  • Why on earth are you using Amazon Linux? – Michael Hampton Jan 29 '17 at 19:56
  • It's free tier, but I don't think that's an issue – Nickpick Jan 29 '17 at 19:59
  • @Tim that's not entirely true. `yum install foo` will update foo if it's already installed an update is available. – jordanm Jan 29 '17 at 20:25
  • Any suggestions what could be the cause? – Nickpick Feb 01 '17 at 19:59

0 Answers0