HDR Problem
Posted in 2010
A user trying to set up HDR between two Linux (RHEL 5) IDS 10 instances got "DR: Cannot connect to primary server" after a level-0 ontape backup/restore and onmode -d commands. Replies pointed out errors: /etc/services should list service names, not dbservernames, and each host's services file must contain the other server's service entry; also the onmode -d commands must name the HDR dbservernames (onmode -d secondary ol_ross1hdr / onmode -d primary ol_ross2hdr). Startup order was said not to matter, but the hosts must trust each other for the informix user. The poster suspected his host trust/ssh setup was broken and also questioned mismatched logical-log numbering (restore should make them match). No confirmation of a final fix is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: High Availability & Replication, Backup & Restore, Server Administration, Networking & sqlhosts Configuration
Hi All,
I've take the whole day configuring the HDR but it didn't work. I have the
same machine and OS configuration.
This is the procedure i've done so far:
on Primary server, i have this configuration
Primary sqlhosts
#Primary
ipc_ross1 onipcshm ross1 ipcshm
ol_ross1 onsoctcp ross1 ol_ross1svc
#Secondary
#ipc_ross2 onipcshm ross2 ipcshm
ol_ross2 onsoctcp ross2 ol_ross2svc
#HDR
ol_ross1hdr onsoctcp ross1 ol_ross1hdr
ol_ross2hdr onsoctcp ross2 ol_ross2hdr
Primary /etc/services configuration
# Local services
ipcshm 1401/tcp #Informix IDS 10
ol_ross1svc 1401/tcp #Informix IDS 10
ol_ross1 1401/tcp #Informix IDS 10
#Secondary server
ol_ross2 1501/tcp #Informix IDS 10
ol_ross1hdr 1801/tcp #HDR1
ol_ross2hdr 1802/tcp #HDR2
Secondary server
SQLHOSTS
#ipc_ross1 onipcshm ross1 ipcshm
#Primary
ipc_ross2 onipcshm ross2 ipcshm
ol_ross2 onsoctcp ross2 ol_ross2svc
#Sec
ol_ross1 onsoctcp ross1 ol_ross1svc
#HDR
ol_ross1hdr onsoctcp ross1 ol_ross1hdr
ol_ross2hdr onsoctcp ross2 ol_ross2hdr
Secondary /etc/services configuration
ipcshm 1501/tcp #Informix DS 10
ol_ross2svc 1501/tcp #Informix DS 10
ol_ross2 1501/tcp #HDR
ol_ross1 1401/tcp #HDR
ol_ross1hdr 1801/tcp #HDR
ol_ross2hdr 1802/tcp #HDR
1. After i configured the above setup, i backed up Primary server using
"ontape -s -L 0" and transfer if to server2.
2. On server2, i did "ontape -p", to restore (without logs).
3. on server2, i did onmode -d secondary "ol_ross1"
I got error "DR: Cannot connect to primary server", which is normal because
the primary server is not yet online.
4. on server1, i did "oninit -sv", then, "onmode -d primary ol_ross2", then
"onmode -m".
I also interchange the command above using
oninit -sv; onmode -m; onmode -d primary ol_ross2.
I searched the internet but can't get it right.
SOS please.
Hi Jack,
In /etc/services you need entries only for the service names and NOT for
the dbservername, so remove the following entries:
> ol_ross1 1401/tcp #Informix IDS 10
> ol_ross2 1501/tcp #Informix IDS 10
Secondly, /etc/services on both primary and secondary should contain
following entries, so they know about each other.
> ol_ross1svc 1401/tcp #Informix IDS 10
> ol_ross2svc 1501/tcp #Informix DS 10
Then, keeping your primary instance up, and defined as primary, setup
secondary the way you did and that should work fine.:
Hope it helps.
- Nilesh -
ids-bounces@iiug.org wrote on 02/02/2010 09:54:47 AM:
> From:,
>
> "JACK PAPA" <informix2009@gmail.com>
>
> To:
>
> ids@iiug.org
>
> Date:
>
> 02/02/2010 09:55 AM
>
> Subject:
>
> HDR Problem [18867]
>
> Sent by:
>
> ids-bounces@iiug.org
>
> Hi All,
>
> I've take the whole day configuring the HDR but it didn't work. I have
the
> same machine and OS configuration.
>
> This is the procedure i've done so far:
>
> on Primary server, i have this configuration
>
> Primary sqlhosts
>
> #Primary
> ipc_ross1 onipcshm ross1 ipcshm
> ol_ross1 onsoctcp ross1 ol_ross1svc>
> #Secondary
> #ipc_ross2 onipcshm ross2 ipcshm
> ol_ross2 onsoctcp ross2 ol_ross2svc>
> #HDR
> ol_ross1hdr onsoctcp ross1 ol_ross1hdr
> ol_ross2hdr onsoctcp ross2 ol_ross2hdr>
> Primary /etc/services configuration
>
> # Local services
> ipcshm 1401/tcp #Informix IDS 10
> ol_ross1svc 1401/tcp #Informix IDS 10
> ol_ross1 1401/tcp #Informix IDS 10
> #Secondary server
> ol_ross2 1501/tcp #Informix IDS 10
> ol_ross1hdr 1801/tcp #HDR1
> ol_ross2hdr 1802/tcp #HDR2
>
> Secondary server
> SQLHOSTS
>
> #ipc_ross1 onipcshm ross1 ipcshm>
> #Primary
> ipc_ross2 onipcshm ross2 ipcshm
> ol_ross2 onsoctcp ross2 ol_ross2svc
> #Sec
> ol_ross1 onsoctcp ross1 ol_ross1svc
> #HDR
> ol_ross1hdr onsoctcp ross1 ol_ross1hdr
> ol_ross2hdr onsoctcp ross2 ol_ross2hdr>
> Secondary /etc/services configuration
> ipcshm 1501/tcp #Informix DS 10
> ol_ross2svc 1501/tcp #Informix DS 10
> ol_ross2 1501/tcp #HDR
> ol_ross1 1401/tcp #HDR
> ol_ross1hdr 1801/tcp #HDR
> ol_ross2hdr 1802/tcp #HDR
>
> 1. After i configured the above setup, i backed up Primary server using
> "ontape -s -L 0" and transfer if to server2.
>
> 2. On server2, i did "ontape -p", to restore (without logs).
>
> 3. on server2, i did onmode -d secondary "ol_ross1"
>
> I got error "DR: Cannot connect to primary server", which is normal
because
> the primary server is not yet online.
>
> 4. on server1, i did "oninit -sv", then, "onmode -d primary ol_ross2",
then
> "onmode -m".
>
> I also interchange the command above using
>
> oninit -sv; onmode -m; onmode -d primary ol_ross2.>
> I searched the internet but can't get it right.
>
> SOS please.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Couple of problems. The commands are not right and I don't see ol_ross2svc
set up in the etc/services file on ross1 or ol_ross1svc set up on ross2.
Did you mean to use the ol_ross1hdr and ol_ross2hdr connection names?
If so on the secondary do:
onmode -d secondary ol_ross1hdr
That declares the local server to be a secondary to ol_ross1hdr. Then on
the primary do:
onmode -d primary ol_ross2hdr
Which declares the local server to be a primary with ol_ross2hdr the
secondary.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
See you at the 2010 IIUG Informix Conference
April 25-28, 2010
Overland Park (Kansas City), KS
www.iiug.org/conf
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Tue, Feb 2, 2010 at 10:54 AM, JACK PAPA <informix2009@gmail.com> wrote:
> Hi All,
>
> I've take the whole day configuring the HDR but it didn't work. I have the
> same machine and OS configuration.
>
> This is the procedure i've done so far:
>
> on Primary server, i have this configuration
>
> Primary sqlhosts
>
> #Primary
> ipc_ross1 onipcshm ross1 ipcshm
> ol_ross1 onsoctcp ross1 ol_ross1svc>
> #Secondary
> #ipc_ross2 onipcshm ross2 ipcshm
> ol_ross2 onsoctcp ross2 ol_ross2svc>
> #HDR
> ol_ross1hdr onsoctcp ross1 ol_ross1hdr
> ol_ross2hdr onsoctcp ross2 ol_ross2hdr>
> Primary /etc/services configuration
>
> # Local services
> ipcshm 1401/tcp #Informix IDS 10
> ol_ross1svc 1401/tcp #Informix IDS 10
> ol_ross1 1401/tcp #Informix IDS 10
> #Secondary server
> ol_ross2 1501/tcp #Informix IDS 10
> ol_ross1hdr 1801/tcp #HDR1
> ol_ross2hdr 1802/tcp #HDR2
>
> Secondary server
> SQLHOSTS
>
> #ipc_ross1 onipcshm ross1 ipcshm>
> #Primary
> ipc_ross2 onipcshm ross2 ipcshm
> ol_ross2 onsoctcp ross2 ol_ross2svc
> #Sec
> ol_ross1 onsoctcp ross1 ol_ross1svc
> #HDR
> ol_ross1hdr onsoctcp ross1 ol_ross1hdr
> ol_ross2hdr onsoctcp ross2 ol_ross2hdr>
> Secondary /etc/services configuration
> ipcshm 1501/tcp #Informix DS 10
> ol_ross2svc 1501/tcp #Informix DS 10
> ol_ross2 1501/tcp #HDR
> ol_ross1 1401/tcp #HDR
> ol_ross1hdr 1801/tcp #HDR
> ol_ross2hdr 1802/tcp #HDR
>
> 1. After i configured the above setup, i backed up Primary server using
> "ontape -s -L 0" and transfer if to server2.
>
> 2. On server2, i did "ontape -p", to restore (without logs).
>
> 3. on server2, i did onmode -d secondary "ol_ross1"
>
> I got error "DR: Cannot connect to primary server", which is normal because
> the primary server is not yet online.
>
> 4. on server1, i did "oninit -sv", then, "onmode -d primary ol_ross2", then
> "onmode -m".
>
> I also interchange the command above using
>
> oninit -sv; onmode -m; onmode -d primary ol_ross2.>
> I searched the internet but can't get it right.
>
> SOS please.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0023545309886db0a8047ea1a9b6
Hi Art, Yes, i am planning to use the ol_ross1hdr/ol_ross2hdr as the connection string. BTW, is there any sequence on start up of primary and secondary? I also would like to ask about authentication, is there any authentication needed? like 'hosts.equiv, hosts, .rhosts'... Do we still need this setup? before doing hdr? if not, how it will be authenticated?
Hi, I don't think that it matters which order you identify the two servers to each other, though I've always started with the primary IB I've done it the other way around without problems also. Yes, the two systems must trust each other, at least for the specific user(s) that will be starting the database server (so normally 'informix') and any users who will be making any cross server accesses (rare in an HDR environment, but...). Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) See you at the 2010 IIUG Informix Conference April 25-28, 2010 Overland Park (Kansas City), KS www.iiug.org/conf Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Tue, Feb 2, 2010 at 10:22 PM, JACK PAPA <informix2009@gmail.com> wrote: > Hi Art, > > Yes, i am planning to use the ol_ross1hdr/ol_ross2hdr as the connection > string. BTW, is there any sequence on start up of primary and secondary? > > I also would like to ask about authentication, is there any authentication > needed? like 'hosts.equiv, hosts, .rhosts'... Do we still need this setup? > before doing hdr? if not, how it will be authenticated? > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --0015174c1c28db678a047eb3a7a2
Thanks Art. I'll try to use ssh keys first to make it more secured. We did try to use "hosts.equiv" which has hostname1 informix hostname2 informix but seems didn't work. I tested is like this ssh informix@hostname1, then it prompted me for a password. Generally, in Unix, i should not be prompted for a password if i have setup hosts.equiv. btw, i'm using Redhat EL 5. So, i guess it's the authentication where i messed up.. I will check the server next week and let you know what caused the problem.... One more thing, does the arrangement of the logical log matters on HDR? on ServerA, i had it 4,5,6,7,8,9,1,2,3,10,11.....20. while on ServerB, it is 1,2,3,.....20.
ids-bounces@iiug.org wrote on 02/03/2010 09:55:03 PM: > From: > > "JACK PAPA" <informix2009@gmail.com> > > To: > > ids@iiug.org > > Date: > > 02/03/2010 09:57 PM > > Subject: > > Re: HDR Problem [18898] > > Sent by: > > ids-bounces@iiug.org > > Thanks Art. > > I'll try to use ssh keys first to make it more secured. We did try to use > "hosts.equiv" which has > > hostname1 informix > hostname2 informix > > but seems didn't work. I tested is like this > > ssh informix@hostname1, then it prompted me for a password. Generally, in > Unix, i should not be prompted for a password if i have setup hosts.equiv. > btw, i'm using Redhat EL 5. > > So, i guess it's the authentication where i messed up.. I will check the > server next week and let you know what caused the problem.... > > One more thing, does the arrangement of the logical log matters on HDR? on > ServerA, i had it 4,5,6,7,8,9,1,2,3,10,11.....20. while on ServerB, it is > 1,2,3,.....20. > Could you elaborate what does "arrangement of the logical log" means ? - Nilesh -
Hi Niel,
I am referring to the logical logs numbering. At first the ServerA was created
and has some logs (default 3), but these logs resides on rootdbs, what i did
is create a logdbs dbspace and move the logs 1,2,3.... to that new dbspace
(logdbs). However, the new logs created were not in order as i've created
using "onparams -a -d logdbs -s size", it was numbered 4.5.6.6.7.8., 1,2,3,
9...20.
On the other hand, i migrated all the scripts that create the DB and it
automatically created all the dbspaces and logical logs in this order
1,2,3,4,5,......20..
Did you get what i mean?
Thanks for your response...
If i am not mistaken,Once you restore the DB from primary to secondary,logical log number should be same. rgds schillache