Gen AI on IBM Z

AI and Automation on IBM Z

AI and Automation on IBM Z

AI and Automation on IBM Z is a one-stop destination to find the latest communications, news, videos and events, as well as collaborate and network.


#DevOps
#IBMZOS
#IBMZ
#DevOpsSolutions
#GenerativeAI

 View Only
  • 1.  Help Needed: Connecting Python apps to Db2 AI for z/OS integration

    Posted 09/17/26 04:04 PM
    Hello fellow AI and Automation on IBM Z community members,

    In the course of my work on the IBM Z automation project discussed in earlier threads, I encountered an issue while attempting to integrate the IBM Db2 AI for z/OS component. The installation completed successfully, but when I tried connecting from my Python application using the ibm_db library, I received the following error:
    SQL30081N  A communication error has been detected. Communication protocol being used: "TCP/IP".  Communication Function: "select".  Location where the error was detected: "192.0.2.10".  Communication protocol error code: "-1".

    The connection works fine against the local Db2 subsystem, so the issue appears to be specific to the remote AI for z/OS component. I've verified the host is reachable, firewall rules allow the traffic, and my connection string uses the exact hostname and port from the installation guide.

    I suspect this may be related to:
    • TLS/SSL configuration differences between the standard Db2 subsystem and AI for z/OS
    • Protocol handler differences in the ibm_db driver for Db2 AI connections
    • Potential misconfiguration in the AI for z/OS component itself

    Has anyone successfully integrated Python applications with Db2 AI for z/OS? I'd greatly appreciate:
    • Any tips on troubleshooting this communication error
    • Details of connection parameters you used (excluding sensitive information)
    • Insights into configuration steps for network connectivity

    My goal is to use Python and Jupyter notebooks to analyze the AI-generated insights, so any help getting past this connection roadblock would be immensely valuable.

    Thank you in advance for your assistance!

    Best regards,
    Community Member


  • 2.  RE: Help Needed: Connecting Python apps to Db2 AI for z/OS integration

    Posted 09/18/26 07:57 AM

    The SQL30081N indicates a TCP/IP communication failure between the Db2 client/application and the endpoint shown as 192.0.2.10. The communication function was select(), meaning Db2 was waiting on socket activity when the TCP/IP socket failed. This is generally a connectivity/session stability issue rather than a SQL or authentication problem. Potential causes include Db2 server restart/unavailability, firewall or load balancer reset, idle timeout, stale pooled connection, network interruption, or the remote side closing the connection. To investigate further, please provide the exact failure timestamp, source server/LPAR/IP, Db2 server IP/hostname/port, whether TLS is used, and whether a firewall/load balancer/NAT is in the path. We also need to confirm whether 192.0.2.10 is the actual IP or a masked value. Recommended next steps are to review Db2 diagnostic logs, TCP/IP logs, firewall/load balancer logs, and, if recurring, collect a packet trace during the failure window.



    ------------------------------
    Shelton Reese
    ------------------------------



  • 3.  RE: Help Needed: Connecting Python apps to Db2 AI for z/OS integration

    Posted 09/28/26 08:28 AM

    Thanks for the detailed breakdown. One thing I'm particularly curious about is the TLS side of the connection. If the local Db2 connection works normally but the remote Db2 AI for z/OS endpoint fails with SQL30081N, would it be worth testing the connection separately with TLS disabled/enabled to determine whether the failure is occurring during the SSL handshake?

    Also, is there a recommended way to verify the expected TLS version, certificate chain, and port configuration for Db2 AI for z/OS before troubleshooting the Python ibm_db layer?



    ------------------------------
    Danny Daniel
    ------------------------------