Mongo连接在Ubunt 18.04上被拒绝

时间:2018-07-21 00:32:19

标签: mongodb ubuntu

我无法在ubuntu上连接到mongodb,昨天运行正常。我已经尝试了一些命令来解决它,但是它没有帮助,这就是我尝试过的:

mkdir -p /data/db
sudo rm /var/lib/mongodb/mongod.lock 
mongo -repair
sudo service mongodb start 
mongo

日志:

tail -30 /var/log/mongodb/mongodb.log
2018-07-17T23:23:57.394-0300 I NETWORK  [conn20] end connection 127.0.0.1:35146 (3 connections now open)
2018-07-17T23:24:05.162-0300 I NETWORK  [conn19] end connection 127.0.0.1:35144 (2 connections now open)
2018-07-17T23:24:05.629-0300 I NETWORK  [conn16] end connection 127.0.0.1:35116 (1 connection now open)
2018-07-17T23:24:15.416-0300 I NETWORK  [listener] connection accepted from 127.0.0.1:35150 #21 (2 connections now open)
2018-07-17T23:24:15.416-0300 I NETWORK  [conn21] received client metadata from 127.0.0.1:35150 conn: { driver: { name: "PyMongo", version: "3.7.1" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "4.15.0-23-generic" }, platform: "CPython 3.6.5.final.0" }
2018-07-17T23:24:16.527-0300 I NETWORK  [listener] connection accepted from 127.0.0.1:35154 #22 (3 connections now open)
2018-07-17T23:24:16.528-0300 I NETWORK  [conn22] received client metadata from 127.0.0.1:35154 conn: { driver: { name: "PyMongo", version: "3.7.1" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "4.15.0-23-generic" }, platform: "CPython 3.6.5.final.0" }
2018-07-17T23:24:20.684-0300 I NETWORK  [listener] connection accepted from 127.0.0.1:35162 #23 (4 connections now open)
2018-07-17T23:24:20.685-0300 I NETWORK  [conn23] received client metadata from 127.0.0.1:35162 conn: { driver: { name: "PyMongo", version: "3.7.1" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "4.15.0-23-generic" }, platform: "CPython 3.6.5.final.0" }
2018-07-17T23:24:37.070-0300 I NETWORK  [conn23] end connection 127.0.0.1:35162 (3 connections now open)
2018-07-17T23:24:37.070-0300 I NETWORK  [conn22] end connection 127.0.0.1:35154 (2 connections now open)
2018-07-17T23:24:38.463-0300 I NETWORK  [conn21] end connection 127.0.0.1:35150 (1 connection now open)
2018-07-17T23:24:41.590-0300 I NETWORK  [listener] connection accepted from 127.0.0.1:35172 #24 (2 connections now open)
2018-07-17T23:24:41.591-0300 I NETWORK  [conn24] received client metadata from 127.0.0.1:35172 conn: { driver: { name: "PyMongo", version: "3.7.1" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "4.15.0-23-generic" }, platform: "CPython 3.6.5.final.0" }
2018-07-17T23:24:42.744-0300 I NETWORK  [listener] connection accepted from 127.0.0.1:35176 #25 (3 connections now open)
2018-07-17T23:24:42.746-0300 I NETWORK  [conn25] received client metadata from 127.0.0.1:35176 conn: { driver: { name: "PyMongo", version: "3.7.1" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "4.15.0-23-generic" }, platform: "CPython 3.6.5.final.0" }
2018-07-17T23:24:43.233-0300 I NETWORK  [listener] connection accepted from 127.0.0.1:35186 #26 (4 connections now open)
2018-07-17T23:24:43.233-0300 I NETWORK  [conn26] received client metadata from 127.0.0.1:35186 conn: { driver: { name: "PyMongo", version: "3.7.1" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "4.15.0-23-generic" }, platform: "CPython 3.6.5.final.0" }
2018-07-18T07:38:28.201-0300 I NETWORK  [conn26] end connection 127.0.0.1:35186 (3 connections now open)
2018-07-18T07:38:28.201-0300 I NETWORK  [conn25] end connection 127.0.0.1:35176 (2 connections now open)
2018-07-18T07:38:29.191-0300 I NETWORK  [conn24] end connection 127.0.0.1:35172 (1 connection now open)
2018-07-18T08:25:37.365-0300 I NETWORK  [conn6] end connection 127.0.0.1:34922 (0 connections now open)
2018-07-18T08:25:45.320-0300 I CONTROL  [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
2018-07-18T08:25:45.498-0300 I NETWORK  [signalProcessingThread] shutdown: going to close listening sockets...
2018-07-18T08:25:45.498-0300 I NETWORK  [signalProcessingThread] removing socket file: /run/mongodb/mongodb-27017.sock
2018-07-18T08:25:45.498-0300 I FTDC     [signalProcessingThread] Shutting down full-time diagnostic data capture
2018-07-18T08:25:45.504-0300 I STORAGE  [signalProcessingThread] WiredTigerKVEngine shutting down
2018-07-18T08:25:45.658-0300 I STORAGE  [signalProcessingThread] shutdown: removing fs lock...
2018-07-18T08:25:45.658-0300 I CONTROL  [signalProcessingThread] now exiting
2018-07-18T08:25:45.658-0300 I CONTROL  [signalProcessingThread] shutting down with code:0

同样的错误仍然存​​在

0 个答案:

没有答案