Skip to content

fix(plugin-oracle): follow TNS listener redirects - #4610

Open
datlechin wants to merge 2 commits into
mainfrom
fix/4599-oracle-tns-redirect
Open

datlechin wants to merge 2 commits into
mainfrom
fix/4599-oracle-tns-redirect

Conversation

@datlechin

@datlechin datlechin commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Pin OracleNIO to the head of fix: follow TNS listener redirects whose data comes after the REDIRECT packet oracle-nio#16 (28d9d83). A 19c or later listener answers a redirected CONNECT with a REDIRECT that holds only the data length, and sends the address in the DATA packet after it. The driver read only inline bytes, so the target came out as "", or as a decode failure when both packets arrived in one read.
  • The connect follows up to 5 redirects within one login deadline, sends the listener's descriptor with the redirect flag, and keeps TLS on every hop.
  • Through a tunnel the redirect is not followed, since the target is out of the tunnel's reach. The error names the target and says to enter that host and port.
  • Connect errors no longer show driver structs (OracleRedirectError(...), OracleMessageDecodingError(payload: <hex>), POSIXErrorCode(...)). Redirect failures, a refused port and transport errors read as text. Anything else names the driver code, as the query path does. TLS words are read only from NIOSSL's errors, so a crafted REFUSE cannot surface the client's CID.
  • A refused port fails at once instead of after the 10 s connect timeout. Network.framework still waits while the Local Network prompt is up.
  • New diagnostic panel: Listener Redirect Not Followed.
  • New probe apple/scripts/probes/check-oracle-listener-redirect.sh: a SCAN-style redirect on an Oracle Free container.
Light Dark
Before (0.89.0-beta.1 plugin) Before, light Before, dark
After After, light After, dark

Both connect to a listener that sends a REDIRECT and its DATA 300 ms apart, pointing at the Oracle Free container's second listener.

Test plan

  • TableProOracleCoreTests: 525 pass, new OracleConnectFailureMappingTests and cases in OracleCoreErrorMessageTests.
  • Fork: the decoder fed the captured 23.26 REDIRECT and DATA bytes fails 3 tests on the old pin and passes on the new one. Loopback listeners cover the follow, the hop cap, a refused or unreachable target and the shared deadline.
  • Probe on gvenzl/oracle-free 23.26: the redirect is followed and the session answers; a tunneled connect names 127.0.0.1:15212; a refused port fails in 4 ms.
  • verify.sh plugins and build pass. ios was INCONCLUSIVE: no iOS simulator runtime on this Mac; the iOS CI job covers it.

Fixes #4599

@datlechin datlechin added the backport release/0.89 Merged into main; pick onto release/0.89 label Nov 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release/0.89 Merged into main; pick onto release/0.89

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Oracle: connection fails with OracleRedirectError(address: "", connectData: nil) when the listener sends a TNS redirect

1 participant