Hi Øyvind,
just stumbling over this again, realizing there's no reply yet.
That trace log presumably is from that Qlik application? And the server name it seems to be using (
grp_hist_oltp
) looks to be either an sqlhosts group name or a CM SLA name, right?
My guess is the application simply gets this name through a getenv("INFORMIXSERVER") call which would certainly be good enough in simple case, but not here.
So the application probably had to get the acutal server name to feed into cdc_opensess() through a dbinfo('servername') call.
On the other hand, looking at cdc_opensess() internally, this servername currently doesn't really serve any practical purpose and, as per a quick test, could even be an empty string (not NULL, though).
HTH,
Andreas
------------------------------
Andreas Legner
------------------------------
Original Message:
Sent: Wed May 19, 2021 07:48 AM
From: Øyvind Gjerstad
Subject: CDC through connection managers
Hi!
We have recently tested a product called QDI (or Qlik Replicate) from Qlik for consuming log data from an Informix instance through CDC. When making a direct connection to on specific server this works without issues (apart from some limitations in Informix CDC). However, since our instance is part of an HDR cluster, and we normally connect to it using a group of connection managers, we wanted to utilize the connection managers (or, at least one connection manager during the first test) for redirecting the CDC session to the current primary server.
While the connection seems to work, the first CDC api command, cdc_opensess(), fails with error code -83721:
00007348: 2021-05-19T10:41:52:602897 [SOURCE_CAPTURE ]I: Connected (informix_endpoint_esql.c:1349)
00007348: 2021-05-19T10:41:52:602897 [SOURCE_CAPTURE ]T: open cdc api session: recs per read: 256, bytes per read: 131072, poll interval: 5 (informix_endpoint_capture.c:299)
00007348: 2021-05-19T10:41:52:603896 [SOURCE_CAPTURE ]I: CDC_OPENSESS for server grp_hist_oltp Timeout 0 Max read recs 256 (informix_endpoint_esql.c:1458)
00007348: 2021-05-19T10:41:52:604895 [SOURCE_CAPTURE ]T: cdc_opensess retval = -83721 (informix_endpoint_esql.c:1487)Error in 'cdc_opensess': API retval = -83721, CDC error = 'UNKNOWN' (informix_endpoint_esql.c:1491)
It took a while before I found the meaning of this error, apparently this is
CDC_E_ARG1 | The first parameter passed to the function is not valid. |
According to the API documentation the first parameter is the server name:
>>-cdc_opensess--(--"--server_name--"--,--session_ID--,--timeout--,-->>--max_recs--,--major_version--,--minor_version--)-------------><
Now is the question, is this a problem/limitation with Informix CDC, or is it with Qlik Replicate? Have anyone utilized CDC in combination with a connection manager?
------------------------------
Øyvind Gjerstad
Developer/Architect
PostNord AS
------------------------------
#Informix