master -> slave replication with auth db._adminCommand({serverStatus:1,repl:2}); returns MasterFirst/Last jan 1 1970 and huge lag sec

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.7.0
    • Affects Version/s: 1.4.4
    • Component/s: Admin
    • None
    • Environment:
    • Linux
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      When I setup replication between a master and slave where they are both using auth and run
      db._adminCommand(

      {serverStatus:1,repl:2}

      );
      in the output i get the following

      "repl" : {
      "ismaster" : 0,
      "msg" : "not paired",
      "sources" : [
      {
      "host" : "10.10.0.1",
      "syncedTo" :

      { "time" : "Thu Jul 22 2010 15:07:37 GMT+0000 (UTC)", "inc" : 4717 }

      ,
      "masterFirst" : "Thu Jan 01 1970 12:16:47 GMT+0000 (UTC)",
      "masterLast" : "Thu Jan 01 1970 12:16:47 GMT+0000 (UTC)",
      "lagSeconds" : 18446742793942500
      }
      ]
      },

      To create the issue i start by setting up a master with the following config

      1. cat /etc/mongod.conf
        dbpath = /db/mongodb
        logpath = /db/logs/mongodb.log
        fork = true
        bind_ip = 0.0.0.0
        master = true
        directoryperdb = true
        syncdelay = 5
        oplogSize = 51200
        auth = true

      then log into the admin database locally create an admin user, then auth and switch to the local database and create the repl user.

      Then start a slave with the following config

      1. cat /etc/mongod.conf
        dbpath = /db/mongodb
        logpath = /db/logs/mongodb.log
        fork = true
        bind_ip = 0.0.0.0
        slave = true
        source = 10.10.0.1
        directoryperdb = true
        syncdelay = 5
        auth = true

      Login and create the local repl user.

      Import some data on the master

      then run
      > db._adminCommand(

      {serverStatus:1,repl:2}

      );
      and get the output above

      Logs are attached

            Assignee:
            Aaron Staple (Inactive)
            Reporter:
            Byron Albert
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: