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

在启动MongoDB时遇到错误:Failed to unlink socket file /tmp/mongodb-27017.sock Operation not permitted。问题由socket文件权限引起,解决方案是删除该文件并以正确的用户身份重启MongoDB服务。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

2019-09-05T14:59:25.718+0800 W -        [initandlisten] Detected unclean shutdown - /data/mongodb/data/mongod.lock is not empty.
2019-09-05T14:59:25.718+0800 E NETWORK  [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock Operation not permitted
2019-09-05T14:59:25.718+0800 F -        [initandlisten] Fatal Assertion 40486 at src/mongo/transport/transport_layer_asio.cpp 171
 

2016-07-12T16:52:28.912+0800 E NETWORK  [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted
2016-07-12T16:52:28.912+0800 I -        [initandlisten] Fatal Assertion 28578
2016-07-12T16:52:28.912+0800 I -        [initandlisten] 

从红色的提示可以看出是因为/tmp/mongodb-27017.sock这个文件没有操作权限。

rm -rf  /tmp/mongodb-27017.sock

 

原因分析:

查看该文件情况如下:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值