简体   繁体   中英

Not able to connect zOS DB2 with python ibm_db

I am not able to connect to remote zOS DB2 with python ibm db package. while connecting I am getting below error:

: [IBM][CLI Driver] SQL30081N  A communication error has been detected.
Communication protocol being used: "TCP/IP".
Communication API being use d: "SOCKETS".
Location where the be error was detected: "HOSTNAME".
Communication function detecting the error: "recv".
Protocol specific error code(s): "104", "*", "0".  SQLSTATE=08001`

How can I solve this error?.

Just to add firewall is open. Telnet and openssl is working fine.

I did not get how did you connect. Please, try the following to help us to understand from where are you coming from:

import ibm_db
ibm_db.connect("DATABASE=;HOSTNAME=;PORT=;PROTOCOL=TCPIP;UID=;PWD=;", "", "")

I am able to connect to the remote zOS DB2 using below connection string:

import ibm_db

ibm_db.connect("Security=SSL;database=dbname;hostname=hostip;port=port;Protocol=TCPIP;SSLClientKeystoredb=pathtothekeystoredbfile(file extension.kdb);SSLClientKeystash=pathtothekeystashfile(file extension.sth);uid=userid;pwd=password", "", "")

Also, I had to put the licence file "db2consv_zs.lic" to the LICENSE folder of ibm_db.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM