Installation in macOS Catalina problem

Hello, I’m starting to use MongoDB Community server with python…

I try to install it on macOS Catalina, but I met some problems… I try to install it various times, I didn’t succeed.

his is the error that comes back to me when I type “mongod” in the terminal:

*{"t":{"$date":"2020-11-12T17:10:10.293+01:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}*

*{"t":{"$date":"2020-11-12T17:10:10.298+01:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}*

*{"t":{"$date":"2020-11-12T17:10:10.299+01:00"},"s":"I", "c":"NETWORK", "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}*

*{"t":{"$date":"2020-11-12T17:10:10.299+01:00"},"s":"I", "c":"STORAGE", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":30094,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"Cristianos-MacBook-Air.local"}}*

*{"t":{"$date":"2020-11-12T17:10:10.299+01:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.1","gitVersion":"ad91a93a5a31e175f5cbf8c69561e788bbc55ce1","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}*

*{"t":{"$date":"2020-11-12T17:10:10.299+01:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"19.6.0"}}}*

*{"t":{"$date":"2020-11-12T17:10:10.299+01:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{}}}*

*{"t":{"$date":"2020-11-12T17:10:10.300+01:00"},"s":"E", "c":"NETWORK", "id":23024, "ctx":"initandlisten","msg":"Failed to unlink socket file","attr":{"path":"/tmp/mongodb-27017.sock","error":"Permission denied"}}*

*{"t":{"$date":"2020-11-12T17:10:10.300+01:00"},"s":"F", "c":"-", "id":23091, "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":40486,"file":"src/mongo/transport/transport_layer_asio.cpp","line":919}}*

*{"t":{"$date":"2020-11-12T17:10:10.300+01:00"},"s":"F", "c":"-", "id":23092, "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}*

After modifying the dpath with the path, “/ System / Volumes / Data / data / db”, obviously having created the folder, “/ data / db”.

could you help me, I also accept alternative installations.

Thank you.

It is failing with sock file issue.Seeems to be permission issues
msg":“Failed to unlink socket file”,“attr”:{“path”:“/tmp/mongodb-27017.sock”,“error”:“Permission denied”}}*
As which user you started mongod?
Try to remove the file and start
May be it was created with a different user in previous run

sudo mongod perhaps

1 Like

Welcome to the community @Cristiano_battin_i!

How did you install MongoDB? I recommend following the official guide to Installing MongoDB on macOS via brew.

This will set up default directory paths with the expected permissions as well as a brew services definition that will work fine with Catalina.

For more information, see related discussion on Installation issues for MongoDB on Mac OS Catalina - #7 by Stennie_X.

There is no need to run mongod with sudo (or as the root user). Per the general best practice of Principle of least privilege, the mongod process only needs privileges to write to relevant directories including the configured dbPath and log path. Typically there is a specific user & group ID used by the mongod process (and created for you using the official install package).

Regards,
Stennie

1 Like

Thanks, @Stennie , for clarifying.