I\'ve just installed MongoDB (standard Ubuntu build, not the latest stable) and for some reason I can\'t connect:
Mon Feb 6 03:11:22 Error: couldn\'t connect to
I had the same issue just because the silly mistake.
first remove mongodb file which is fine
rm -rf /tmp/mongodb-27017.sock
where I did mistake inside the /etc/mongod.conf
# network interfaces
net:
port: 27017
#bindIp: 127.0.0.1
bindIp: privateIp
instead of
net:
port: 27017
bindIp: 10.1.2.4
for listen to all available ips
bindIp: [127.0.0.1,10.128.0.2]
restart the mongodb
sudo service mongod start
hopefully this answer help for someone