1 Reply Latest reply: Jun 20, 2011 4:34 AM by 656853 RSS

    RepQuoteExample with new version 5.2.28

    857786
      Hello all OTN Forum users

      I download and install the new version DB-5.2.28
      I run my old test based on RepQuoteExample
      But now when I run the test I have the following behavior:


      * If I run the example like it was in previous version :

      LD_LIBRARY_PATH=/usr/local/BerkeleyDB.5.2/lib/ /root/RepQuoteExampleEric -h /opt/bdb/ -l 2.0.0.110:12345 -r 2.0.0.210:12345 -a quorum -b -v 2>&1| tee /tmp/BDB.log
      -------

      [1308502743:180435][27633/47676916135136] REP_UNDEF: EID 0 is assigned for site 2.0.0.110:12345
      [1308502743:180474][27633/47676916135136] REP_UNDEF: EID 1 is assigned for site 2.0.0.210:12345
      BDB2526 Finding last valid log LSN: file: 41 offset 4615995
      BDB1518 Recovery complete at Sun Jun 19 19:59:03 2011
      BDB1519 Maximum transaction ID 0 recovery checkpoint [41][4615939]
      [1308502743:234282][27633/47676916135136] REP_UNDEF: try join request to site site 2.0.0.210:12345
      [1308502743:234607][27633/47676916135136] REP_UNDEF: `Connection refused' (111) on connection to site 2.0.0.210:12345
      Caught an exception during initialization or processing: DbEnv::repmgr_start: BDB0086 DB_REP_UNAVAIL: Too few remote sites to complete operation


      and on the other node:

      LD_LIBRARY_PATH=/usr/local/BerkeleyDB.5.2/lib/ /root/RepQuoteExampleEric -h /opt/bdb/ -l 2.0.0.210:12345 -r 2.0.0.110:12345 -a quorum -b -v 2>&1| tee /tmp/BDB.log
      -------

      [1308502256:77643][10412/47887565264096] REP_UNDEF: EID 0 is assigned for site 2.0.0.210:12345
      [1308502256:77664][10412/47887565264096] REP_UNDEF: EID 1 is assigned for site 2.0.0.110:12345
      BDB2526 Finding last valid log LSN: file: 41 offset 4615995
      BDB1518 Recovery complete at Sun Jun 19 12:50:56 2011
      BDB1519 Maximum transaction ID 0 recovery checkpoint [41][4615939]
      [1308502256:122163][10412/47887565264096] REP_UNDEF: try join request to site site 2.0.0.110:12345
      [1308502256:123388][10412/47887565264096] REP_UNDEF: `Connection refused' (111) on connection to site 2.0.0.110:12345
      Caught an exception during initialization or processing: DbEnv::repmgr_start: BDB0086 DB_REP_UNAVAIL: Too few remote sites to complete operation


      How should I run this example for a two node?



      * if I run on node with -L instead of -l ie.

      on Master
      LD_LIBRARY_PATH=/usr/local/BerkeleyDB.5.2/lib/ /root/RepQuoteExampleEric -h /opt/bdb/ -L 2.0.0.110:12345 -r 2.0.0.210:12345 -a quorum -b -v 2>&1| tee /tmp/BDB.log

      on Slave
      LD_LIBRARY_PATH=/usr/local/BerkeleyDB.5.2/lib/ /root/RepQuoteExampleEric -h /opt/bdb/ -l 2.0.0.210:12345 -r 2.0.0.110:12345 -a quorum -b -v 2>&1| tee /tmp/BDB.log

      there is one Master and one Client but they can run in the same time

      I get in the client :

      [1308557859:943895][13930/46923510658272] REP_UNDEF: EID 0 is assigned for site 2.0.0.210:12345
      [1308557859:943916][13930/46923510658272] REP_UNDEF: EID 1 is assigned for site 2.0.0.110:12345
      BDB2526 Finding last valid log LSN: file: 41 offset 4616087
      BDB1518 Recovery complete at Mon Jun 20 04:17:39 2011
      BDB1519 Maximum transaction ID 0 recovery checkpoint [41][4616031]
      [1308557859:988040][13930/46923510658272] REP_UNDEF: try join request to site site 2.0.0.110:12345
      [1308557859:988509][13930/46923510658272] REP_UNDEF: `Connection refused' (111) on connection to site 2.0.0.110:12345
      Caught an exception during initialization or processing: DbEnv::repmgr_start: BDB0086 DB_REP_UNAVAIL: Too few remote sites to complete operation


      * If I enter a delay between Master and Client it works but the client stay client even in split Brain or when master died like it was by default set 2 SITE STRICT

      [1308558840:863952][27119/1190287680] CLIENT: connector thread is exiting
      [1308558845:864374][27119/1190287680] CLIENT: starting connector thread, eid 1
      [1308558845:864451][27119/1190287680] CLIENT: connecting to site 2.0.0.110:12345
      [1308558845:864694][27119/1190287680] CLIENT: `Connection refused' (111) on connection to site 2.0.0.110:12345
      [1308558845:864739][27119/1190287680] CLIENT: connector thread is exiting
      [1308558846:877491][27119/1179797824] CLIENT: /opt/bdb/ rep_send_message: msgv = 6 logv 18 gen = 1 eid -1, type newclient, LSN [0][0] nobuf
      [1308558846:929338][27119/1179797824] CLIENT: Start election nsites 2, ack 2, priority 100
      [1308558846:929358][27119/1179797824] CLIENT: Election thread owns egen 3
      [1308558846:932340][27119/1179797824] CLIENT: Tallying VOTE1[0] (0, 3)
      [1308558846:932361][27119/1179797824] CLIENT: Beginning an election
      [1308558846:932376][27119/1179797824] CLIENT: /opt/bdb/ rep_send_message: msgv = 6 logv 18 gen = 1 eid -1, type vote1, LSN [41][4634491] nobuf
      BDB3534 Not enough votes to elect: recvd 1 of 2 from 2 sites
      [1308558847:942359][27119/1179797824] CLIENT: Election finished in 1.012986000 sec
      [1308558847:942387][27119/1179797824] CLIENT: Election done; egen 4
      [1308558847:942400][27119/1179797824] CLIENT: Ended election with -30975, e_th 0, egen 4, flag 0x282c, e_fl 0x0, lo_fl 0x0
      Mon Jun 20 04:34:07 2011 - DB_EVENT_REP_ELECTION_FAILED.
      [1308558847:942456][27119/1179797824] CLIENT: Broadcast latest membership list
      [1308558850:865373][27119/1190287680] CLIENT: starting connector thread, eid 1
      [1308558850:865587][27119/1190287680] CLIENT: connecting to site 2.0.0.110:12345
      [1308558850:865850][27119/1190287680] CLIENT: `Connection refused' (111) on connection to site 2.0.0.110:12345
      [1308558850:865896][27119/1190287680] CLIENT: connector thread is exiting


      *If I run the two nodes with -L


      on Master
      LD_LIBRARY_PATH=/usr/local/BerkeleyDB.5.2/lib/ /root/RepQuoteExampleEric -h /opt/bdb/ -L 2.0.0.110:12345 -r 2.0.0.210:12345 -a quorum -b -v 2>&1| tee /tmp/BDB.log
      on Slave
      LD_LIBRARY_PATH=/usr/local/BerkeleyDB.5.2/lib/ /root/RepQuoteExampleEric -h /opt/bdb/ -L 2.0.0.210:12345 -r 2.0.0.110:12345 -a quorum -b -v 2>&1| tee /tmp/BDB.log


      I get two masters and the replication of the database doesn't occur


      So I don't know how to run the example to have a 2 nodes Master/Client and when the master fails the Client is elected to Master etc....
      Like it was in previous version ...
        • 1. Re: RepQuoteExample with new version 5.2.28
          656853
          Hi,

          From your description, I assume that you were playing with BDB Java API and its RepQuoteExample example.

          In BDB 5.2, RepQuoteExample is executed in a bit different way than in BDB 5.1. When add the first site in a new group, please always start it with "-L" argument. It is similar to "-l", but it indicates the site to be a creator in the group. For the other sites that come after the creator, you would use "-l" for local site info, and "-r" for remote site info, "-R" for peer remote site info. Also, please avoid using "-L" when initializing both master and client, which would lead to separate groups.

          The change is introduced by the the new feature in BDB 5.2, group membership. For more details, please refer to:
          - Group membership introduction at http://download.oracle.com/docs/cd/E17076_02/html/programmer_reference/group_membership.html.
          - Java examples at http://download.oracle.com/docs/cd/E17076_02/html/gsg_db_rep/JAVA/repapp.html#rep_init_code.

          Hope it helps.

          Emily Fu,
          Oracle Berkeley DB