Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2176

mongod does not start after package upgrade - misleading error messages!!

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.6.4
    • Component/s: Build
    • Environment:
      Fedora 13
    • Linux

      Environment: Fedora 13 + mongo-stable-server == 1.6.4

      Symptom: /etc/init.d/mongod does not start the server after upgrading package via 'yum update mongod-stable-server'

      Cause: all files under the $dbpath have "root" ownership - mongod bails out during start-up and does not report it correctly
      Fix: chown -R mongod:mongod $db_path

      BUG DESCRIPTION:

      there are two problems associated with this bug:

      Problem1)
      your package-update installation script either changed the file-ownership under $db_path to root, or previous
      mongod versions (<1.6.4) did not require those files to be owned by mongod and the 1.6.4 install/upgrade script failed to
      change file-ownership.

      Problem2)
      there are two completely misleading error messages which need to be fixed:

      1) /var/log/mongod.log just mentions that mongod.lock file is still there.. this is pretty mis-leading!
      mongod should have written an error message during start-up complaining that the DB-files,
      lock files and subdirectories under $dbpath are not owned by the user running mongod!!!
      THAT is the correct error message in this case and should be mentioned in the mongod.log file!

      Tue Nov 23 16:19:40 MongoDB starting : pid=1818 port=63336 dbpath=/data/mongo/db 64-bit
      Tue Nov 23 16:19:40 db version v1.6.4, pdfile version 4.5
      Tue Nov 23 16:19:40 git version: 4f5c02f8d92ff213b71b88f5eb643b7f62b50abc
      Tue Nov 23 16:19:40 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41

                                • old lock file: /data/mongo/db/mongod.lock. probably means unclean shutdown
                                  recommend removing file and running --repair
                                  see: http://dochub.mongodb.org/core/repair for more information
                                  *************
                                  Tue Nov 23 16:19:40 exception in initAndListen std::exception: old lock file, terminating
                                  Tue Nov 23 16:19:40 dbexit:

      Tue Nov 23 16:19:40 shutdown: going to close listening sockets...
      Tue Nov 23 16:19:40 shutdown: going to flush oplog...
      Tue Nov 23 16:19:40 shutdown: going to close sockets...
      Tue Nov 23 16:19:40 shutdown: waiting for fs preallocator...
      Tue Nov 23 16:19:40 shutdown: closing all files...
      Tue Nov 23 16:19:40 closeAllFiles() finished

      2) "/etc/inid.d/mongod status" merely says:
      mongod dead but subsys locked

      same thing.. misleading / not pointing to the root cause - It should at least say: "check /var/log/mongod.conf for more information"

            Assignee:
            miketheman Michael A. Fiedler
            Reporter:
            tilo Tilo S
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: