[SERVER-11238] starting mongod service on fedora fails for enterprise package only Created: 17/Oct/13  Updated: 11/Jul/16  Resolved: 07/Feb/14

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: David Storch Assignee: Ernie Hershey
Resolution: Done Votes: 1
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

[vagrant@vagrant-f19 ~]$ uname -a
Linux vagrant-f19 3.9.5-301.fc19.x86_64 #1 SMP Tue Jun 11 19:39:38 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

The vagrant box came from here:
https://dl.dropboxusercontent.com/u/1251103/fedora-19-vagrant.box


Issue Links:
Duplicate
duplicates SERVER-7285 Support systemd in future compatible ... Closed
Gantt Dependency
Operating System: ALL
Participants:

 Description   

After installing the enterprise server package (sudo yum install mongodb-enterprise-unstable-server), starting the mongod service fails:

[vagrant@vagrant-f19 sync]$ sudo service mongod start
Starting mongod (via systemctl):  Job for mongod.service failed. See 'systemctl status mongod.service' and 'journalctl -xn' for details.
                                                           [FAILED]
[vagrant@vagrant-f19 sync]$ systemctl status mongod.service
mongod.service - SYSV: Mongo is a scalable, document-oriented database.
   Loaded: loaded (/etc/rc.d/init.d/mongod)
   Active: failed (Result: exit-code) since Thu 2013-10-17 11:02:04 EDT; 8s ago
  Process: 1775 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE)

The equivalent community package, mongodb-org-unstable-server, does not have this problem---the mongod service starts just fine.

I ran "diff" on the /etc/init.d/mongod init scripts for mongodb-org-unstable-server and mongodb-enterprise-unstable-server, which showed that the two init scripts are identical. The /etc/rc.d/init.d/mongod files are also identical between the two packages.



 Comments   
Comment by Daniel Pasette (Inactive) [ 07/Feb/14 ]

duplicate SERVER-7285

Comment by David Storch [ 18/Oct/13 ]

There is a similar problem on Fedora 18 (vagrant box http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210.box):

[vagrant@localhost sync]$ mongod
mongod: error while loading shared libraries: libnetsnmpagent.so.20: cannot open shared object file: No such file or directory

I don't think the problem has to do with dependency resolution. On both Fedora 18 and 19 the package manager determines that cyrus-sasl and net-snmp-libs are dependencies. Cyrus-sasl is already installed on Fedora, but net-snmp-libs gets installed along with the enterprise package. Here's what happens when I ask explicitly to install net-snmp-libs and cyrus-sasl:

[vagrant@localhost sync]$ sudo yum install net-snmp-libs cyrus-sasl
Package 1:net-snmp-libs-5.7.2-5.fc18.1.x86_64 already installed and latest version
Package cyrus-sasl-2.1.23-37.fc18.x86_64 already installed and latest version
Nothing to do
[vagrant@localhost sync]$ sudo yum info net-snmp-libs cyrus-sasl
Installed Packages
Name        : cyrus-sasl
Arch        : x86_64
Version     : 2.1.23
Release     : 37.fc18
Size        : 135 k
Repo        : installed
From repo   : updates
Summary     : The Cyrus SASL library
URL         : http://asg.web.cmu.edu/sasl/sasl-library.html
License     : BSD with advertising
Description : The cyrus-sasl package contains the Cyrus implementation of SASL.
            : SASL is the Simple Authentication and Security Layer, a method for
            : adding authentication support to connection-based protocols.
 
Name        : net-snmp-libs
Arch        : x86_64
Epoch       : 1
Version     : 5.7.2
Release     : 5.fc18.1
Size        : 2.9 M
Repo        : installed
From repo   : updates
Summary     : The NET-SNMP runtime client libraries
URL         : http://net-snmp.sourceforge.net/
License     : BSD
Description : The net-snmp-libs package contains the runtime client libraries for shared
            : binaries and applications.
 
Available Packages
Name        : net-snmp-libs
Arch        : i686
Epoch       : 1
Version     : 5.7.2
Release     : 5.fc18.1
Size        : 739 k
Repo        : updates/18/x86_64
Summary     : The NET-SNMP runtime client libraries
URL         : http://net-snmp.sourceforge.net/
License     : BSD
Description : The net-snmp-libs package contains the runtime client libraries for shared
            : binaries and applications.

Maybe the Fedora SNMP and SASL packages differ from the Redhat packages in some way we don't expect? Maybe the Fedora packages are actually broken? Maybe we don't run the linker with the correct LD_LIBRARY_PATH?

Comment by Ernie Hershey [ 18/Oct/13 ]

Maybe this is an error in where/how the dependencies are specified for the server package. Is it definitely limited only to Fedora 19? Maybe the package names for sasl and snmp are different in the fedora 19 repos?

Comment by David Storch [ 17/Oct/13 ]

The shared library libsasl2.so.2 should be present at /usr/lib64/libsasl2.so.2 (installed as part of cyrus-sasl), but is missing.

[vagrant@vagrant-f19 lib64]$ mongod
mongod: error while loading shared libraries: libsasl2.so.2: cannot open shared object file: No such file or directory

Looks like there are shared library files from net-snmp-libs that are also missing, such as /usr/lib64/libnetsnmpagent.so.20

Comment by David Storch [ 17/Oct/13 ]

The output of "sudo journalctl -xn" may also be of interest:

-- Logs begin at Mon 2013-07-08 06:04:27 EDT, end at Thu 2013-10-17 15:39:53 EDT. --
Oct 17 15:36:37 vagrant-f19 sudo[1736]: vagrant : TTY=pts/0 ; PWD=/home/vagrant/sync ; USER=root ; COMMAND=/sbin/service mongod start
Oct 17 15:36:37 vagrant-f19 systemd[1]: Starting SYSV: Mongo is a scalable, document-oriented database....
-- Subject: Unit mongod.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mongod.service has begun starting up.
Oct 17 15:36:37 vagrant-f19 runuser[1757]: pam_unix(runuser:session): session opened for user mongodb by (uid=0)
Oct 17 15:36:37 vagrant-f19 mongod[1753]: Starting mongod: /usr/bin/mongod: error while loading shared libraries: libsasl2.so.2: cannot open shared object file: No such file or directory
Oct 17 15:36:37 vagrant-f19 runuser[1757]: pam_unix(runuser:session): session closed for user mongodb
Oct 17 15:36:37 vagrant-f19 mongod[1753]: [FAILED]
Oct 17 15:36:37 vagrant-f19 systemd[1]: mongod.service: control process exited, code=exited status=1
Oct 17 15:36:37 vagrant-f19 systemd[1]: Failed to start SYSV: Mongo is a scalable, document-oriented database..
-- Subject: Unit mongod.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--
-- Unit mongod.service has failed.
--
-- The result is failed.
Oct 17 15:36:37 vagrant-f19 systemd[1]: Unit mongod.service entered failed state.
Oct 17 15:39:53 vagrant-f19 sudo[1766]: vagrant : TTY=pts/0 ; PWD=/home/vagrant/sync ; USER=root ; COMMAND=/bin/journalctl -xn

Comment by David Storch [ 17/Oct/13 ]

StackOverflow post describing the same issue: http://stackoverflow.com/questions/11081822/mongodb-service-not-running-in-fedora

Generated at Thu Feb 08 03:25:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.