When I write mongod
in the terminal It gives me this error.
{"t":{"$date":"2024-06-18T07:13:44.518+04: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":"2024-06-18T07:13:44.519+04:00"},"s":"I", "c":"NETWORK", "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":21},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":21},"outgoing":{"minWireVersion":6,"maxWireVersion":21},"isInternalClient":true}}}
{"t":{"$date":"2024-06-18T07:13:44.519+04:00"},"s":"I", "c":"NETWORK", "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."}
{"t":{"$date":"2024-06-18T07:13:44.520+04:00"},"s":"I", "c":"REPL", "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
{"t":{"$date":"2024-06-18T07:13:44.520+04:00"},"s":"I", "c":"REPL", "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2024-06-18T07:13:44.520+04:00"},"s":"I", "c":"CONTROL", "id":5945603, "ctx":"main","msg":"Multi threading initialized"}
{"t":{"$date":"2024-06-18T07:13:44.520+04:00"},"s":"I", "c":"TENANT_M", "id":7091600, "ctx":"main","msg":"Starting TenantMigrationAccessBlockerRegistry"}
{"t":{"$date":"2024-06-18T07:13:44.521+04:00"},"s":"I", "c":"CONTROL", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":15524,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"matrix"}}
{"t":{"$date":"2024-06-18T07:13:44.521+04:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"7.0.11","gitVersion":"f451220f0df2b9dfe073f1521837f8ec5c208a8c","openSSLVersion":"OpenSSL 1.1.1w 11 Sep 2023","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2004","distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2024-06-18T07:13:44.521+04:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"NAME=\"Arch Linux\"","version":"Kernel 6.9.4-arch1-1"}}}
{"t":{"$date":"2024-06-18T07:13:44.521+04:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{}}}
{"t":{"$date":"2024-06-18T07:13:44.521+04:00"},"s":"E", "c":"NETWORK", "id":23024, "ctx":"initandlisten","msg":"Failed to unlink socket file","attr":{"path":"/tmp/mongodb-27017.sock","error":"Operation not permitted"}}
{"t":{"$date":"2024-06-18T07:13:44.521+04:00"},"s":"F", "c":"ASSERT", "id":23091, "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":40486,"file":"src/mongo/transport/asio/asio_transport_layer.cpp","line":1202}}
{"t":{"$date":"2024-06-18T07:13:44.521+04:00"},"s":"F", "c":"ASSERT", "id":23092, "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}
I couldn't do anything, bacause I am new to databases and arch, Also I couldn't find any specific solution to this problem.
This issue seems to be related to the sockets that mongodb requires. By default mongodb, runs on port 27017, which it currently isn't able to.
This is usually happens if you don't run the command with sudo
. It could also happen if port 27107 is already blocked, perhaps by another instance of mongodb.
However, because the error says {"path":"/tmp/mongodb-27017.sock","error":"Operation not permitted"}
, it's probably an issue with permissions.