Persistent Python DB-API Connection Issues (SSL Error) to IRIS CE Docker despite SSL disabled
Hello,
I'm trying to connect a Python backend application to an InterSystems IRIS Community Edition instance running in a Docker container on an AWS EC2 instance. I'm facing persistent connection issues and an SSL Error despite the Superserver apparently having SSL disabled. I'm hoping for some insight into what might be causing this contradictory behavior.
My Setup:
- InterSystems IRIS: Community Edition (Docker image
intersystems/iris-community:2025.1) - Deployment: AWS EC2 (Ubuntu) instance.
- Port Mapping: Host port
9091mapped to container port1972(Superserver). Host port9092mapped to container port52773(Management Portal). - Persistent Storage: Configured and confirmed working with
irisowneruser and appropriate permissions. - Python Client: Using the
intersystems_irispythonpackage (version 5.1.2) as the DB-API driver.
Symptoms and Diagnostics Performed:
- Python Connection Error:
- My Python script attempts to connect using
iris.connect(). - The error received is:
RuntimeError: <COMMUNICATION LINK ERROR> Failed to connect to server; Details: <SSL Error>.
- My Python script attempts to connect using
telnetTest to Superserver Port:- From the Python backend's EC2 instance, I ran
telnet YOUR_EC2_PUBLIC_IP 9091. - The output shows:
Connected to ...followed immediately byConnection closed by foreign host. - This indicates the TCP connection is established, but the server immediately drops it.
- From the Python backend's EC2 instance, I ran
- AWS Security Group Check:
- Inbound rules for the IRIS EC2 instance explicitly allow TCP traffic on port
9091from0.0.0.0/0(for testing, will restrict later). - Outbound rules from the backend EC2 instance allow all traffic.
- Conclusion: Basic network/firewall is not blocking the connection.
- Inbound rules for the IRIS EC2 instance explicitly allow TCP traffic on port
- InterSystems IRIS Management Portal (Superserver SSL Configuration):
- I accessed
System Administration > Security > Superservers > Edit Superserver 1972. - Under "SSL/TLS support level", the "Disabled" radio button is selected. This confirms, according to the portal, that the Superserver is NOT configured for SSL.
- I accessed
The Contradiction:
The primary source of confusion is that both the Python client and the telnet behavior suggest the server is expecting an SSL connection (or immediately rejecting non-SSL), despite the Management Portal explicitly showing "SSL/TLS support level: Disabled" for Superserver 1972.
Actions Taken (Python Script Variations):
- Attempted
iris.connectwith nosslconfigparameter (default). - Attempted
iris.connectwithsslconfig=False. - Attempted
iris.connectwith anssl.SSLContextobject (receivedsslconfig must be a string or boolerror, indicating this parameter expects specific types).
My Question:
Given that the Management Portal indicates SSL is disabled for the Superserver, what could be causing the persistent <SSL Error> from the Python client and the immediate Connection closed by foreign host from telnet? Are there any other hidden configurations or common pitfalls that could lead to this behavior?
Any help or insights would be greatly appreciated!
Comments
SSL Error for this driver does not really mean it's SSL ERROR, in most cases it could mean, that connection can't be established, from the first step. Check if port really available, you could try it by using some different tools, like DBeaver.
And unfortunately I can't recommend this driver you trying to use, it's unstable. May throw sigfault errors randomly and have other bugs. I would recommend using this driver instead, in most scenarios both are compatible, this one just more stable and predictible. And this driver used by lots of other Python projects, like SQLAlchemy, Django, irissqlcli, and more based on them.
Thank you so much! Switching to the community made driver seemed to do the trick