I managed to break what was a stable instance of Mongo running on a Ubuntu server.
It seems that the service is not starting using the correct configuration.
Running mongod
gives me the following:
2016-11-01T16:06:27.853+0000 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
and therefore, when I try to start the mongo shell, I get:
2016-11-01T16:06:48.476+0000 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
The configuration file in the /etc/mongod.conf file indicates the dbpath path as /var/lib/mongod
, which has a bunch of dbses already there (which worked!) And the port as 3306. This is clearly not what the error messages above indicate .
I tried to run mongod with this configuration file using --config /etc/mongod.conf
, but I get the following:
2016-11-01T16:09:12.530+0000 F CONTROL Failed global initialization: FileNotOpen Failed to open "/var/log/mongodb/mongod.log"
Any ideas on what steps I can take to restore the original service on the right dbpath and port?
There is a file with upstart in /etc/init/mongod.conf
, but server reboot had no effect.
Thanks.
source share