mongodb - mongod run with nohup exits when there is no open connection -
i running mongod
on nohup
as
nohup mongod -dbpath /data/db > log/nohup.log &
server runs time closes following log
2015-08-24t20:23:12.076+0000 network [conn74] end connection 127.0.0.1:51016 (0 connections open) 2015-08-24t20:23:57.112+0000 network [initandlisten] connection accepted 127.0.0.1:51019 #75 (1 connection open) 2015-08-24t20:23:57.118+0000 network [conn75] end connection 127.0.0.1:51019 (0 connections open) 2015-08-24t20:24:56.026+0000 control [signalprocessingthread] got signal 1 (hangup), terminate after current cmd ends 2015-08-24t20:24:56.026+0000 control [signalprocessingthread] exiting 2015-08-24t20:24:56.026+0000 network [signalprocessingthread] shutdown: going close listening sockets... 2015-08-24t20:24:56.026+0000 network [signalprocessingthread] closing listening socket: 5 2015-08-24t20:24:56.026+0000 network [signalprocessingthread] closing listening socket: 6 2015-08-24t20:24:56.026+0000 network [signalprocessingthread] removing socket file: /tmp/mongodb-27017.sock 2015-08-24t20:24:56.026+0000 network [signalprocessingthread] shutdown: going flush diaglog... 2015-08-24t20:24:56.026+0000 network [signalprocessingthread] shutdown: going close sockets... 2015-08-24t20:24:56.026+0000 storage [signalprocessingthread] shutdown: waiting fs preallocator... 2015-08-24t20:24:56.026+0000 storage [signalprocessingthread] shutdown: final commit... 2015-08-24t20:24:56.026+0000 journal [signalprocessingthread] journalcleanup... 2015-08-24t20:24:56.027+0000 journal [signalprocessingthread] removejournalfiles 2015-08-24t20:24:56.045+0000 journal [signalprocessingthread] terminating durability thread ... 2015-08-24t20:24:56.129+0000 journal [journal writer] journal writer thread stopped 2015-08-24t20:24:56.129+0000 journal [durability] durability thread stopped 2015-08-24t20:24:56.129+0000 storage [signalprocessingthread] shutdown: closing files... 2015-08-24t20:24:56.132+0000 storage [signalprocessingthread] closeallfiles() finished 2015-08-24t20:24:56.132+0000 storage [signalprocessingthread] shutdown: removing fs lock... 2015-08-24t20:24:56.132+0000 control [signalprocessingthread] dbexit: rc: 0
any idea how make mongod continuously running?
answer simple , it's start mongod deamon using --fork
mongod --fork --logpath log/mongod.log
Comments
Post a Comment