When starting mongodb, I get error: 14
, looking at the mongodb.log
prompts MongoDB – Unable to unlink socket file /tmp/mongodb-27017
.
Check /tmp/mongodb-27017.sock
and find that the owner is root
.
Delete the /tmp/mongodb-27017.sock
file and restart the mongod process. Check the /tmp/mongodb-27017.sock
permissions again and change the ownership to the "mongodb" user.
Also started successfully
mongodb.log
1
, 100
are mostly incorrect data path and log path specified in the configuration file, the data path needs to be created in advance, it is a directory, the log path also needs to be created in advance, it is a file.