admin管理员组

文章数量:1197406

I called shutdown command inside container (with docker exec -it **** bash) and after that container keeps restarting and not starting.

In the logs It says;

   {"t":{"$date":"2025-01-23T02:24:58.606+00: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"}}

I can't access container since it's not started, and there is no /tmp/mongodb-27017.sock file in local system. so stuck here with no solution.

I've tried to start and stop container normally restarted mongodb service tried to start with different entrypoint but couldn't find a way to delete that .sock file.

With docker inspect, I found the volume of the container and tried to run it with a different name. Container started but there was only default databases so I was afraid.

Any recommends would be great. Thank you.

本文标签: dockerMongoDB container not starting and cant find tmpmongodb27017sockStack Overflow