i get the same issue as
MongoDB loads but breaks, returning status=14
namely:
mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2021-12-17 21:26:34 EET; 8s ago
Docs: https://docs.mongodb.org/manual
Process: 7251 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=14)
Main PID: 7251 (code=exited, status=14)
but executing the following doesnt help as suggested:
chown -R mongodb:mongodb /var/lib/mongodb
chown mongodb:mongodb /tmp/mongodb-27017.sock
sudo service mongod restart
when i try to execute the commands i get operation not permitted like so:
chown: changing ownership of '/var/lib/mongodb/WiredTiger.wt': Operation not permitted
chown: changing ownership of '/var/lib/mongodb/collection-4--2069339347692912303.wt': Operation not permitted
chown: changing ownership of '/var/lib/mongodb/index-3--2069339347692912303.wt': Operation not permitted
chown: changing ownership of '/var/lib/mongodb/WiredTigerLAS.wt': Operation not permitted
etc
when i run it with sudo it just has no effect
edit 1:
I tried uninstalling and reinstalling it but it didnt work.
Then i tried uninstalling it following the steps in the documentation and reinstalling it and it worked.
The problem was that some documents were left behind in the first case.
edit 2:
broken again, no reason tried to initiate mongosh and just couldnt start. trying the same steps as before but nothing