MongoDB服务器断开连接

时间:2016-08-16 08:07:51

标签: mongodb

在终端(Ubuntu 16.04 LTS)中运行mongod时出现以下错误。

2016-08-16T13:32:14.690+0530 I CONTROL  [initandlisten] MongoDB starting: pid=4810 port=27017 dbpath=/data/db 64-bit host=Rohan
2016-08-16T13:32:14.690+0530 I CONTROL  [initandlisten] db version v3.2.8
2016-08-16T13:32:14.690+0530 I CONTROL  [initandlisten] git version:ed70e33130c977bda0024c125b56d159573dbaf0
2016-08-16T13:32:14.690+0530 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2g-fips  1 Mar 2016
2016-08-16T13:32:14.690+0530 I CONTROL  [initandlisten] allocator: tcmalloc
2016-08-16T13:32:14.690+0530 I CONTROL  [initandlisten] modules: none
2016-08-16T13:32:14.690+0530 I CONTROL  [initandlisten] build environment:
2016-08-16T13:32:14.690+0530 I CONTROL  [initandlisten]     distmod: ubuntu1604
2016-08-16T13:32:14.690+0530 I CONTROL  [initandlisten]     distarch: x86_64
2016-08-16T13:32:14.690+0530 I CONTROL  [initandlisten]     target_arch: x86_64
2016-08-16T13:32:14.690+0530 I CONTROL  [initandlisten] options: {}
2016-08-16T13:32:14.717+0530 E NETWORK  [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted
2016-08-16T13:32:14.717+0530 I -        [initandlisten] Fatal Assertion 28578
2016-08-16T13:32:14.717+0530 I -        [initandlisten] 

***aborting after fassert() failure

为什么会这样?

1 个答案:

答案 0 :(得分:1)

我自己修复了这个问题,删除了mongodb-27017.sock文件。删除此文件后我运行了该服务,运行正常。但是,我仍然不确定问题的根本原因。命令ls - lat /tmp/mongodb-27017.sock的输出现在是

srwx ------ 1 mongodb nogroup 0 Apr 23 06:24 /tmp/mongodb-27017.sock