mongod启动问题

47次阅读

共计 1088 个字符,预计需要花费 3 分钟才能阅读完成。

使用 mongod –config /etc/mongod.conf & 启动 mongodb,然后过段时候后发现自己退出了,检查 log:
2018-12-29T06:53:15.079+0000 I CONTROL [signalProcessingThread] got signal 1 (Hangup), will terminate after current cmd ends
2018-12-29T06:53:15.079+0000 I FTDC [signalProcessingThread] Shutting down full-time diagnostic data capture
2018-12-29T06:53:15.080+0000 I STORAGE [conn3] got request after shutdown()
2018-12-29T06:53:15.082+0000 I CONTROL [signalProcessingThread] now exiting
2018-12-29T06:53:15.082+0000 I NETWORK [signalProcessingThread] shutdown: going to close listening sockets…
2018-12-29T06:53:15.082+0000 I NETWORK [signalProcessingThread] closing listening socket: 6
2018-12-29T06:53:15.082+0000 I NETWORK [signalProcessingThread] closing listening socket: 7
2018-12-29T06:53:15.082+0000 I NETWORK [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
2018-12-29T06:53:15.082+0000 I NETWORK [signalProcessingThread] shutdown: going to flush diaglog…
2018-12-29T06:53:15.082+0000 I NETWORK [signalProcessingThread] shutdown: going to close sockets…
是收到关闭信号,正常关闭的。google 之后发现是因为没有 -fork,所以当 shell 退出的时候,mongodb 也退出了。所以,需要加上 –fork。启动 server 模式
mongod –config /etc/mongod.conf –fork
搞定。

正文完
 0