I knew I was a little rusty, so the filename is actually
mongod.conf. I just spun up a new Droplet and did a quick install of MongoDB 3.4 to confirm.
If the changes you’ve posted are from your the same configuration file, then you definitely shouldn’t see
* showing up as that pretty much means MongoDB is listening on
0.0.0.0 which is short for any available IP.
To confirm, I ran the same command on my quick install:
lsof -iTCP -sTCP:LISTEN -P
… which results in:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sshd 1743 root 3u IPv4 16514 0t0 TCP *:22 (LISTEN)
sshd 1743 root 4u IPv6 16516 0t0 TCP *:22 (LISTEN)
mongod 4630 mongodb 7u IPv4 25998 0t0 TCP localhost:27017 (LISTEN)
If you’ve not already, please try running:
service mongod restart
If that doesn’t work, please provide more details on your installation, more specifically how was MongoDB installed?
All I did to install MongoDB (3.4 on Ubuntu 16.04) on my end was run:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongod start