Troubleshooting thin mode connection error DPY-4011 #170
-
I have been unable to get a thin mode connection working to our 19C database, which always errors out with DPY-4011: the database or network closed the connection. However, I am able to connect to the same database with no issues when using thick mode. I have tried adding disable_oob=True to my connection which does not solve the problem. I believe this is not specific to my machine since my coworkers are also running into the same thing. Possibly there's some mismatch between settings on the server and what the thin-mode driver is expecting, but I have no clue where to start looking. Does anyone have any suggestions on how to get the thin mode connection working? I would really prefer to use thin mode rather than including the entire client libraries package in my docker image.
with oracledb.connect(user=creds.username,
password=creds.password,
host="",
port=0000,
service_name="",
disable_oob=True) as conn:
with conn.cursor() as cur:
for result in cur.execute("SELECT 'connection succeeded' from dual"):
print(result) PYO_DEBUG_PACKETS
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Does the DB have native network encryption enabled? Eg. a line like |
Beta Was this translation helpful? Give feedback.
That suggests that NNE (native network encryption) is indeed setup (note: in the database sqlnet.ora, not the client sqlnet.ora) and this is not supported in thin mode. The suggestion is to move to TCPS (TLS) instead as this is supported in thin mode and uses standards widely supported in the industry. It is unlikely that NNE will ever be supported in thin mode for a number of reasons.