[SERVER-22508] Missing dependencies in 2.6 RPM Packages for CentOS 7 Created: 08/Feb/16  Updated: 09/Jun/16  Resolved: 12/Feb/16

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

Type: Bug Priority: Minor - P4
Reporter: Ralph Bolton Assignee: Brian Samek
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Centos


Issue Links:
Related
is related to SERVER-22106 mongodb-org-3.2.0 on RHEL6 requires o... Closed
Backwards Compatibility: Fully Compatible
Operating System: Linux
Steps To Reproduce:

Build a minimal 64 bit Centos 7 system, add in the Mongo Yum Repo and run:

yum install mongodb-org mongodb-org-server
systemctl start mongod
-> it fails to start, although it very light on details - nothing in journalctl, nothing in mongod.log etc.

To see the errors I've seen, I edited /etc/init.d/mongod and changed:

daemon --user "$MONGO_USER" --check $mongod "$NUMACTL $mongod $OPTIONS > /dev/null 2>&1"

...to...

daemon --user "$MONGO_USER" --check $mongod "$NUMACTL $mongod $OPTIONS"

...then ran:

/etc/init.d/mongod start

Participants:

 Description   

I just installed MongoDB onto a minimal Centos 7 64 bit system. Whilst the RPMs installed just fine, some dependencies were missing. These seem enough to get it to install and run, although there may be more:

  • mongodb-org
  • mongodb-org-server
  • glibc.i686
  • libstdc++.i686

(Right now, the mongodb-org* packages are at version 2.6.11-1)



 Comments   
Comment by Ralph Bolton [ 12/Feb/16 ]

Switching everything to 64 bit works just fine I can't imagine why I didn't figure out that I was messing with 32 bit on my 64 bit system - sorry to have brought up a somewhat obscure use-case!

Thanks for your help.

Comment by Brian Samek [ 11/Feb/16 ]

It looks like my problem was just slow hardware in my repro. mongod wasn't actually hanging.

It looks like you're installing the 32-bit version of mongo. Can you try with 64-bit instead, and run again? There might be a bug in calculating dependencies for 32-bit mongo 2.6 on 64-bit systems. To do this, remove the 32-bit version, then put this in your .repo file and install.

[mongodb-org-2.6]
name=MongoDB 2.6 Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1

Comment by Ralph Bolton [ 11/Feb/16 ]

That's interesting... I can't see how a reboot would fix missing libraries - what happened when you started mongo before your reboot? Did a process actually start, or did it just fail immediately?

In my case, starting mongod did almost nothing I could see (apart from fail). There was nothing in the log, and very little in "journalctl" output - most importantly, no process was started. Only some additional debug (by hacking the start script) revealed the errors I posted above.

FYI, on my system, I now have these .i686 packages (not all related to mongo, but nearly all of them are):

mongodb-org-mongos-2.6.11-1.i686
mongodb-org-tools-2.6.11-1.i686
mongodb-org-2.6.11-1.i686
nss-softokn-freebl-3.16.2.3-13.el7_1.i686
mongodb-org-shell-2.6.11-1.i686
mongodb-org-server-2.6.11-1.i686
glibc-2.17-106.el7_2.1.i686
libgcc-4.8.5-4.el7.i686
libstdc++-4.8.5-4.el7.i686

Comment by Brian Samek [ 11/Feb/16 ]

Did the successful start come after a reboot? I am experiencing the following on RHEL 7. I did not install glibc or libstdc++ to fix the problem. I just rebooted. This problem occurs on 2.6 but not on 3.2.

  1. Boot rhel7 base image ami-d43194bc
  2. Create /etc/yum.repos.d/mongodb-org-2.6.repo with

    [mongodb-org-2.6]
    name=MongoDB 2.6 Repository
    baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
    gpgcheck=0
    enabled=1
    

  3. Run

    yum install -y mongodb-org
    service mongod start
    

  4. mongod hangs and fails to start. /var/log/mongodb/mongod.log contains

    2016-02-11T21:21:19.322+0000 ***** SERVER RESTARTED *****
    2016-02-11T21:21:19.328+0000 [initandlisten] MongoDB starting : pid=9029 port=27017 dbpath=/var/lib/mongo 64-bit host=ip-10-63-56-78
    2016-02-11T21:21:19.328+0000 [initandlisten] db version v2.6.11
    2016-02-11T21:21:19.328+0000 [initandlisten] git version: d00c1735675c457f75a12d530bee85421f0c5548
    2016-02-11T21:21:19.328+0000 [initandlisten] build info: Linux build4.ny.cbi.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
    2016-02-11T21:21:19.328+0000 [initandlisten] allocator: tcmalloc
    2016-02-11T21:21:19.328+0000 [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1" }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod.pid" }, storage: { dbPath: "/var/lib/mongo" }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
    2016-02-11T21:21:19.340+0000 [initandlisten] journal dir=/var/lib/mongo/journal
    2016-02-11T21:21:19.340+0000 [initandlisten] recover : no journal files present, no recovery needed
    2016-02-11T21:21:20.065+0000 [initandlisten] preallocateIsFaster=true 13.04
    2016-02-11T21:21:20.447+0000 [initandlisten] preallocateIsFaster=true 6.24
    2016-02-11T21:21:21.733+0000 [initandlisten] preallocateIsFaster=true 4.36
    2016-02-11T21:21:21.733+0000 [initandlisten] preallocating a journal file /var/lib/mongo/journal/prealloc.0
    

  5. Reboot the system. mongod starts automatically and without failing.
Comment by Ralph Bolton [ 08/Feb/16 ]

Akk - sorry, I don't have the exact errors any longer. They were along the lines of:

"/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory"
(which Google told me was caused by missing glibc.i686)

...and...
"libstdc++.so.6: cannot open shared object file: No such file or directory"

Comment by Ramon Fernandez Marina [ 08/Feb/16 ]

coofercat, what errors did you see? If you still have a copy, could you please paste them in this ticket?

Thanks,
Ramón.

Generated at Thu Feb 08 04:00:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.