cdr autoconf serv failed...
Posted in 2017
Topics: High Availability & Replication, Networking & sqlhosts Configuration
Hallo everyone.
I have two servers with Informix 12.10.U8 (Linux) and I want to make an
"update anywere" ER between then. Local network, no firewalls,
CDR_AUTO_DISCOVER = 1 on both servers.
host1:
- INFORMIXSERVER=server1
- sqlhosts:
g_1 group - - i=1
server1 onsoctcp host1 9088 g=g_1
- execute function task ('cdr add trustedhost', 'server2');
- cdr define serv -I g_1 (or cdr autoconfig serv)
It works....
host2:
- INFORMIXSERVER=server2
- sqlhosts:
server2 onsoctcp host2 9088
server1 onsoctcp host1 9088
cdr autoconfig serv -c server1 --targethost server2 --targetport 9088 failed
with "command failed -- unable to connect to server specified (5)"
In server_1's log I see at that time something like:
"Cannot establish SMX connection to host server2 and port number 9088.
CDR: Enterprise Replication Auto Configuration aborted. rc=5"
I tried UC9, but it didn't help too.. Trusted hosts adding (for server2) or
group definitions (in server2's sqlhosts) didn't help too... But after "cdr
define serv -I g_2 -S g_1" (if my memory serves me right :)) everything's
fine..
I know, I've missed something. But what? Why cdr autoconf doesn't work? Thank
you for your help...
This is how I got this working:
my hosts: h1 and h2, in mydom.com
my servers: s1 on h1, s2 on h2, both listening on e.g. port 1717
each server (s1 and s2) only knowing about itself, i.e. no remote or group
entries in their sqlhosts files.
CDR_AUTO_CONFIG 1 and storagepool configured on both.
on s2:
echo "execute function task ('cdr add trustedhost', 'h1.mydom.com');" |
dbaccess sysadmin
on s1:
echo "execute function task ('cdr add trustedhost', 'h2.mydom.com');" |
dbaccess sysadmin
# make local server an ER server
cdr autoconfig server
# add remote server to ER domain
cdr autoconfig server -h h2 -p 1717
So:
- you'd first establish mutual trust, using host names (FQDN),
not doing this on both sides or only using simple name (or Informix
server name as you did) will not help
- make sure s1 and s2 are the servers' main names (DBSERVERNAME rather
than any of DBSERVERALIASES)
anything else will get you odd results
- when doing this for more than two servers, you'd first establish trust
between all servers
From: "ANDY IGNATOV" <andi@mega.donetsk.ua>
To: ids@iiug.org
Date: 08/05/2017 08:40 AM
Subject: cdr autoconf serv failed... [39661]
Sent by: ids-bounces@iiug.org
Hallo everyone.
I have two servers with Informix 12.10.U8 (Linux) and I want to make an
"update anywere" ER between then. Local network, no firewalls,
CDR_AUTO_DISCOVER = 1 on both servers.
host1:
- INFORMIXSERVER=server1
- sqlhosts:
g_1 group - - i=1
server1 onsoctcp host1 9088 g=g_1
- execute function task ('cdr add trustedhost', 'server2');
- cdr define serv -I g_1 (or cdr autoconfig serv)
It works....
host2:
- INFORMIXSERVER=server2
- sqlhosts:
server2 onsoctcp host2 9088
server1 onsoctcp host1 9088
cdr autoconfig serv -c server1 --targethost server2 --targetport 9088
failed
with "command failed -- unable to connect to server specified (5)"
In server_1's log I see at that time something like:
"Cannot establish SMX connection to host server2 and port number 9088.
CDR: Enterprise Replication Auto Configuration aborted. rc=5"
I tried UC9, but it didn't help too.. Trusted hosts adding (for server2) or
group definitions (in server2's sqlhosts) didn't help too... But after "cdr
define serv -I g_2 -S g_1" (if my memory serves me right :)) everything's
fine..
I know, I've missed something. But what? Why cdr autoconf doesn't work?
Thank
you for your help...
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
... > make sure s1 and s2 are the servers' main names (DBSERVERNAME rather than any of DBSERVERALIASES) ... That was the reason. But in ER Guide I read only: "...Verify the format of the sqlhosts file. The network connection (not the shared memory connection) entry must be immediately after the database server group definition. If the network Chapter 12. Monitor and troubleshooting Enterprise Replication 12-17 connection entry is not immediately after the database server group definition, you might see the following error when you run cdr define..." and only experimentally find the solution with changing DBSERVERNAME.. Thank you for your advice!
Well, "s1" and "s2" don't really occur in any of the commands to be used. You only specify an IP:port combination (or its named representation) to connect to a server - this does not specify the port then used for replication. I actually should have said: whatever is a server's DBSERVERNAME will be used for ER. -> need to make sure DBSERVERNAME meets the criteria: - tcp connection - no ipc - non-local (local loopback), at least if you're planning to replicate between hosts - no drda - unique among all the servers to participate in this replication You'd not need to have any group syntax prepared in sqlhosts, 'cdr auto serv' would take of this. From: "ANDY IGNATOV" <andi@mega.donetsk.ua> To: ids@iiug.org Date: 08/09/2017 05:28 PM Subject: Re: cdr autoconf serv failed... [39676] Sent by: ids-bounces@iiug.org .... > make sure s1 and s2 are the servers' main names (DBSERVERNAME rather than any of DBSERVERALIASES) .... That was the reason. But in ER Guide I read only: "...Verify the format of the sqlhosts file. The network connection (not the shared memory connection) entry must be immediately after the database server group definition. If the network Chapter 12. Monitor and troubleshooting Enterprise Replication 12-17 connection entry is not immediately after the database server group definition, you might see the following error when you run cdr define..." and only experimentally find the solution with changing DBSERVERNAME.. Thank you for your advice! ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.