1

I have a functional installation of mongo 2.6.6 running on my debian wheezy 7.7 server. I can run mongo and interact with the databases and collections within. It seems to operate without a problem. But every time I run a software update via:

sudo apt-get update
sudo apt-get upgrade

I get the following output:

Setting up mongodb-org-server (2.6.6) ...
[FAIL] Starting database: mongod failed!
invoke-rc.d: initscript mongod, action "start" failed.
dpkg: error processing mongodb-org-server (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mongodb-org:
 mongodb-org depends on mongodb-org-server; however:
  Package mongodb-org-server is not configured yet.

dpkg: error processing mongodb-org (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mongodb-org-server
 mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)

Searching for solutions to resolve this issue led me to service mongod start on debian doesnt work. I exported those environment variables and retried, but the errors persist. A bit more information:

...:~$ mongod --version
db version v2.6.6
2014-12-21T10:55:55.685-0600 git version: 608e8bc319627693b04cc7da29ecc300a5f45a1f
...:~$ mongodb --version
bash: mongodb: command not found
...:~$ sudo service mongod start
[FAIL] Starting database: mongod failed!
...:~$ sudo service mongod stop
[ ok ] Stopping database: mongod apparently not running.
...:~$ sudo service mongodb start
[ ok ] Starting database: mongodb apparently already running.
...:~$ sudo service mongodb stop
[ ok ] Stopping database: mongodb.
Community
  • 1
  • 1
mightypile
  • 7,589
  • 3
  • 37
  • 42

1 Answers1

0

Unfortunately, I can't address whether the answer at service mongod start on debian doesnt work addressed the issue or if it was simply my stopping the server first.

After stopping both the mongod and mongodb services, then updating and upgrading, things went fine with no errors. The one thing I noticed was that I was running the "mongodb" service, but not the "mongod" service when I got the errors. After a successful update/upgrade, apt-get started the "mongod" service.

So, I'd recommend that if you experience this error, manually stop your databases then let the updater have its way with them. Mine are now working fine.

Community
  • 1
  • 1
mightypile
  • 7,589
  • 3
  • 37
  • 42