IRISDialect_intersystems.create_connect_args() builds a kwargs dict with the key
"host":
But IRISDialect_intersystems.connect() reads it back under a different key:
host = kwarg.get("hostname", "localhost")
Since "hostname" is never actually present in the dict create_connect_args()
built, host silently falls back to its default value, "localhost", regardless
of what host is specified in the connection URL. The username, password, port,
and namespace keys all match correctly between the two methods — only host/
hostname is mismatched.
Impact: any connection to a non-localhost IRIS server fails. This is easy to
miss because every example in the README uses localhost, which happens to
"work" by coincidence (it's the same value the buggy fallback produces).
Connecting to IRIS running in a separate Docker container, or any remote host,
fails with a misleading error that looks like an auth problem, not a
configuration bug:
RuntimeError: <COMMUNICATION LINK ERROR> Failed to connect to server;
Details: <COMMUNICATION ERROR> Invalid Message received; Details: Access Denied
To reproduce:
from sqlalchemy import create_engine
engine = create_engine("iris+intersystems://user:pass@some-remote-host:1972/USER")
conn = engine.connect() # fails, silently tries "localhost" instead
Workaround: explicitly pass the correctly-named key via connect_args:
engine = create_engine(
"iris+intersystems://user:pass@some-remote-host:1972/USER",
connect_args={"hostname": "some-remote-host"},
)
Suggested fix: in create_connect_args(), either rename opts["host"] to
opts["hostname"], or in connect(), change kwarg.get("hostname", "localhost")
to kwarg.get("host", "localhost") — whichever matches the intended contract with
dbapi.py's connect(), which passes these straight through to
iris.connect(*args, **kwargs).
Environment:
- sqlalchemy-iris 0.20.0
- intersystems-irispython 5.3.2
- IRIS for UNIX 2026.2 (Build 221U)
- Python 3.10, SQLAlchemy 1.4
- Reproduced with both
iris:// and iris+intersystems:// schemes (both route
through the same sqlalchemy_iris/intersystems/ code path in this version)
IRISDialect_intersystems.create_connect_args()builds a kwargs dict with the key"host":But
IRISDialect_intersystems.connect()reads it back under a different key:Since
"hostname"is never actually present in the dictcreate_connect_args()built,
hostsilently falls back to its default value,"localhost", regardlessof what host is specified in the connection URL. The username, password, port,
and namespace keys all match correctly between the two methods — only
host/hostnameis mismatched.Impact: any connection to a non-localhost IRIS server fails. This is easy to
miss because every example in the README uses
localhost, which happens to"work" by coincidence (it's the same value the buggy fallback produces).
Connecting to IRIS running in a separate Docker container, or any remote host,
fails with a misleading error that looks like an auth problem, not a
configuration bug:
To reproduce:
Workaround: explicitly pass the correctly-named key via
connect_args:Suggested fix: in
create_connect_args(), either renameopts["host"]toopts["hostname"], or inconnect(), changekwarg.get("hostname", "localhost")to
kwarg.get("host", "localhost")— whichever matches the intended contract withdbapi.py'sconnect(), which passes these straight through toiris.connect(*args, **kwargs).Environment:
iris://andiris+intersystems://schemes (both routethrough the same
sqlalchemy_iris/intersystems/code path in this version)