Bug 1191965

Summary: mongodb starts, then dies
Product: [Fedora] Fedora EPEL Reporter: Roy Sigurd Karlsbakk <roy>
Component: mongodbAssignee: Marek Skalický <mskalick>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: epel7CC: admiller, bretm, jdornak, johan.o.hedin, jpacner, mskalick, nathaniel, roy, strobert, tdawson
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-16 11:06:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roy Sigurd Karlsbakk 2015-02-12 10:08:25 UTC
Description of problem:
After an update some weeks back, mongodb now fails to start. That is, it starts up fine, creates its pid file, /var/run/mongodb/mongodb.pid and runs well until systemd interrupts it after a minute waiting for pid file /var/run/mongodb/mongod.pid. Setting 'pidfilepath = /var/run/mongodb/mongod.pid' in /etc/mongodb.conf has no effect, it still creates mongodb.pid and systemd looks for mongod.conf.

Version-Release number of selected component (if applicable):
db version v2.6.5
2015-02-12T11:07:14.194+0100 git version: nogitversion
2015-02-12T11:07:14.194+0100 OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013

How reproducible:
Always

Steps to Reproduce:
1. Upgrade to latest centos/rhel7+epel
2. Restart
3.

Actual results:
Mongodb starts and then dies after systemd times out, after a minute

Expected results:
Mongodb starts and stays running

Additional info:

Comment 1 Marek Skalický 2015-02-16 13:10:23 UTC
This seems to be the same: bug 1040573 . Please check and if not, add more information...

To get newer version of mongoDB from rawhide into epel7, there should be a new package in epel7 repo.
So please test and add karma:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-0719/libstemmer-0-2.585svn.el7

Comment 2 Roy Sigurd Karlsbakk 2015-02-16 13:46:36 UTC
I'm not sure what this upgrade really does, but I have a wee idea. Anyway - it seems to efficiently resolv the issue.

Thanks

Comment 3 Marek Skalický 2015-02-16 14:03:53 UTC
libstemmer is a dependency of mongoDB. In version 2.6.x it is bundled into mongodb tarball. But mongodb should use system version of libraries and this update add this library into epel7...

I am closing this bug as duplicate of bug 1040573 . Feel free to reopen...

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

Comment 4 Roy Sigurd Karlsbakk 2015-02-16 15:09:59 UTC
Actually, this really doesn't seem to be a duplicate bug. Here, systemd seems to look for the wrong pid file and times out, even if we set the timeout to 10 minutes. Without systemd, mongod starts immediately and begins logging connections within 1-2 seconds. Also, this system worked well until the upgrade just after the last glibc bug.

roy

Comment 5 Marek Skalický 2015-02-17 11:54:13 UTC
For me mongoDB starts fine in version 2.6.5-2.el7 from EPEL.

$ cat /usr/lib/systemd/system/mongod.service 
[Unit]
Description=High-performance, schema-free document-oriented database
After=syslog.target network.target

[Service]
Type=forking
User=mongodb
PIDFile=/var/run/mongodb/mongod.pid
EnvironmentFile=/etc/sysconfig/mongod
ExecStart=/usr/bin/mongod $OPTIONS run
PrivateTmp=true
LimitNOFILE=64000

[Install]
WantedBy=multi-user.target

$ head /etc/mongodb.conf 
##
### Basic Defaults
##
bind_ip = 127.0.0.1
port = 27017
fork = true
pidfilepath = /var/run/mongodb/mongod.pid
logpath = /var/log/mongodb/mongodb.log
dbpath =/var/lib/mongodb
journal = true


What is different on your system?

Comment 6 Roy Sigurd Karlsbakk 2015-03-16 11:06:16 UTC
A developer had messed up something.