Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mongodb crash got signal 15 (Terminated)

Tags:

mongodb

crash

my mongodb server suddenly got signal 15 (Terminated). I don't have any idea why the mongodb crashed. Below is the log messages.

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...

Below is restart process.

***** 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

The MongoDB shell version is 2.4.9. How can i figured out why this is happen ? Is that caused by long running query that run more than 300s ?

like image 393
roseffendi Avatar asked Jun 27 '16 16:06

roseffendi


2 Answers

I know this is old, but I was running into the issue and stumbled across this question. I managed to solve it.

My issue was on Ubuntu 18.04 and attempting to install and run MongoDB 3.4/3.6.

One issue was a missing /var/run/mongodb directory with the appropriate permissions, the other was this error. I'm still not 100% sure if this error was related to the directory or not, but it definitely had something to do with the configs.

My mongod.conf ended up having processManagement - fork set to true. Changing that to false allowed it to start working.

like image 88
Chris Avatar answered Oct 14 '22 05:10

Chris


I solved this problem after including the PID file path in mongod.conf.

It was like this:

processManagement:
   timeZoneInfo: /usr/share/zoneinfo
   fork: true
   pidFilePath: /var/run/mongodb/mongod.pid

In my case, I had put "fork: true", but I hadn't included the PID file path.

like image 31
Flavio Liroa Jr Avatar answered Oct 14 '22 07:10

Flavio Liroa Jr