Table of contents

Can't connect to Mongo in VM

This is probably happening because your VM didn’t shut down cleanly. You should be running vagrant halt or vagrant suspend but if you had to kill your VM or restart your machine MongoDB won’t be able to connect. You can fix this by deleting your mongod.lock and restarting MongoDB.

$ sudo rm /var/lib/mongodb/mongod.lock
$ sudo service mongodb start
This page was last reviewed . It needs to be reviewed again by the page owner #govuk-2ndline.