Skip to content

Instantly share code, notes, and snippets.

@shudarshon
Created July 9, 2017 17:00
Show Gist options
  • Save shudarshon/96a83640692915f014f3f9088fa6159f to your computer and use it in GitHub Desktop.
Save shudarshon/96a83640692915f014f3f9088fa6159f 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
@osmangoninahid
Copy link

Thanks for sharing <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment