I did install mongodb(3.2.18) on my ubuntu server ( 16.04 ) named automationTaskV3 . It work when i'm working on my server, but when i try to connect from my computer it failed only when mongodb is start as a service.
For example if i start mongod this way :
sudo mongod
it will work i can access my dbs But if i do :
sudo service mongod start
it will be impossible for me to connect from my computer. Otherwise the mongod service status seems ok :
sudo service mongod status
● mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2017-11-30 17:34:46 UTC; 8min ago
Docs: https://docs.mongodb.org/manual
Main PID: 17712 (mongod)
CGroup: /system.slice/mongod.service
└─17712 /usr/bin/mongod --quiet --auth --config /etc/mongod.conf
Nov 30 17:34:46 automationTaskV3 systemd[1]: Started High-performance, schema-free document-oriented database. Nov 30 17:38:09 automationTaskV3 systemd[1]: Started High-performance, schema-free document-oriented database. Nov 30 17:39:29 automationTaskV3 systemd[1]: Started High-performance, schema-free document-oriented database.
For the moment i'm trying to access without credentials. Here my mongod.service file :
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
Documentation=https://docs.mongodb.org/manual
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
# file size
LimitFSIZE=infinity
# cpu time
LimitCPU=infinity
# virtual memory size
LimitAS=infinity
# open files
LimitNOFILE=64000
# processes/threads
LimitNPROC=64000
# total threads (user+kernel)
TasksMax=infinity
TasksAccounting=false
# Recommended limits for for mongod as specified in
# http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
[Install]
WantedBy=multi-user.target
and here my mongod.conf file
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1
#processManagement:
Is it possible that's a user right problem ? It seems strange as i follow the steps from thoses tutorials : https://www.linode.com/docs/databases/mongodb/install-mongodb-on-ubuntu-16-04 https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/