Bug 1123663 - MongoDB only runs 90s if it's started via systemctl but it runs ok if it's started in standalone mode
Summary: MongoDB only runs 90s if it's started via systemctl but it runs ok if it's st...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: mongodb
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Nathaniel McCallum
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-27 20:36 UTC by q2dg
Modified: 2015-01-12 17:12 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-12 17:12:37 UTC


Attachments (Terms of Use)

Description q2dg 2014-07-27 20:36:15 UTC
Info: Fedora 20 64 bits totally updated. Package mongodb-server installed from Fedora official repository. SELinux disabled.

If I run sudo systemctl start mongod, it seems it works, but only during 90s (besides, terminal hangs until this time is achieved). Then, it shows

Job for mongod.service failed. See 'systemctl status mongod.service' and 'journalctl -xn' for details.

The first proposed command shows:

mongod.service - High-performance, schema-free document-oriented database
   Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled)
   Active: failed (Result: timeout) since dg 2014-07-27 22:24:03 CEST; 3min 4s ago
  Process: 8942 ExecStart=/usr/bin/mongod $OPTIONS run (code=exited, status=0/SUCCESS)
jul 27 22:22:00 minuevofedora-dominio systemd[1]: Starting High-performance, schema-free document-oriented database...
jul 27 22:24:03 minuevofedora-dominio systemd[1]: mongod.service operation timed out. Terminating.
jul 27 22:24:03 minuevofedora-dominio systemd[1]: Failed to start High-performance, schema-free document-oriented database.
jul 27 22:24:03 minuevofedora-dominio systemd[1]: Unit mongod.service entered failed state.

The second proposed command shows:

-- Logs begin at dj 2013-08-29 13:41:28 CEST, end at dg 2014-07-27 22:27:07 CEST. --
jul 27 22:24:03 minuevofedora-dominio systemd[1]: mongod.service operation timed out. Terminating.
jul 27 22:24:03 minuevofedora-dominio systemd[1]: Failed to start High-performance, schema-free document-oriented database.
-- Subject: Unit mongod.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mongod.service has failed.
-- 
-- The result is failed.
jul 27 22:24:03 minuevofedora-dominio systemd[1]: Unit mongod.service entered failed state.
jul 27 22:27:03 minuevofedora-dominio dbus-daemon[618]: dbus[618]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='pa
jul 27 22:27:03 minuevofedora-dominio dbus[618]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service'
jul 27 22:27:03 minuevofedora-dominio systemd[1]: Starting PackageKit Daemon...
-- Subject: Unit packagekit.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit packagekit.service has begun starting up.
jul 27 22:27:03 minuevofedora-dominio PackageKit[9024]: daemon start
jul 27 22:27:07 minuevofedora-dominio dbus-daemon[618]: dbus[618]: [system] Successfully activated service 'org.freedesktop.PackageKit'
jul 27 22:27:07 minuevofedora-dominio dbus[618]: [system] Successfully activated service 'org.freedesktop.PackageKit'
jul 27 22:27:07 minuevofedora-dominio systemd[1]: Started PackageKit Daemon.
-- Subject: Unit packagekit.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit packagekit.service has finished starting up.
-- 
-- The start-up result is done.


The /var/log/mongodb/mongodb.log file shows (from line saying server is on):

2014-07-27T22:22:01.143+0200 [initandlisten] waiting for connections on port 27017
2014-07-27T22:22:01.143+0200 [websvr] fd limit hard:4096 soft:1024 max conn: 819
2014-07-27T22:22:01.143+0200 [websvr] admin web console waiting for connections on port 28017
2014-07-27T22:22:01.145+0200 [IndexRebuilder] checking complete
2014-07-27T22:23:01.007+0200 [DataFileSync] flushing mmaps took 13ms  for 3 files
2014-07-27T22:23:01.142+0200 [TTLMonitor] query admin.system.indexes query: { expireAfterSeconds: { $exists: true } } planSummary: EOF ntoreturn:0 ntoskip:0 keyUpdates:0 numYields:0 locks(micros) r:75 nreturned:0 reslen:20 0ms
2014-07-27T22:23:01.143+0200 [TTLMonitor] query local.system.indexes query: { expireAfterSeconds: { $exists: true } } planSummary: EOF ntoreturn:0 ntoskip:0 keyUpdates:0 numYields:0 locks(micros) r:194 nreturned:0 reslen:20 0ms
2014-07-27T22:24:00.995+0200 [DataFileSync] flushing mmaps took 1ms  for 3 files
2014-07-27T22:24:01.143+0200 [TTLMonitor] query admin.system.indexes query: { expireAfterSeconds: { $exists: true } } planSummary: EOF ntoreturn:0 ntoskip:0 keyUpdates:0 numYields:0 locks(micros) r:31 nreturned:0 reslen:20 0ms
2014-07-27T22:24:01.143+0200 [TTLMonitor] query local.system.indexes query: { expireAfterSeconds: { $exists: true } } planSummary: EOF ntoreturn:0 ntoskip:0 keyUpdates:0 numYields:0 locks(micros) r:31 nreturned:0 reslen:20 0ms
2014-07-27T22:24:03.908+0200 [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
2014-07-27T22:24:03.908+0200 [signalProcessingThread] now exiting
2014-07-27T22:24:03.908+0200 [signalProcessingThread] dbexit: 
2014-07-27T22:24:03.908+0200 [signalProcessingThread] shutdown: going to close listening sockets...
2014-07-27T22:24:03.908+0200 [signalProcessingThread] closing listening socket: 8
2014-07-27T22:24:03.908+0200 [signalProcessingThread] closing listening socket: 9
2014-07-27T22:24:03.908+0200 [signalProcessingThread] closing listening socket: 13
2014-07-27T22:24:03.908+0200 [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
2014-07-27T22:24:03.908+0200 [signalProcessingThread] shutdown: going to flush diaglog...
2014-07-27T22:24:03.908+0200 [signalProcessingThread] shutdown: going to close sockets...
2014-07-27T22:24:03.908+0200 [signalProcessingThread] shutdown: waiting for fs preallocator...
2014-07-27T22:24:03.908+0200 [signalProcessingThread] shutdown: lock for final commit...
2014-07-27T22:24:03.908+0200 [signalProcessingThread] shutdown: final commit...
2014-07-27T22:24:03.909+0200 [signalProcessingThread] shutdown: closing all files...
2014-07-27T22:24:03.909+0200 [signalProcessingThread] closeAllFiles() finished
2014-07-27T22:24:03.909+0200 [signalProcessingThread] journalCleanup...
2014-07-27T22:24:03.909+0200 [signalProcessingThread] removeJournalFiles
2014-07-27T22:24:03.909+0200 [signalProcessingThread] flushing directory /var/lib/mongodb/journal
2014-07-27T22:24:03.946+0200 [signalProcessingThread] removeJournalFiles end
2014-07-27T22:24:03.946+0200 [signalProcessingThread] shutdown: removing fs lock...
2014-07-27T22:24:03.946+0200 [signalProcessingThread] dbexit: really exiting now


However, if I start the server in "standalone" mode (via sudo -u mongodb mongod -f /etc/mongodb.conf) everything runs ok!

I suspect it's a problem with /usr/lib/systemd/system/mongod.service file (which I haven't touched), but I don't know what to do.

Comment 1 Marek Skalický 2015-01-12 17:12:37 UTC
mongod.service is fixed in f20. Closed...

Feel free to reopen.


Note You need to log in before you can comment on or make changes to this bug.