I am trying to connect the query exporter to ibm db2, and facing the following error in logs
2023-05-02 13:02:01,876 - ERROR - query-exporter - error from database "db1": (ibm_db_dbi.OperationalError) ibm_db_dbi::OperationalError: [IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "". Communication function detecting the error: "recv". Protocol specific error code(s): "104", "*", "0". SQLSTATE=08001 SQLCODE=-30081
queries:
query1:
interval: 100
databases: [db1]
metrics: [all_entries_last_hr]
sql: >
select count(*)
from
DSODB.JOBRUN JR,DSODB.JOBEXEC JE,DSODB.HOST H
where
JR.JOBID=JE.JOBID
AND H.HOSTID=JE.HOSTID
AND RUNSTARTTIMESTAMP BETWEEN current timestamp - 60 minutes and
current timestamp
kept aiohttp version at 3.7.4.post0
but nothing worked
I also tried having dsn as
dsn: db2+ibm_db://uname:pass@ip:50000/DSODB
dsn: db2+ibm_db_sa://uname:pass@ip:50000/DSODB
dsn: db2://uname:pass@ip:50000/DSODB
but nothing worked
tried varying query params for ibm db2
added DB2COMM=tcpip
DB2TCP_CLIENT_CONTIMEOUT=0
DB2TCP_CLIENT_RCVTIMEOUT=0
but nothing worked
Connection Details:
Query exporter deployed in Kubernetes pod built with ubuntu image
Firewall has been enabled between source and destination
And do we need DB2Client to connect with IBM DB2?
Could you please help me understand what's going wrong here?
Thanks
Does this still happen with newer releases? If so, can you provide what version (including whether it's virtualenv, snap or docker) and the exact configuration being used?
I am trying to connect the query exporter to ibm db2, and facing the following error in logs
2023-05-02 13:02:01,876 - ERROR - query-exporter - error from database "db1": (ibm_db_dbi.OperationalError) ibm_db_dbi::OperationalError: [IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "". Communication function detecting the error: "recv". Protocol specific error code(s): "104", "*", "0". SQLSTATE=08001 SQLCODE=-30081
config.yaml: databases: db1: dsn: db2+ibm_db://uname:pass@ip:50000/DSODB keep-connected: true autocommit: false labels: app: app1
queries: query1: interval: 100 databases: [db1] metrics: [all_entries_last_hr] sql: > select count(*) from
DSODB.JOBRUN JR,DSODB.JOBEXEC JE,DSODB.HOST H
where
JR.JOBID=JE.JOBID
AND H.HOSTID=JE.HOSTID
AND RUNSTARTTIMESTAMP BETWEEN current timestamp - 60 minutes and current timestamp
I am using python 3.10 dev and venv for this, and I also tried the troubleshoot options specified in https://github.com/albertodonato/query-exporter/issues/96 https://github.com/albertodonato/query-exporter/issues/14
I also tried having dsn as dsn: db2+ibm_db://uname:pass@ip:50000/DSODB dsn: db2+ibm_db_sa://uname:pass@ip:50000/DSODB dsn: db2://uname:pass@ip:50000/DSODB but nothing worked
tried varying query params for ibm db2 added DB2COMM=tcpip DB2TCP_CLIENT_CONTIMEOUT=0 DB2TCP_CLIENT_RCVTIMEOUT=0 but nothing worked
Connection Details: Query exporter deployed in Kubernetes pod built with ubuntu image Firewall has been enabled between source and destination
And do we need DB2Client to connect with IBM DB2?
Could you please help me understand what's going wrong here? Thanks