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

When mongod --shutdown is issued, an incorrect message is logged

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.1.0
    • Fix Version/s: 2.1.1
    • Component/s: Logging
    • Labels:
      None
    • Environment:
      mongod on linux
    • Operating System:
      Linux

      Description

      When using the --shutdown flag, mongod produces a log file like this:

      Fri Mar  2 21:06:18 [initandlisten] MongoDB starting : pid=4750 port=27017 dbpath=/var/lib/mongo 64-bit host=localhost.localdomain
      Fri Mar  2 21:06:18 [initandlisten] db version v2.0.2, pdfile version 4.5
      Fri Mar  2 21:06:18 [initandlisten] git version: 514b122d308928517f5841888ceaa4246a7f18e3
      Fri Mar  2 21:06:18 [initandlisten] build info: Linux bs-linux64.10gen.cc 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
      Fri Mar  2 21:06:18 [initandlisten] options: { config: "/etc/mongod.conf", dbpath: "/var/lib/mongo", fork: "true", logappend: "true", logpath: "/var/log/mongo/mongod.log" }
      Fri Mar  2 21:06:18 [initandlisten] journal dir=/var/lib/mongo/journal
      Fri Mar  2 21:06:18 [initandlisten] recover : no journal files present, no recovery needed
      Fri Mar  2 21:06:18 [initandlisten] waiting for connections on port 27017
      Fri Mar  2 21:06:18 [websvr] admin web console waiting for connections on port 28017
       
      ***** SERVER RESTARTED *****
       
       
      killing process with pid: 4750
      Fri Mar  2 21:06:43 got kill or ctrl c or hup signal 15 (Terminated), will terminate after current cmd ends
      Fri Mar  2 21:06:43 [interruptThread] now exiting
      Fri Mar  2 21:06:43 dbexit: 
      Fri Mar  2 21:06:43 [interruptThread] shutdown: going to close listening sockets...
      Fri Mar  2 21:06:43 [interruptThread] closing listening socket: 6
      Fri Mar  2 21:06:43 [interruptThread] closing listening socket: 7
      Fri Mar  2 21:06:43 [interruptThread] closing listening socket: 8
      Fri Mar  2 21:06:43 [interruptThread] removing socket file: /tmp/mongodb-27017.sock
      Fri Mar  2 21:06:43 [interruptThread] shutdown: going to flush diaglog...
      Fri Mar  2 21:06:43 [interruptThread] shutdown: going to close sockets...
      Fri Mar  2 21:06:43 [interruptThread] shutdown: waiting for fs preallocator...
      Fri Mar  2 21:06:43 [interruptThread] shutdown: lock for final commit...
      Fri Mar  2 21:06:43 [interruptThread] shutdown: final commit...
      Fri Mar  2 21:06:43 [interruptThread] shutdown: closing all files...
      Fri Mar  2 21:06:43 [interruptThread] closeAllFiles() finished
      Fri Mar  2 21:06:43 [interruptThread] journalCleanup...
      Fri Mar  2 21:06:43 [interruptThread] removeJournalFiles
      Fri Mar  2 21:06:43 [interruptThread] shutdown: removing fs lock...
      Fri Mar  2 21:06:43 dbexit: really exiting now

      whereas when using another method, such as kill or db. shutdownServer() does not produce this:

      Fri Mar  2 22:39:06 [initandlisten] MongoDB starting : pid=5296 port=27017 dbpath=/var/lib/mongo 64-bit host=localhost.localdomain
      Fri Mar  2 22:39:06 [initandlisten] db version v2.0.2, pdfile version 4.5
      Fri Mar  2 22:39:06 [initandlisten] git version: 514b122d308928517f5841888ceaa4246a7f18e3
      Fri Mar  2 22:39:06 [initandlisten] build info: Linux bs-linux64.10gen.cc 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
      Fri Mar  2 22:39:06 [initandlisten] options: { config: "/etc/mongod.conf", dbpath: "/var/lib/mongo", fork: "true", logappend: "true", logpath: "/var/log/mongo/mongod.log" }
      Fri Mar  2 22:39:06 [initandlisten] journal dir=/var/lib/mongo/journal
      Fri Mar  2 22:39:06 [initandlisten] recover : no journal files present, no recovery needed
      Fri Mar  2 22:39:06 [websvr] admin web console waiting for connections on port 28017
      Fri Mar  2 22:39:06 [initandlisten] waiting for connections on port 27017
      Fri Mar  2 22:39:13 got kill or ctrl c or hup signal 15 (Terminated), will terminate after current cmd ends
      Fri Mar  2 22:39:13 [interruptThread] now exiting
      Fri Mar  2 22:39:13 dbexit: 
      Fri Mar  2 22:39:13 [interruptThread] shutdown: going to close listening sockets...
      Fri Mar  2 22:39:13 [interruptThread] closing listening socket: 6
      Fri Mar  2 22:39:13 [interruptThread] closing listening socket: 7
      Fri Mar  2 22:39:13 [interruptThread] closing listening socket: 8
      Fri Mar  2 22:39:13 [interruptThread] removing socket file: /tmp/mongodb-27017.sock
      Fri Mar  2 22:39:13 [interruptThread] shutdown: going to flush diaglog...
      Fri Mar  2 22:39:13 [interruptThread] shutdown: going to close sockets...
      Fri Mar  2 22:39:13 [interruptThread] shutdown: waiting for fs preallocator...
      Fri Mar  2 22:39:13 [interruptThread] shutdown: lock for final commit...
      Fri Mar  2 22:39:13 [interruptThread] shutdown: final commit...
      Fri Mar  2 22:39:13 [interruptThread] shutdown: closing all files...
      Fri Mar  2 22:39:13 [interruptThread] closeAllFiles() finished
      Fri Mar  2 22:39:13 [interruptThread] journalCleanup...
      Fri Mar  2 22:39:13 [interruptThread] removeJournalFiles
      Fri Mar  2 22:39:13 [interruptThread] shutdown: removing fs lock...
      Fri Mar  2 22:39:13 dbexit: really exiting now

      The SERVER RESTARTED message is incorrect.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              redbeard0531 Mathias Stearn
              Reporter:
              miketheman Michael A. Fiedler
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: