Python and Node.js applications using the open source python-oracledb or node-oracledb drivers may encounter problems connecting to Oracle databases. Under the default, out-of-the box configuration, these drivers do not have support for Oracle's native network encryption.
Important: As of Fall 2025, OIT is transitioning to requiring encryption for all database client connections. Applications using python-oracledb and node-oracledb need to be configured to use "thick" client mode to support this encryption.
- The issues with these two drivers are discussed in GitHub issues python-oracledb: Support Native Network Encryption in thin mode and node-oracledb: Support Native Network Encryption in thin mode.
Thin Client Mode Error
The error encountered when using "thin" client mode will appear something like this:
oracledb.exceptions.DatabaseError: DPY-4011: the database or network closed the connection
[Errno 54] Connection reset by peer
The solution is to use thick client mode, for which the procedure is detailed in the python-oracledb documentation. In short, install the Oracle instant client if you haven't already, and then include a call to the function oracledb.init_oracle_client() in the application code.
Oracle instant client is available for download from Oracle.