Failed to unlink socket file with mongodb ownership on azure instance


i am trying to run a mongodb community edition(db version v5.0.9) on an azure vm instance (Linux 18.04 LTS). The installation was successful (although i had to manually create the mongod.conf file).

However while launching there is a problem with the socket file:

The ownership of this socket file is correct to mongodb:
0 srwx------ 1 mongodb mongodb 0 Jun 29 12:54 /tmp/mongodb-27017.sock

I´ve also tried with deleting this file and restart the systemctl, didn´t help. Neither the restart of the instance itself.

Can someone help me with this?
Thank you in advance

Could you provide the contents of the config file and how you started the mongodb process?

Thank you for the replay. Here is the content of the config file, i took it from the official recommendation of minimal version :slight_smile:

   fork: true
   bindIp: localhost
   port: 27017
   dbPath: /var/lib/mongo
   destination: file
   path: "/var/log/mongodb/mongod.log"
   logAppend: true
      enabled: true

And i start the process with sudo systemctl start mongod

I just reinstalled mongodb v5 after i successfully installed and launched v4.4 in another instance. Now it works smoothly with an automatically generated config file under /etc. So i assume there was something wrong with the installation although it showed successful.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.