Bug 1252974 - mongodb pid file was incorrect and causes mongodb/pulp to not start after upgrade from 6.1 -> 6.1.1
Summary: mongodb pid file was incorrect and causes mongodb/pulp to not start after upg...
Keywords:
Status: CLOSED DUPLICATE of bug 1248663
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.1.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-12 15:50 UTC by Matthew Davis
Modified: 2015-08-13 16:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-13 16:55:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Matthew Davis 2015-08-12 15:50:11 UTC
It's not clear how it was changed or where it was changed, but after the upgrade to 6.1.1, the file /etc/mongodb.conf had the following:

pidfilepath=/var/run/mongodb/mongod.pid

This caused systemd to complain that the pid file was not readable as seen below.


[root@satellite6 05-foreman-ssl.d]# systemctl status mongod                                                                                                                                    
mongod.service - High-performance, schema-free document-oriented database
   Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled)
   Active: failed (Result: timeout) since Wed 2015-08-12 10:33:25 EDT; 52min ago
  Process: 31952 ExecStart=/usr/bin/mongod $OPTIONS run (code=exited, status=0/SUCCESS)
 Main PID: 27029 (code=exited, status=0/SUCCESS)

Aug 12 10:31:55 satellite6.rdu.salab.redhat.com mongod[31952]: about to fork child process, waiting until server is ready for connections.
Aug 12 10:31:55 satellite6.rdu.salab.redhat.com mongod[31952]: forked process: 31954
Aug 12 10:31:55 satellite6.rdu.salab.redhat.com mongod[31952]: all output going to: /var/lib/mongodb/mongodb.log
Aug 12 10:31:57 satellite6.rdu.salab.redhat.com mongod[31952]: child process started successfully, parent exiting
Aug 12 10:31:57 satellite6.rdu.salab.redhat.com systemd[1]: PID file /var/run/mongodb/mongodb.pid not readable (yet?) after start.
Aug 12 10:33:25 satellite6.rdu.salab.redhat.com systemd[1]: mongod.service operation timed out. Terminating.
Aug 12 10:33:25 satellite6.rdu.salab.redhat.com systemd[1]: Failed to start High-performance, schema-free document-oriented database.
Aug 12 10:33:25 satellite6.rdu.salab.redhat.com systemd[1]: Unit mongod.service entered failed state.
[root@satellite6 05-foreman-ssl.d]# stat /var/run/mongodb/mongod.pid 
  File: ‘/var/run/mongodb/mongod.pid’
  Size: 6               Blocks: 8          IO Block: 4096   regular file
Device: 12h/18d Inode: 26113409    Links: 1
Access: (0644/-rw-r--r--)  Uid: (  184/ mongodb)   Gid: (  995/ mongodb)
Context: system_u:object_r:mongod_var_run_t:s0
Access: 2015-08-12 11:25:41.320144434 -0400
Modify: 2015-08-12 10:31:55.422152480 -0400
Change: 2015-08-12 10:31:55.422152480 -0400
 Birth: -



Version-Release number of selected component (if applicable):
mongodb-server-2.4.9-3.el7sat.x86_64



/etc/mongodb.conf even had mongodb.pid set looking at the rpm. So something during the installer/upgrade changed it.

Comment 1 Matthew Davis 2015-08-12 15:50:53 UTC
changing the pidfilepath in /etc/mongodb.conf to

pidfilepath=/var/run/mongodb/mongodb.pid

Fixed the issue and mongodb starts successfully.

Comment 2 Stephen Benjamin 2015-08-13 16:55:15 UTC

*** This bug has been marked as a duplicate of bug 1248663 ***


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