Replication of Informix
Posted in 2022
Koonjul Khemraj could not get HDR working between primary and secondary (DR cannot connect). Art Kagel and Andreas Legner said the onmode -d commands must name the opposite server, and checked ports and sqlexec service; Carlton Doe advised against the sqlexec alias; Gerd Kaluzinski suggested DBSERVERNAME. Rolling-upgrade version mismatch messages appeared. Koonjul rebuilt from scratch and replication worked, posting the config and steps.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics: High Availability & Replication, Server Administration
Hi Team,
I am setting up HA for Informix. I am getting issue with trusting both Primary + Secondary Servers.
The errors are as follow:
Primary
DR: new type = primary, secondary server name = labsoc
DR: Cannot connect to secondary server
DR: Turned off on primary server
Secondary
DR: new type = secondary, primary server name = ol_norwayso
DR: Trying to connect to primary server = ol_norwaysoc
DR: Cannot connect to primary server
DR: Turned off on secondary server
I tried both the /etc/hosts.equiv and
REMOTE_SERVER_CFG in the onconfig file but they are not working.
Telnet is working
$ telnet 192.168.1.61 16001
Trying...
Connected to 192.168.1.61.Escape character is '^]'.
The new primary server is online however the new secondary is still on -- Fast Recovery (Sec) -- Up.
Kindly share your inputs.
Thanks
Regards
Khemraj
------------------------------
koonjul khemraj
------------------------------
#Informix
Please post your SQLHOSTS settings from both servers' hosts for both servers. Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
Hi Art,
The SQLHOSTS details are:-
PRIMARY
lab onipcshm AIXSANTO 16000
labsoc onsoctcp AIXSANTO sqlexec#HDR Server
ol_norwaysoc onsoctcp tiger4S sqlexecSECONDARY
ol_norway onipcshm tiger4S 16000
ol_norwaysoc onsoctcp tiger4S sqlexec#HDR Server
labsoc onsoctcp AIXSANTO sqlexecSERVICES
sqlexec 16001/tcp #HDR
hosts.equiv
+ informix
HDRtrust
##Trusted Host ##Trusted User
AIXSANTO informix
tiger4S informix
I put some additional configs above.
Thanks
Khemraj
------------------------------
koonjul khemraj
------------------------------
Not seeing any sign for a trust problem being in your way - how would you know it's about trust?
You might be confusing primary and secondary, or which command to run where ...
Apparently you're running 'onmode -d primary labsoc' on one side - which one?
And 'onmode -d secondary ol_norwayso[c?]' on the other side?
But your sqlhosts details seem to indicate labsoc is your primary and ol_norwaysoc the secondary.
So the commands should be:
on AIXSANTO (primary box): onmode -d primary ol_norwaysoc
on tiger4s (secondary box): onmode -d secondary labsoc
The names you provide in these commands should be the opposite side's Informix server.
Does this help?
Andreas
------------------------------
Andreas Legner
------------------------------
OK, in the SQLHOSTS the comments say that labsoc is the primary and ol_norwaysoc is the HDR secondary, however, the error messages on the primary say that it thinks that the secondary is labsoc and the primary is ol_norwaysoc. Which is correct?
If the SQLHOSTS entries are correct then you onmode -d commands are backwards!
On the primary you should be running:
onmode -d primary ol_norwaysocAnd on the secondary it should be:
onmode -d secondary labsocYou have to tell the primary that it is primary to what secondary and on the secondary you have to tell it the name of the primary.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
Thanks Andreas/Art,
I have tested the below commands as requested, but both servers cannot connect.
PRIMARY - AIXSANTO
onmode -d primary ol_norwaysoc
-- On-Line (Prim)Log_Primary
DR: Primary to Primary
DR: new type = primary, secondary server name = ol_norwaysoc
DR: Cannot connect to secondary server
SECONDARY - tiger4S
onmode -d secondary labsoc
-- Fast Recovery (Sec)Log_Secondary
DR: Secondary to Secondary
DR: new type = secondary, primary server name = labsoc
DR: Trying to connect to primary server = labsoc
DR: Cannot connect to primary server
The replication is not working automatically.
------------------------------
koonjul khemraj
------------------------------
OK, so, if the informix user is trusted, and now the commands are correct, there are only two possibilties: The service sqlexec is not set to the same port number on both hosts (note that you are using a non-standard port, 16001, which is fine, but make sure that you have remove the existing default entry for the service "sqlexec" that was delivered in the system's /etc/services file which would be either 9088 or 1201 depending on how old the OS is). - OR - The port 16001 is being blocked by your firewall. Art ------------------------------ Art S. Kagel, President and Principal Consultant ASK Database Management Corp. www.askdbmgt.com ------------------------------
In addition to Art's comments, I'd strongly discourage the use of sqlexec as a network alias in SQLHOSTS. I know it's used in some cases in the documentation but use another name such as instancename_tcp. ------------------------------ Carlton Doe ------------------------------
I know this problem. It is related to the fact, that you should set the name "ol_norwaysoc" as DBSERVERNAME, not as DBSERVERALIAS. Just change these names and you will see all works as designed. Mit freundlichen Grüßen / Kind regards Gerd Kaluzinski DataOps Application Consultant IBM Expert Labs DACH, Data & AI ------------------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland Mies-van-der-Rohe-Straße 6 80807 München Phone: +49-175-228 1983 E-Mail: gerd.kaluzinski@de.ibm.com ------------------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland GmbH Vorsitzender des Aufsichtsrats: Sebastian Krause Geschäftsführung: Gregor Pillen (Vorsitzender), Nicole Reimer, Gabriele Schwarenthorer, Christine Rupp, Frank Theisen Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart, HRB 14562 / WEEE-Reg.-Nr. DE 99369940 Mit freundlichen Grüßen / Kind regards
Gerd I don't believe that matters. If you wanted to keep your HDR traffic separate from your user traffic, an option would be to create the HDR connection with an INFORMIXSERVER setting defined as part of DBSERVERALIASES and operating through a different port. Koonjul, Is port 16001 open in both directions? ------------------------------ Kirit Rana ------------------------------
Hi Team, Yes the port is opened from both servers, i tested it using telnet. I tried some changes like adding the hostname in the /etc/hosts file. Also removed informix from hosts.equiv and added the respective hosts. Now i get the following errors. PRIMARY 2:49:29 DR: Receive error 02:49:29 dr_accept thread : asfcode = -25582: oserr = 0: errstr = : Network connection is broken. 02:49:29 DR_ERR set to -1 02:49:30 rolling upgrade Invalid Level 15 12 02:49:30 rolling upgrade version mismatch ol_norwaysoc 02:49:48 rolling upgrade Invalid Level 15 12 02:49:48 rolling upgrade version mismatch ol_norwaysoc SECONDARY 02:48:48 DR_ERR set to -1 02:49:29 DR: Secondary to Secondary 02:49:29 DR: new type = secondary, primary server name = labsoc 02:49:29 DR: Trying to connect to primary server = labsoc 02:49:29 rolling upgrade Invalid Level 12 15 02:49:29 rolling upgrade version mismatch labsoc 02:49:29 DR: Cannot connect to primary server 02:49:29 DR: Turned off on secondary server 02:49:30 DR: Receive error 02:49:30 dr_accept thread : asfcode = -25582: oserr = 0: errstr = : Network connection is broken. 02:49:30 DR_ERR set to -1 There is no firewall that is blocking the servers. I used the same servers for a Guardium test and there was no issue regarding ports. I checked the ports and 16001 is present in both. tcp 0 0 192.168.1.59.16001 *.* LISTEN == primary tcp 0 0 192.168.1.61.16001 *.* LISTEN == secondary Thanks ------------------------------ koonjul khemraj ------------------------------
Koonjul Can you provide the complete picture please. It appears you are in the midst of a rolling upgrade. What are your starting and target IDS versions and can you bullet point the sequence of events that have got you to where you are. ------------------------------ Kirit Rana ------------------------------
Hi Kirit, I am only simulating replication between Primary and Secondary. The primary is online state and secondary fast recovery, The primary is not able to connect to the secondary and vice versa. This is the discussion here to sort the issue. Now, i am surprised when you said about upgrade which is not the scope here. thanks ------------------------------ koonjul khemraj ------------------------------
The failure to connect could well be behind those version mismatch messages - how could a version match or mismatch be determined without a connection? - so let's consider those irrelevant for the moment.
Koonjul,
can you try the following password-less remote connects and selects, as user informix:
from secondary: echo 'select dbservername name, dbinfo("dbhostname") host' | dbaccess sysmaster@labsoc
from primary: echo 'select dbservername name, dbinfo("dbhostname") host' | dbaccess sysmaster@ol_norwaysoc
Also: please provide Informix version and platform info.
------------------------------
Andreas Legner
------------------------------
Koonjul
It's because your last excerpt from the Message Log contained...
Primary
:
02:49:30 rolling upgrade Invalid Level 15 12
02:49:30 rolling upgrade version mismatch ol_norwaysoc
HDR Secondary
:
02:49:29 rolling upgrade Invalid Level 12 15
02:49:29 rolling upgrade version mismatch labsoc
Personally at this stage I'd trash the HDR Secondary and rebuild from a fresh ontape L0 of the Primary or ifxclone it; simply because if are not certain what has happened then once fixed, can you be certain there are no other gremlins hiding within.
Let Andreas continue investigations. I'll bail so as not to confuse matters.
------------------------------
Kirit Rana
------------------------------
Hi Team,
I am happy to share that the replication is working.
I had re-build the system from scratch to avoid any conflict with previous tested applications.
The configs are as follows - for those building replication for the first time.
PRIMARY
Hostname - pridc - 192.168.1.59
cat sqlhosts.ol_pri
ol_pri onipcshm pridc shm1
ol_prisoc onsoctcp pridc soc1#HDR Server
ol_secsoc onsoctcp drdc soc1
cat /etc/servicesshm1 16000/tcp
soc1 16001/tcp
SECONDARY
Hostname - drdc - 192.168.1.61
cat sqlhosts.ol_sec
ol_sec onipcshm drdc shm1
ol_secsoc onsoctcp drdc soc1#HDR Server
ol_prisoc onsoctcp pridc soc1
cat /etc/servicesshm1 16000/tcp
soc1 16001/tcp
STEPS
1. Make a level 0 backup in primary (ontape -s) & copied to secondary server - PRIMARY
2. Rename backup file + restore renamed backup file (ontape -p) - SECONDARY
3. Start Replication (make primary) - PRIMARY
onmode -d primary ol_secsoc4. Start Secondary
onmode -d secondary ol_prisoc - SECONDARYOUTPUT
PRIMARY
onstat -
-- On-Line (Prim)
DBACCESS is accessible to query databases.
SECONDARY
onstat -
-- Read-Only (Sec)
DBACCESS is also accessible to query databases.
I thank you all for the assistance & time for maintaining the Group Active.
Lesson learnt from Art & Lester to always use the IBM Community.
Cheers
Khemraj
------------------------------
koonjul khemraj
------------------------------
Related threads
- System Or Internal Error InterruptedIOException
- 25582 error on high volume of short live trans
- ASF Echo-Thread Server: asfcode = -25582 oserr = 4