So I lied. I did manage to get it working by doing mongod and then opening another SSH and doing “mongosh,” which was a big facepalm moment. I assumed Ubuntu servers worked a bit differently than ones with desktop environments. That leads me to another question:
How do I prevent the need to remove the .sock file after a reboot, and how do I troubleshoot systemctl?
× mongod.service - MongoDB Database Server
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2024-06-05 05:50:02 CDT; 1s ago
Duration: 69ms
Docs: https://docs.mongodb.org/manual
Process: 1398 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=14)
Main PID: 1398 (code=exited, status=14)
CPU: 68ms
Jun 05 05:50:02 ubuntu systemd[1]: Started mongod.service - MongoDB Database Server.
Jun 05 05:50:02 ubuntu mongod[1398]: {"t":{"$date":"2024-06-05T10:50:02.242Z"},"s":"I", "c":"CONTROL", "id":748>
Jun 05 05:50:02 ubuntu systemd[1]: mongod.service: Main process exited, code=exited, status=14/n/a
Jun 05 05:50:02 ubuntu systemd[1]: mongod.service: Failed with result 'exit-code'.