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

Invoking mongod startup multiple times produces inconsistent log messages

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.3, 2.0.4, 2.1.0, 2.1.1
    • Component/s: Logging
    • Environment:
      linux 64-bit, possibly others
    • Server Security
    • Linux

      When invoking mongod -f mongod.conf more than once on a system, a confusing log message is provided, indicating that the server has been shut down.
      While this is true, the second server started has been shut down, the error message could probably be better formed.

      Here's what happenes:

      ***** SERVER RESTARTED *****
      
      
      Wed Mar 14 12:51:39 [initandlisten] MongoDB starting : pid=3059 port=27017 dbpath=/data/db 64-bit host=localhost.localdomain
      Wed Mar 14 12:51:39 [initandlisten] db version v2.0.3, pdfile version 4.5
      Wed Mar 14 12:51:39 [initandlisten] git version: 05bb8aa793660af8fce7e36b510ad48c27439697
      Wed Mar 14 12:51:39 [initandlisten] build info: Linux ip-10-110-9-236 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
      Wed Mar 14 12:51:39 [initandlisten] options: { config: "/data/mongod.conf", dbpath: "/data/db", fork: "true", logappend: "true", logpath: "/data/mongod.log", pidfilepath: "/data/mongod.pid" }
      Wed Mar 14 12:51:39 [initandlisten] journal dir=/data/db/journal
      Wed Mar 14 12:51:39 [initandlisten] recover : no journal files present, no recovery needed
      Wed Mar 14 12:51:39 [websvr] admin web console waiting for connections on port 28017
      Wed Mar 14 12:51:39 [initandlisten] waiting for connections on port 27017
      
      
      
      
      
      
      ***** SERVER RESTARTED *****
      
      
      Wed Mar 14 12:51:44 [initandlisten] MongoDB starting : pid=3071 port=27017 dbpath=/data/db 64-bit host=localhost.localdomain
      Wed Mar 14 12:51:44 [initandlisten] db version v2.0.3, pdfile version 4.5
      Wed Mar 14 12:51:44 [initandlisten] git version: 05bb8aa793660af8fce7e36b510ad48c27439697
      Wed Mar 14 12:51:44 [initandlisten] build info: Linux ip-10-110-9-236 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
      Wed Mar 14 12:51:44 [initandlisten] options: { config: "/data/mongod.conf", dbpath: "/data/db", fork: "true", logappend: "true", logpath: "/data/mongod.log", pidfilepath: "/data/mongod.pid" }
      Wed Mar 14 12:51:44 [initandlisten] exception in initAndListen: 10310 Unable to acquire lock for lockfilepath: /data/db/mongod.lock, terminating
      Wed Mar 14 12:51:44 dbexit: 
      Wed Mar 14 12:51:44 [initandlisten] shutdown: going to close listening sockets...
      Wed Mar 14 12:51:44 [initandlisten] shutdown: going to flush diaglog...
      Wed Mar 14 12:51:44 [initandlisten] shutdown: going to close sockets...
      Wed Mar 14 12:51:44 [initandlisten] shutdown: waiting for fs preallocator...
      Wed Mar 14 12:51:44 [initandlisten] shutdown: lock for final commit...
      Wed Mar 14 12:51:44 [initandlisten] shutdown: final commit...
      Wed Mar 14 12:51:44 [initandlisten] shutdown: closing all files...
      Wed Mar 14 12:51:44 [initandlisten] closeAllFiles() finished
      Wed Mar 14 12:51:44 dbexit: really exiting now
      Wed Mar 14 12:52:39 [clientcursormon] mem (MB) res:13 virt:115 mapped:0
      Wed Mar 14 12:54:50 [initandlisten] connection accepted from 127.0.0.1:37488 #1
      

      As can be seen from the line 10310 Unable to acquire lock for lockfilepath, this makes sense, but having the "SERVER RESTARTED" message before the server actually gets restarted in the log seems rather odd.

            Assignee:
            backlog-server-security [DO NOT USE] Backlog - Security Team
            Reporter:
            miketheman Michael A. Fiedler
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: