0

i have a problem with mongod

{"t":{"$date":"2023-05-23T07:38:43.017-04: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":"2023-05-23T07:38:43.017-04:00"},"s":"F",  "c":"ASSERT",   "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":40486,"file":"src/mongo/transport/transport_layer_asio.cpp","line":1126}}
{"t":{"$date":"2023-05-23T07:38:43.017-04:00"},"s":"F",  "c":"ASSERT",   "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}

this was my output executing

ls -lat /tmp/mongodb-27017.sock 
srwx------  1 root  wheel  0 May 23 07:07 /tmp/mongodb-27017.sock

After execute

sudo rm /tmp/mongodb-27017.sock

All this error's gone. But a new one cames and is:

{"t":{"$date":"2023-05-23T07:50:58.292-04:00"},"s":"E",  "c":"CONTROL",  "id":20568,   "ctx":"initandlisten","msg":"Error setting up listener","attr":{"error":{"code":9001,"codeName":"SocketException","errmsg":"Address already in use"}}}

once the mongod is shutdown, when it starts it goes back to the previous one (as when the socket file had not been deleted)

Thank you all~

Lex
  • 567
  • 7
  • 7
  • Looks like to try to start `mongod` more than once. Most likely it is installed as a service and start automatically at boot time. – Wernfried Domscheit May 23 '23 at 13:23
  • Well, after deleting the socket file, kill mongodb process, (I only had one) and starting again, now it throws me a new error.. now the others are gone, but.. {"t":{"$date":"2023-05-23T11:39:49.837-04:00"},"s":"E", "c":"CONTROL", "id":20557, "ctx":"initandlisten","msg":"DBException in initAndListen, terminating","attr":{"error":"NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the 'storage.dbPath' option in the configuration file."}} – johnmayerfan May 23 '23 at 15:43
  • You should not kill it, you should stop it properly. The error message is quite clear. See also https://stackoverflow.com/a/67043090/3027266 – Wernfried Domscheit May 23 '23 at 18:20

0 Answers0