hi tim, thanks for your reply!
i was under the impression the server was running for sure since i ran the
mongod command and the
mongo command afterwards where i was able to create collections and add documents in the shell.
but apparently that's not the same as running the service since
systemctl status mongod gives me the following output:
● mongod.service - MongoDB Database Server
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2019-08-15 17:53:42 CEST; 1min 29s ago
Docs:
https://docs.mongodb.org/manual
Process: 2826 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=2)
Aug 15 17:53:42 BusinessVM systemd[1]: Starting MongoDB Database Server...
Aug 15 17:53:42 BusinessVM systemd[1]: mongod.service: control process exited, code=exited status=2
Aug 15 17:53:42 BusinessVM systemd[1]: Failed to start MongoDB Database Server.
Aug 15 17:53:42 BusinessVM systemd[1]: Unit mongod.service entered failed state.
Aug 15 17:53:42 BusinessVM systemd[1]: mongod.service failed.
when i googled these messages i found the 2 most common reasons are either a faulty /etc/mongod.conf file or the user not having ownership / access rights over the dbpath folders.
i could not find any issue with the mongod file, and the dbpath folders (/data/db) belong to root. but since i attempt to start the service as root this should not be an issue.
my /etc/mongod.conf file looks as follows:
# mongod.conf
# for documentation of all options, see:
#
http://docs.mongodb.org/manual/reference/configuration-options/
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# Where and how to store data.
storage:
dbPath: /data/db
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# how the process runs
processManagement:
fork: true # fork and run in background
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
timeZoneInfo: /usr/share/zoneinfo
# network interfaces
net:
port: 27017
# bindIp: 127.0.0.1 # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.
bindIp: 0.0.0.0,::
#security:
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options
#auditLog:
#snmp:
do you have any more ideas what i might try?