Failed to unlink socket file

Hi,

I have to put in my command line

sudo pkill -f mongod

before having my mongod running…

and I receive in end…

    2020-04-19T15:46:07.509+0200 I  NETWORK  [listener] Listening on /tmp/mongodb-27017.sock
2020-04-19T15:46:07.509+0200 I  NETWORK  [listener] Listening on 127.0.0.1
2020-04-19T15:46:07.509+0200 I  NETWORK  [listener] waiting for connections on port 27017
2020-04-19T15:46:07.509+0200 I  SHARDING [LogicalSessionCacheReap] Marking collection config.transactions as collection version: <unsharded>
2020-04-19T15:46:08.000+0200 I  SHARDING [ftdc] Marking collection local.oplog.rs as collection version: <unsharded>

if not, i receive

Failed to unlink socket file /tmp/mongodb-27017.sock Operation not permitted

The solution of get right do not work

sudo chown `whoami` /tmp/mongodb-27017.sock
1 Like

Hello!
I have the same problem. Have you solved it? Could you help me?

I desperately need help with this too

Hi @Koko_Dev and welcome to the MongoDB community forums.

It’s best to open a new thread rather than use one that’s several years old with no answers, even if you’re having the same issue.

Please supply answers to the following so we can better help you:

  • Can you show the error message that you’re getting?
  • What version of MongoDB are you running and on what operating system?
  • How did you install MongoDB and how do you start the process?
  • What are the results of running ls -alh /tmp/mongodb-27017.sock?
1 Like