Issues starting MongoDB on MacOS

The error message (the line with "s":"E") indicates that the file /tmp/mongodb-27917.sock cannot be removed (cannot unlink).

It means that it is own by a user other than the current user. Most likely a previous version was started as root. May be it is still running. Check that before using sudo to remove the file.

Do not

to check the status of mongod when you start mongod manually like you did.

To see if the socket is still being listen to, use

ss -tlnp | grep [2]7017

To see if a mongod is running, use

ps -aef | gre[ [m]ongod

Both commands might be different on MacOS.

You did not get an error for it, but I was under the impression that you could not use /data/db for mongod on MacOS.