Skip to main content

ArpeOracle — Troubleshooting

Common failures and their fixes, grouped by where they show up: connecting, encryption/TLS, authenticating, the licence gate, and querying/ingesting, then how an error tells you what went wrong. For the option details referenced here, see Connection.


Connection​

Connect hangs, then fails. Every candidate address was unreachable within login_timeout — usually a firewall, a wrong port, or the listener not running. Verify with nc -vz <host> 1521. Lower login_timeout to fail faster while diagnosing.

"login timed out after N s during the ...". The whole login (TCP connect through authentication) did not finish within login_timeout (since v0.4.1 the budget covers the whole login, not just the TCP connect). The step it names says where it stalled: TCP connect (nothing answers, see above), TLS handshake (the port accepts but never completes the TLS handshake), TNS connect (the port accepts but is not an Oracle listener), or a later step (an overloaded server or listener).

"'Password' value too long (max 1024 bytes)" (or another keyword). Since v0.4.1 a value longer than its field is refused, never shortened; see the limits under Connection → Option reference.

"specify either 'SID' or 'Service Name', not both". A sid and a service_name select different CONNECT_DATA forms on the wire, so they cannot be combined. Pick one. In a uri, that also means a path segment (service name) plus ?sid= is rejected.

EZConnect with an IPv6 address is rejected. A bare IPv6 literal in a Server descriptor has ambiguous colons. Give the host and Port as separate keywords, or use the bracketed [::1] form in a uri.

Connecting to ADB hangs / the listener drops the connection. ADB's connect descriptor is long and needs v0.2.0 or later — upgrade. Also confirm you are using a wallet service name (<svc>_low.adb.oraclecloud.com) on port 1522 with ssl_mode=verify-full.

"… (Oracle 11g or older), which ArpeOracle does not support; a server running Oracle 12.1 or later is required". ArpeOracle speaks the 12c+ protocol layout, so Oracle 11g and older are refused at connect. There is no workaround — use Oracle 12.1 or later. See Compatibility.

Queries fail on describe against Oracle 21c / 23ai / 26ai. Upgrade to v0.2.10 or later: 12c through 26ai are all validated on current releases — see Compatibility.

TNS alias 'X' not found in <file>. A bare Server / Data Source name with no service name or SID is looked up in tnsnames.ora (since v0.3.11), and the file that was found has no such entry. Check the name (including any domain suffix, e.g. SALESDB.WORLD: sqlnet.ora's NAMES.DEFAULT_DOMAIN is not applied) and which file was read: adbc.arpeoracle.tns_admin, else $TNS_ADMIN, else $ORACLE_HOME/network/admin. See TNS alias.


TLS / wallets​

"unable to get local issuer certificate". The CA that issued the server certificate is not trusted. Since v0.3.12 the driver reads the operating system's CA store when no ssl_root_cert or wallet is given (the distribution bundle on Linux, RHEL 8 included, and the ROOT store on Windows); before that, RHEL 8 and Windows failed here for any CA. For a private or self-signed CA, set ssl_root_cert to its PEM file, or use a wallet.

A TCPS descriptor or tnsnames.ora entry fails certificate verification after upgrading to v0.4.1. Since v0.4.1 PROTOCOL=TCPS means ssl_mode=verify-full (it was require, with no check). Configure the CA that issued the server certificate (ssl_root_cert / wallet_location), or set ssl_mode=require explicitly to encrypt without verifying the server. See TNS descriptor.

The connection is plaintext when I expected encryption. ssl_mode defaults to disable, and the default NNE stance accepted only encrypts when the server asks for it (REQUESTED/REQUIRED). Set ssl_mode=require/verify-ca/verify-full, or encryption=requested/required for Native Network Encryption. O5LOGON keeps the password off the wire either way, but SQL text and data are in clear until you encrypt.

"wallet_location/ssl_root_cert were given but ssl_mode is 'disable'". A wallet or CA bundle does not turn TLS on by itself. Set ssl_mode to require, verify-ca or verify-full as well.

"certificate verify failed" / hostname mismatch. With verify-ca/verify-full the certificate chain (and, for verify-full, the hostname) is checked against ssl_root_cert, else the wallet's CAs, else the operating system's CA store (see Authentication → TLS). Point ssl_root_cert at the right CA bundle, or use a wallet. With ssl_root_cert or a wallet set, require checks the chain too (since v0.4.1). Connecting by IP address under verify-full needs the address in the certificate's iPAddress SANs (IP:10.0.0.5). After a SCAN REDIRECT the node's certificate may carry the configured name or the redirect host; "certificate is for neither ... nor ..." means it has neither. A subject that does not match ssl_server_cert_dn / SSL_SERVER_CERT_DN fails with both DNs in the message.

The wallet won't load. ArpeOracle reads ewallet.pem (client key + cert + CAs in one PEM), the python-oracledb-thin layout — not Oracle's cwallet.sso. Convert an SSO wallet with orapki wallet pkcs12_to_pem -wallet <dir>. An encrypted key needs wallet_password.

Windows: the DLL fails to load. The released arpeoracle_adbc_driver-win-x64.dll is self-contained — OpenSSL and the C runtime are included, so no extra DLLs are needed. It is a 64-bit (x64) library: the host process must be 64-bit too.


Native Network Encryption​

"server requires Oracle native network encryption … are 'rejected'". The server is set to REQUIRED and the client opted out with encryption=rejected / data_integrity=rejected. Leave them unset (accepted, the default, negotiates whatever the server asks for), or use TCPS.

"server requires Oracle native network encryption / data integrity on top of TCPS". Over TCPS an accepted stance is not advertised (the transport is already encrypted), but this server still requires NNE. Set encryption=requested/required (or data_integrity) to negotiate it inside TLS.

"… negotiated without data integrity" / "encryption without data integrity". encryption=requested/required is set, and the server enabled AES-256 but refused the integrity checksum (its SQLNET.CRYPTO_CHECKSUM_SERVER is REJECTED). Encryption without integrity is malleable, so since v0.4.1 ArpeOracle refuses it when encryption was asked for. Set SQLNET.CRYPTO_CHECKSUM_SERVER to ACCEPTED (the default), REQUESTED or REQUIRED on the server, or use TCPS. With data_integrity=rejected alongside encryption=requested/required, AdbcDatabaseInit refuses the options themselves: leave data_integrity unset.

"server Diffie-Hellman group is N bits, below the 2048-bit minimum". Since v0.4.1 the driver refuses a key exchange whose group would let a passive listener recover the session keys. Oracle servers send a 2048-bit group, so this points at an intermediary rewriting the negotiation; use TCPS.

"… but its ACCEPT disables advanced negotiation". The server says it requires NNE yet its answer blocks the negotiation — typically a Connection Manager or proxy rewriting the connect flags. The driver refuses to continue in plaintext; fix the intermediary's configuration or connect to the listener directly.

ORA-12660 (parameters incompatible). One side requires a service the other rejects — e.g. encryption=required against a REJECTED server, or encryption=rejected against a REQUIRED server. Align the stances.

encryption=required fails the connect / ORA-12650. The server declined to negotiate a cipher ArpeOracle offers. ArpeOracle offers only AES-256 with SHA-256/SHA-1 integrity; a server that requires DES/3DES/RC4 or MD5 will not connect. Adjust SQLNET.ENCRYPTION_TYPES_SERVER / CRYPTO_CHECKSUM_TYPES_SERVER to include AES256 / SHA256 (or SHA1).

"server requires Oracle native network encryption" with default options. Before v0.3.8 the default accepted stance did not advertise NNE at all, so a server set to REQUIRED refused a default client. Since v0.3.8 accepted advertises encryption and integrity and lets the server decide, like ODP.NET and OCI — upgrade, or set encryption=required explicitly. See the client × server matrix in Connection.

Connects are slower, or large reads lost throughput, after upgrading to v0.3.8. With the default accepted stance every plain-TCP connection now makes one extra ANO round trip at connect, and a server set to REQUESTED now gets an AES-256 + checksum session. If you do not want NNE, set both encryption=rejected and data_integrity=rejected to restore the plain handshake with no extra round trip.

Data decodes as garbage / the stream desyncs mid-result over NNE. Fixed in v0.1.7 (SHA-1 integrity); since v0.1.6 DISABLE_OOB=ON is no longer required. Upgrade to v0.1.7 or later.


Authentication​

"ORA-01017: invalid username/password". Credentials are wrong, or — for token auth on ADB — the server-side setup is off. For OAuth2/Entra, the Application ID URI must be a domain-qualified https:// URI; the Azure default api://<appId> makes ADB reject otherwise-valid tokens with a generic ORA-01017. Since v0.4.1 a refused logon is UNAUTHENTICATED with the ORA number as vendor_code; a listener that cannot be reached, a TLS failure or a timeout is IO.

"auth_method=token requires a TLS (TCPS) connection" (or oauth2). Since v0.4.1 token and OAuth2 / Entra logons are refused over plain TCP, since the token itself crosses the wire. Set ssl_mode (verify-full), or connect through a TCPS descriptor. Oracle Cloud ADB already requires TLS.

"server offered the 11G password verifier, refused by allowed_logon_version=12". Either the account has only an 11G verifier (check PASSWORD_VERSIONS in DBA_USERS; resetting the password on a server with SQLNET.ALLOWED_LOGON_VERSION_SERVER=12 or higher creates the 12C one), or a man-in-the-middle downgraded the login. See Minimum verifier.

OCI IAM / OAuth2 token: "login failed" though the token is valid. The Oracle identity must be mapped to a schema — IDENTIFIED GLOBALLY AS 'IAM_PRINCIPAL_NAME=…' (OCI) or the Entra global-user mapping. Tokens also expire (~1 h); re-mint with oci iam db-token get or refresh the Entra token. ADB requires the wallet (mutual TLS) alongside the token.

Proxy auth fails with ORA-01017. Either the authenticating account's password is wrong, or the target has not granted the proxy: ALTER USER target GRANT CONNECT THROUGH proxyacct;. Inside the session SESSION_USER is the target and PROXY_USER the authenticating account.


Licence​

Connection fails with an ARROW_LIC_* error. The licence gate is always enforced — a driver with no valid token refuses to connect. Supply one via arpeio.adbc.license_file (a .lic path), arpeio.adbc.license (the blob inline), the ARPEIO_ADBC_LICENCE[_FILE] environment variable, or an arpeio_adbc.lic file next to the driver library. Full detail — including how to read the current licence state with arpeio.adbc.license.status — is in Licensing.


Query & ingest​

adbc_ingest(mode="create") fails "already exists". The target table exists. Use append, replace, or create_append.

An ingest committed although autocommit is off. ingest_method is set to direct_path, and a direct path load is its own transaction that commits when it finishes. The default, auto, uses INSERT when autocommit is off. See Ingest method.

An ingest is slow from Python. The Python DB-API turns autocommit off, and auto then uses INSERT. Connect with autocommit=True, or set adbc.arpeoracle.ingest_method=direct_path (which commits).

An ingest is slow on one table and fast on another. With the default auto method, a table with an INSERT trigger, a foreign key, a primary / unique key, a column DEFAULT the data relies on, or a column type direct path does not load (LOB, NCHAR, …) is loaded with INSERT, an order of magnitude slower on large loads. Loading into a key-less staging table, then copying, keeps the fast path.

direct path load cannot be used on "T": it has enabled foreign keys (or triggers, or column defaults). ingest_method=direct_path refuses a table whose triggers or foreign keys a direct path load would skip. Use auto (falls back to INSERT) or insert, or disable them for the load.

direct path load committed N rows ... unique index structure(s) are now UNUSABLE. ingest_method=direct_path into a table with a unique key, and the data had duplicate keys: the rows are committed and the index is marked unusable (queries using it fail with ORA-01502). Remove the duplicates, then ALTER INDEX ... REBUILD.

An ingest waits, then fails with a lock timeout. A direct path load locks the table exclusively; uncommitted DML on the table holds it up.

An ingest or a bound INSERT fails with the date is outside Oracle's range (SQLSTATE 22008). A date32, date64 or timestamp value is before -4712-01-01 or after 9999-12-31 23:59:59; the message names the row and the column. Often an epoch in the wrong unit (milliseconds declared as timestamp[s]). See Data types.

A spatial ingest is refused with INVALID_ARGUMENT naming arpeoracle.sdo.spatial_index. Oracle Spatial cannot index a table whose name is mixed-case, lower-case or non-ASCII. Ingest into an upper-case name, or set arpeoracle.sdo.spatial_index=false. See Data types.

An ingested table "does not exist" when queried. Ingest quotes the table and column names exactly as given, so my_table becomes the case-sensitive "my_table". Query it quoted, or ingest with an upper-case name. See Data types.

A query fails with "… is not supported by this driver yet". The result has a column type ArpeOracle does not decode (e.g. BFILE, or an object type other than SDO_GEOMETRY). Leave it out of the select list, or convert it in SQL. See Data types.

Ingest into a different catalog is rejected. An Oracle session reaches one catalog only; adbc.ingest.target_catalog must be the connected service (or unset). Use target_db_schema to target a schema.

A NUMBER column comes back as strings. That is the lossless default — unconstrained NUMBER maps to utf8. For float64 or a fixed decimal, set number_mapping=double or decimal:P,S. See Data types.

A query fails with NUMBER value ... is out of range for decimal128(P,S) or ... has more fractional digits than decimal128(P,S) holds (SQLSTATE 22003). A value does not fit the number_mapping=decimal:P,S chosen for an unconstrained NUMBER; since v0.4.1 the driver refuses rather than round or corrupt it. Widen P,S, or use auto (lossless text).

A query fails with TIMESTAMP value ... is out of range for timestamp[ns] (SQLSTATE 22008). A TIMESTAMP(7..9) maps to timestamp[ns], whose int64 only spans 1677-09-21 to 2262-04-11; a 9999-12-31 sentinel does not fit. CAST the column to TIMESTAMP(6) (timestamp[us]) in the query. See Data types.

Cancelling a long query. Statement.Cancel / Connection.Cancel send an in-band TNS break from another thread and work over plaintext, Native Network Encryption, and TCPS (TLS was closed in v0.2.1). Since v0.4.1 the cancelled call fails with CANCELLED / HY008 and the session stays usable, open transaction included (ORA-01013 rolls back the cancelled statement only). A result stream cancelled between two batches sends nothing to the server: its next get_next fails with CANCELLED / HY008 before fetching more rows. If the server does not answer the break within 5 s (or socket_timeout, if shorter), the session is dropped and the next statement reconnects, except that with autocommit off a lost session costs the open transaction. A server can take a few seconds to act on a break.

Commit fails with SQLSTATE 08007 after a cancel. Autocommit was off and the connection had uncommitted DML when its session was lost (a cancel whose exchange with the server did not complete, a network or protocol failure); the server rolled that work back. Since v0.4.1, Commit and every other call on the connection fail with INVALID_STATE / 08007 rather than reconnect as if nothing happened. Call Rollback (it succeeds) and redo the work; enabling autocommit also clears the state, reporting the loss once. Queries alone (autocommit off, no DML since the last commit) lose nothing and reconnect silently, as with autocommit on.

Commit (or a statement) fails with SQLSTATE 08007 and "whether the server committed is unknown". The connection failed (a reset, socket_timeout, a cancel that cut the call off) after a request that may commit had gone out in full and before its reply arrived: an explicit Commit, any non-query statement with autocommit on (an INSERT, an ingest batch, a direct path load), or a DDL or PL/SQL block. The server may or may not have committed. Check the data before redoing the work: redoing it blindly can duplicate rows. With autocommit off the connection then refuses every call with INVALID_STATE / 08007 until Rollback; with autocommit on the next call simply reconnects.


Error codes​

Version

Since ArpeOracle v0.4.1. Before that every server error was INVALID_ARGUMENT (a refused logon IO) with vendor_code 0.

An Oracle server error reaches you as the ADBC status its ORA code implies, a SQLSTATE, the ORA number as vendor_code (for example 1 for ORA-00001), and the server's message, formatted ORA-nnnnn <message>. If you matched on INVALID_ARGUMENT for server errors, or on IO for a bad password, switch to these statuses or to vendor_code.

StatusSQLSTATEORA codes (examples)
INTEGRITY23xxx00001 unique, 01400/01407 NOT NULL, 02290 check, 02291/02292 foreign key
NOT_FOUND42S02, 42703, 4270400942 table or view, 04043 object, 00904 invalid identifier, 01918/01435 user
ALREADY_EXISTS42S0100955 name already used
UNAUTHORIZED4250101031 insufficient privileges
UNAUTHENTICATED2800001017, 01005, 01045, 28000 locked, 28001 expired
INVALID_DATA22xxx01476 divide by zero, 01722 invalid number, 01438/01426 overflow, 12899 too large, 01830-01861 date format
INVALID_ARGUMENT42000, 4260100900-00936 syntax, 06550 PL/SQL compile error
CANCELLEDHY00801013 user requested cancel
IO08xxx03113/03135 connection lost, 03114/01012 not connected, 01033/01034/01089/01090 instance not available

An ORA code with no mapping (an application's RAISE_APPLICATION_ERROR, ORA-01555, …) has SQLSTATE HY000 and the status the call used before (INVALID_ARGUMENT for a statement, IO for a logon, Commit, Rollback or a failed fetch); its vendor_code is still the ORA number. A failure with no server error behind it (transport, protocol, a driver check) has vendor_code 0.

A fetched value the driver cannot turn into its column's Arrow type fails the fetch with failed to decode column N (NAME) of row R: <reason>, the session kept, and a data SQLSTATE: 22003 for a NUMBER out of range for its type, 22008 for a date or timestamp out of range for its unit, 22007 for an invalid date image, 22018 for a malformed value, 22032 for a native JSON image the driver cannot render.

A failure while reading a result stream is also available through AdbcErrorFromArrayStream (which Python's adbc_driver_manager calls), with the same status, SQLSTATE and vendor code. The failure is final: every later get_next returns the same error, so a consumer that retries cannot take a truncated result for a complete one.


See also​