Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2011
    Posts
    4

    Unanswered: DB2 9.7 HADR setup

    Hi i'm setting up HADR on 2 separated DB2 9.7 Servers.

    Here are the settings used on each server :

    Primary :
    [db2inst1@pr1dbgip3 ~]$ db2 get db cfg for PIMDB |grep HADR
    HADR database role = STANDARD
    HADR local host name (HADR_LOCAL_HOST) = pr1dbgip3
    HADR local service name (HADR_LOCAL_SVC) = 50002
    HADR remote host name (HADR_REMOTE_HOST) = pr2dbgip3
    HADR remote service name (HADR_REMOTE_SVC) = 50002
    HADR instance name of remote server (HADR_REMOTE_INST) = DB2INST1
    HADR timeout value (HADR_TIMEOUT) = 120
    HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
    HADR peer window duration (seconds) (HADR_PEER_WINDOW) = 0

    Secondary :
    [db2inst1@pr2dbgip3 db2dump]$ db2 get db cfg for PIMDB |grep HADR
    HADR database role = STANDBY
    HADR local host name (HADR_LOCAL_HOST) = pr2dbgip3
    HADR local service name (HADR_LOCAL_SVC) = 50002
    HADR remote host name (HADR_REMOTE_HOST) = pr1dbgip3
    HADR remote service name (HADR_REMOTE_SVC) = 50002
    HADR instance name of remote server (HADR_REMOTE_INST) = DB2INST1
    HADR timeout value (HADR_TIMEOUT) = 120
    HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
    HADR peer window duration (seconds) (HADR_PEER_WINDOW) = 0


    The behavior i got is the following.

    i can start HADR on the standby server without any problem, but once i start HADR on the primary server, the standby shutdowns and the primary fails with the following error :
    [db2inst1@pr1dbgip3 ~]$ db2 start hadr on database PIMDB as PRIMARY
    SQL1768N Unable to start HADR. Reason code = "7".

    Here are the informations i get from db2diag.log on the standby server :
    2011-04-01-18.32.58.587839+120 I477957E457 LEVEL: Error
    PID : 24538 TID : 47079602776384PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000
    EDUID : 649 EDUNAME: db2hadrs (PIMDB) 0
    FUNCTION: DB2 UDB, High Availability Disaster Recovery, hdrEduEntry, probe:21150
    RETCODE : ZRC=0x87800140=-2021654208=HDR_ZRC_CONFIGURATION_ERROR
    "One or both databases of the HADR pair is configured incorrectly"

    Here is the result of db2level on each server :
    DB21085I Instance "db2inst1" uses "64" bits and DB2 code release "SQL09070"
    with level identifier "08010107".
    Informational tokens are "DB2 v9.7.0.0", "s090521", "LINUXAMD6497", and Fix
    Pack "0".
    Product is installed at "/opt/ibm/db2/V9.7".



    Thank you for your help!

    T.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    There really isn't enough information do give you an answer. Look in db2diag.log to identify at what step during the HADR initialization the error happens. You may need to increase DIAGLEVEL to 4.

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I am not sure if it is necessary, but I always flip-flop the ports for the HADR services on primary and standby:

    For example:

    Primary:
    HADR local service name (HADR_LOCAL_SVC) = 50002
    HADR remote service name (HADR_REMOTE_SVC) = 50004

    Standby:
    HADR local service name (HADR_LOCAL_SVC) = 50004
    HADR remote service name (HADR_REMOTE_SVC) = 50002

    Also, I assume you know that the HADR service ports must be different than the instance ports, and not used by any other service.

    I also notice that you are using 9.7 FP 0 release. Only someone who is suicidal would use FP 0 now that FP3a is available.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Apr 2011
    Posts
    4
    Here are the 'interesting' lines in the db2diag.log file on the primary server :
    2011-04-27-15.29.41.011029+120 I468072E607 LEVEL: Error
    PID : 28708 TID : 47368242194752PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000
    EDUID : 126 EDUNAME: db2hadrp (PIMDB) 0
    FUNCTION: DB2 UDB, High Availability Disaster Recovery, hdrEduP, probe:20390
    MESSAGE : HADR primary did not establish connection with standby within timeout and will shut down. BY FORCE option required to start primary without
    standby. Timeout seconds =

    DATA #1 : Hexdump, 4 bytes
    0x00002B14485EFE88 : 7800 0000 x...

    2011-04-27-15.29.41.011241+120 I468680E446 LEVEL: Error
    PID : 28708 TID : 47368242194752PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000
    EDUID : 126 EDUNAME: db2hadrp (PIMDB) 0
    FUNCTION: DB2 UDB, High Availability Disaster Recovery, hdrEduP, probe:20390
    RETCODE : ZRC=0x8280001A=-2105540582=HDR_ZRC_NO_STANDBY
    "Comm time-out in unforced HADR primary start, to avoid split-brain"


    Is there a way to check if the port 50002 can be accessed from one server to the other?
    Does the start hadr on the secondary server should open the local port?

    For information we've upgraded the database to FP4.

    Regards,

    Thibault

  5. #5
    Join Date
    Apr 2011
    Posts
    4

    Red face

    In fact i've seen there were 2 errors : the first was a difference between the 2 databases (which i have fixed by backuping/restoring the database from primary to backup) and the second one was coming from a difference between 2 parameters (which i have fixed by restarting both databases).

    But i still get the error and the first error in the log is the following :
    2011-04-27-18.15.28.974240+120 I1814879E607 LEVEL: Error
    PID : 1563 TID : 47833147238720PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000
    EDUID : 134 EDUNAME: db2hadrp (PIMDB) 0
    FUNCTION: DB2 UDB, High Availability Disaster Recovery, hdrEduP, probe:20390
    MESSAGE : HADR primary did not establish connection with standby within timeout
    and will shut down. BY FORCE option required to start primary without
    standby. Timeout seconds =
    DATA #1 : Hexdump, 4 bytes
    0x00002B8087332F48 : 7800 0000 x...

    2011-04-27-18.15.28.974465+120 I1815487E446 LEVEL: Error
    PID : 1563 TID : 47833147238720PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000
    EDUID : 134 EDUNAME: db2hadrp (PIMDB) 0
    FUNCTION: DB2 UDB, High Availability Disaster Recovery, hdrEduP, probe:20390
    RETCODE : ZRC=0x8280001A=-2105540582=HDR_ZRC_NO_STANDBY
    "Comm time-out in unforced HADR primary start, to avoid split-brain"

  6. #6
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by Tite1977 View Post
    Is there a way to check if the port 50002 can be accessed from one server to the other?
    telnet pr2dbgip3 50002

  7. #7
    Join Date
    Apr 2011
    Posts
    19
    Start the stand-by FIRST then start the primary

  8. #8
    Join Date
    Apr 2011
    Posts
    4
    I always start the standby first.

    I know the telnet command (but thank you) and this one doesn't work from the primary to the standby once the standby is started. Is it normal?

    Regards,

    T.

  9. #9
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    No, it's not normal, obviously.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •