Replication set failed

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.8.2
    • Component/s: Replication
    • Environment:
      Linux 2.6.18-238.12.1.el5 x86_64
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      I try to setup Mongodb replication
      For this I did
      On master(sd2qvq10vl.saksdirect.com) :
      ~~
      master = true
      source = sd2qvq09vl.saksdirect.com
      ~~
      On slave (sd2qvq09vl.saksdirect.com) :
      ~~
      slave = true
      source = sd2qvq10vl.saksdirect.com
      ~~
      After that start of all dbs failed with:
      ~~
      [mongodb@SD2QVQ09VL ~]$ sudo /etc/init.d/mongod start
      Starting mongod: all output going to: /var/log/mongo/mongod.log
      forked process: 29626
      [ OK ]
      ~~
      [mongodb@SD2QVQ10VL ~]$ sudo /etc/init.d/mongod start
      Starting mongod: all output going to: /var/log/mongo/mongod.log
      forked process: 31616
      [ OK ]
      ~~
      I commented out all changes in config file deleted 'mongod.lock' file and ran
      ~~~
      [mongodb@SD2QVQ09VL ~]$ mongod --repair
      Thu Sep 1 14:22:11 [initandlisten] MongoDB starting : pid=29441 port=27017 dbpath=/data/db/ 64-bit
      Thu Sep 1 14:22:11 [initandlisten] db version v1.8.3, pdfile version 4.5
      Thu Sep 1 14:22:11 [initandlisten] git version: c206d77e94bc3b65c76681df5a6b605f68a2de05
      Thu Sep 1 14:22:11 [initandlisten] build sys 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
      Thu Sep 1 14:22:11 [initandlisten] exception in initAndListen std::exception: dbpath (/data/db/) does not exist, terminating
      Thu Sep 1 14:22:11 dbexit:
      Thu Sep 1 14:22:11 [initandlisten] shutdown: going to close listening sockets...
      Thu Sep 1 14:22:11 [initandlisten] shutdown: going to flush diaglog...
      Thu Sep 1 14:22:11 [initandlisten] shutdown: going to close sockets...
      Thu Sep 1 14:22:11 [initandlisten] shutdown: waiting for fs preallocator...
      Thu Sep 1 14:22:11 [initandlisten] shutdown: closing all files...
      Thu Sep 1 14:22:11 closeAllFiles() finished
      Thu Sep 1 14:22:11 dbexit: really exiting now
      ~~~
      And I startup database failed again in log file I found error
      ~~~
      Thu Sep 1 14:22:02 [replslave] repl: AssertionException trying to slave off of a non-master
      repl: sleep 2sec before next pass
      Thu Sep 1 14:22:04 [replslave] repl: from host:sd2qvq10vl.saksdirect.com
      Thu Sep 1 14:22:04 [replslave] trying to slave off of a non-master
      Assertion: 13344:trying to slave off of a non-master
      0x55f39a 0x6adde7 0x6ae2cd 0x6ae58f 0x6aea4e 0x6af2e5 0x8c1020 0x2b8c2355d73d 0x2b8c23fd84bd
      /usr/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x12a) [0x55f39a]
      /usr/bin/mongod(_ZN5mongo10ReplSource14sync_pullOpLogERi+0x4087) [0x6adde7]
      /usr/bin/mongod(_ZN5mongo10ReplSource4syncERi+0x4cd) [0x6ae2cd]
      /usr/bin/mongod(_ZN5mongo9_replMainERSt6vectorIN5boost10shared_ptrINS_10ReplSourceEEESaIS4_EERi+0x1ff) [0x6ae58f]
      /usr/bin/mongod(_ZN5mongo8replMainEv+0xce) [0x6aea4e]
      /usr/bin/mongod(_ZN5mongo15replSlaveThreadEv+0x275) [0x6af2e5]
      /usr/bin/mongod(thread_proxy+0x80) [0x8c1020]
      /lib64/libpthread.so.0 [0x2b8c2355d73d]
      /lib64/libc.so.6(clone+0x6d) [0x2b8c23fd84bd]
      ~~~
      Can you help me to fix DBs?
      Thanks.

        1. etc_master_mongod.conf.txt
          2 kB
        2. etc_slave_mongod.conf.txt
          2 kB
        3. master_mongod.log.gz
          48 kB
        4. slave_mongod.log.gz
          74 kB

            Assignee:
            Kristina Chodorow (Inactive)
            Reporter:
            Leonid Mikityanskiy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: