我的mongodb服务器突然收到信号15(已终止)。我不知道为什么mongodb坠毁了。以下是日志消息。
Mon Jun 27 07:33:31.701 [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
Mon Jun 27 07:33:31.704 [signalProcessingThread] now exiting
Mon Jun 27 07:33:31.704 dbexit:
Mon Jun 27 07:33:31.704 [signalProcessingThread] shutdown: going to close listening sockets...
Mon Jun 27 07:33:31.704 [signalProcessingThread] closing listening socket: 9
Mon Jun 27 07:33:31.704 [signalProcessingThread] closing listening socket: 10
Mon Jun 27 07:33:31.704 [signalProcessingThread] closing listening socket: 11
Mon Jun 27 07:33:31.705 [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
Mon Jun 27 07:33:31.705 [signalProcessingThread] shutdown: going to flush diaglog...
Mon Jun 27 07:33:31.705 [signalProcessingThread] shutdown: going to close sockets...
Mon Jun 27 07:33:31.706 [signalProcessingThread] shutdown: waiting for fs preallocator...
Mon Jun 27 07:33:31.706 [signalProcessingThread] shutdown: lock for final commit...
Mon Jun 27 07:33:31.706 [signalProcessingThread] shutdown: final commit...
以下是重启过程。
***** SERVER RESTARTED *****
Mon Jun 27 07:34:22.500 [initandlisten] MongoDB starting : pid=888 port=27017 dbpath=/var/lib/mongodb 64-bit host=jasa-online
Mon Jun 27 07:34:22.500 [initandlisten] db version v2.4.9
Mon Jun 27 07:34:22.500 [initandlisten] git version: nogitversion
Mon Jun 27 07:34:22.500 [initandlisten] build info: Linux orlo 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 BOOST_LIB_VERSION=1_54
Mon Jun 27 07:34:22.500 [initandlisten] allocator: tcmalloc
Mon Jun 27 07:34:22.500 [initandlisten] options: { bind_ip: "0.0.0.0", config: "/etc/mongodb.conf", dbpath: "/var/lib/mongodb", journal: "true", logappend: "true", logpath: "/var/log/mongodb/mongodb.log" }
Mon Jun 27 07:34:22.531 [initandlisten] journal dir=/var/lib/mongodb/journal
Mon Jun 27 07:34:22.531 [initandlisten] recover : no journal files present, no recovery needed
MongoDB shell版本是2.4.9。我怎么能弄清楚为什么会这样呢?这是由运行超过300秒的长时间运行查询引起的吗?
答案 0 :(得分:1)
我知道这已经过时了,但我遇到了这个问题并偶然发现了这个问题。我设法解决了。
我的问题是在Ubuntu 18.04上,并试图安装和运行MongoDB 3.4 / 3.6。
一个问题是缺少具有适当权限的/ var / run / mongodb目录,另一个是此错误。我仍然不能100%确定这个错误是否与目录有关,但它肯定与配置有关。
我的mongod.conf最终将processManagement - fork设置为true。将其更改为false允许它开始工作。
答案 1 :(得分:0)
确保/usr/lib/systemd/system/mongod.service中的路径确认 和/etc/mongod.conf相同
答案 2 :(得分:-1)