Skip to content

Instantly share code, notes, and snippets.

@osmangoninahid
Forked from shudarshon/mongodb_issue_solve
Created August 4, 2017 09:11
Show Gist options
  • Save osmangoninahid/290772ef8d7c910c05fe4e48ef29ead0 to your computer and use it in GitHub Desktop.
Save osmangoninahid/290772ef8d7c910c05fe4e48ef29ead0 to your computer and use it in GitHub Desktop.
This file consists solutions of some common mongodb problems.
#mongodb running problem in ubuntu 16.04
#socket permission deny
sudo chown mongodb:mongodb /tmp/mongodb-27017.sock
sudo systemctl restart mongod.service
mongo
#mongodb lock due to iptable conflict
sudo rm /var/lib/mongodb/mongod.lock
sudo systemctl restart mongod.service
#create datapath for mongodb and set appropriate permission.
#set this datapath in the dbPath field of /etc/mongod.conf
sudo mkdir -p /var/lib/mongodb
sudo chmod 0755 /var/lib/mongodb
sudo chown -R mongodb:mongodb /var/lib/mongodb
sudo systemctl restart mongod.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment