Apologies if this has been asked a bunch of times (it has, sorry!) but I can't find a solution that works.
I'm line for line following: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
When I sudo systemctl start mongdb
:
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: core-dump) since Sat 2021-10-02 17:28:51 EEST; 15min ago
Docs: https://docs.mongodb.org/manual
Process: 10714 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=dumped, signal=ILL)
Main PID: 10714 (code=dumped, signal=ILL)
I've updated the mongod.service
file as per [this answer][1]
and in accordance with the answers in that same question, ran the following commands:
chown -R mongodb:mongodb /var/lib/mongodb
chown mongodb:mongodb /tmp/mongodb-27017.sock
though for also ran it for var/log/mongodb
(note that these folders are empty? I created a txt file named mongodb.log
manually, the file itself is empty and there are no mongo related files in tmp
, so the latter command of course failed
Given some of these folders are missing/empty, I ran
mk@Swankey:~$ sudo mongod --repair
Illegal instruction
So following [this question][2] I tried the following commands, nothing has changed, still at square one here.
:~$ sudo rm -r /var/lib/mongodb
:~$ sudo mkdir -p /var/lib/mongodb/
:~$ sudo chown -R mongodb:mongodb /var/lib/mongodb/
:~$ sudo mkdir -p /var/log/mongodb/
:~$ sudo chown -R mongodb:mongodb /var/log/mongodb/
:~$ sudo systemctl restart mongod
:~$ sudo systemctl status mongod
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: e
Active: failed (Result: core-dump) since Sat 2021-10-02 17:18:09 EEST; 7s ago
Docs: https://docs.mongodb.org/manual
Process: 10657 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=dumpe
Main PID: 10657 (code=dumped, signal=ILL)
PS I have ran purge mongo*
and reinstalled multiple times I'm at a loss here
Similar to the second question thread linked, when I install the package mongodb
(as opposed to mongodb-org
the service will run? I'd prefer to follow the official documentation hence using mongodb-org
[1]: https://askubuntu.com/a/884652
[2]: https://askubuntu.com/questions/929198/fail-to-start-mongod-service-but-mongodb-service
[3]: https://stackoverflow.com/questions/29554521/uninstall-mongodb-from-ubuntu