Skip to content

Oracle connection fails with uncleanShutdown on non-TLS server #483

Closed

Description

@wiscaksono

What happened

Tried connecting to an Oracle database (port 1521, plain TCP, no TLS) and got this:

Failed to connect to <redacted>:1521/<redacted>: OracleSQLError(code: uncleanShutdown) - Some information has been reducted to prevent accidental leakage of sensitive data. For additional debugging details, use `String(reflecting: error)`.

The same server works fine from SQL Developer and DBeaver with identical credentials. So the database itself is reachable and accepting connections -- just not from TablePro.

What I think is going on

Based on oracle-nio issue lovetodream/oracle-nio#21, the underlying error is probably NIOSSL.NIOSSLError.uncleanShutdown. My Oracle server runs on standard port 1521 with plain TCP (no TLS/TCPS). It looks like the Oracle driver is trying to negotiate TLS, the server doesn't speak TLS, and it just drops the connection.

There's also a firewall between my machine and the server, but that shouldn't matter since other clients get through without issues.

What I expected

A successful connection, or at least a clearer error message (e.g. "TLS handshake failed, try disabling SSL" or something along those lines).

Environment

  • macOS (Apple Silicon)
  • TablePro: latest version from GitHub Releases
  • Oracle server: port 1521, plain TCP, no TLS requirement

Suggestion

It would help to have either:

  • An option in the connection form to disable TLS for Oracle connections
  • Auto-detection of whether the server supports TLS before attempting the handshake

Activity

  1. added
    bug
    on Mar 28, 2026
  2. datlechin commented on Mar 28, 2026

    @datlechin
    Member

    Thanks for reporting. I investigated and TLS is not the cause. TablePro already connects via plain TCP by default.

    The uncleanShutdown error means the server dropped the connection during the TNS handshake.

    Common causes:

    1. Oracle server older than 12c. oracle-nio only supports 12c and later.
    2. Using SID instead of Service Name. TablePro currently only supports Service Name.

    Could you share your Oracle server version and whether you connect via SID or Service Name?

  3. wiscaksono commented on Mar 28, 2026

    @wiscaksono
    Author

    Thanks for looking into this.

    Checked both:

    • Oracle version is 12.1.0.2.0 (12c Enterprise Edition, 64-bit, running on Solaris)
    • Connecting via Service Name, confirmed via SELECT VALUE FROM V$PARAMETER WHERE NAME = 'service_names'

    So neither of those should be the problem. Connects fine from DBeaver with the same host, port, service name, and credentials.

    Anything else I can check on my end?

  4. datlechin commented on Mar 28, 2026

    @datlechin
    Member

    Thanks for checking. 12.1.0.2 with Service Name should work in theory.

    This is most likely a protocol-level issue in oracle-nio (the Swift library TablePro uses). It implements the TNS wire protocol directly, unlike DBeaver which uses Oracle's official JDBC
    driver. 12.1.0.2 is the earliest 12c patchset and there may be subtle protocol differences.

    I'll investigate further and open an issue on the oracle-nio repo. Could you check the Oracle listener log to see if the connection attempt shows a rejection reason?

  5. wiscaksono commented on Mar 28, 2026

    @wiscaksono
    Author

    Don't have access to the server or listener logs, that's all on the DBA team's side.

    Can try stuff from the client side if needed. Otherwise I'll just wait for the oracle-nio investigation. Down to test a new build whenever.

  6. datlechin commented on Mar 28, 2026

    @datlechin
    Member

    Filed upstream: lovetodream/oracle-nio#106

    I confirmed Oracle 18c XE connects fine, so the issue is specific to 12.1.0.2. Waiting on the oracle-nio maintainer for input.

  7. Toni-99 commented on Mar 28, 2026

    @Toni-99

    Can confirm, that Oracle Thin Drivers are not supported.

  8. zetkey commented on Apr 17, 2026

    @zetkey

    had same issue with:

    • MBP M3 Pro
    • TablePro: latest version from GitHub Releases
    • Oracle server: port 1521, plain TCP, no TLS requirement
    • Oracle version 23ai (Enterprise Edition)
    • Connect using service name

    if allowed to compare, my config runs well on dbeaver

  9. datlechin commented on May 4, 2026

    @datlechin
    Member

    @wiscaksono @zetkey try to update both TablePro app and Oracle in Settings then try connect to the Oracle connection. Hope it would fixes the issue.

  10. wiscaksono commented on May 5, 2026

    @wiscaksono
    Author

    @wiscaksono @zetkey try to update both TablePro app and Oracle in Settings then try connect to the Oracle connection. Hope it would fixes the issue.

    Image
  11. zetkey commented on May 6, 2026

    @zetkey

    @wiscaksono @zetkey try to update both TablePro app and Oracle in Settings then try connect to the Oracle connection. Hope it would fixes the issue.

    Image

    This still happened to me too. But, some of oracle dbs that I'm using can connect just fine, some of them cannot. Still, it all works on Dbeaver.

  12. datlechin commented on May 6, 2026

    @datlechin
    Member

    Thank guy, I'll invetigest the issue more, have some references from Dbeaver

  13. tunglt1810 commented on May 29, 2026

    @tunglt1810

    up

    Error:   The Oracle server closed the connection during the login handshake.
    
  14. 7 remaining items

  15. datlechin commented on Jun 8, 2026

    @datlechin
    Member

    Thank anh @tunglt1810 đã thông tin, để em check tiếp

  16. tunglt1810 commented on Jun 9, 2026

    @tunglt1810

    mình tải bản 0.50.0 về đăng nhập oracle xong vẫn bị crassh

    Thread 17 Crashed::  Dispatch queue: nio.nioTransportServices.connectionchannel
    0   OracleDriver                  	       0x121231660 0x121150000 + 923232
    1   OracleDriver                  	       0x12123454c 0x121150000 + 935244
    2   OracleDriver                  	       0x121235754 0x121150000 + 939860
    3   OracleDriver                  	       0x121218c08 0x121150000 + 822280
    4   OracleDriver                  	       0x121217d24 0x121150000 + 818468
    5   OracleDriver                  	       0x121217b28 OracleBackendMessageDecoder.decode(context:buffer:) + 52
    6   OracleDriver                  	       0x121219498 0x121150000 + 824472
    7   OracleDriver                  	       0x121371e84 0x121150000 + 2236036
    8   OracleDriver                  	       0x121371bf4 0x121150000 + 2235380
    9   OracleDriver                  	       0x1213723cc ByteToMessageHandler.channelRead(context:data:) + 220
    10  OracleDriver                  	       0x12136438c 0x121150000 + 2179980
    11  OracleDriver                  	       0x121362694 ChannelPipeline._fireChannelRead0(_:) + 48
    12  OracleDriver                  	       0x121480624 0x121150000 + 3343908
    13  OracleDriver                  	       0x1214859b8 0x121150000 + 3365304
    14  Network                       	       0x197c6de80 0x1978ec000 + 3677824
    15  Network                       	       0x197c6fc84 0x1978ec000 + 3685508
    16  Network                       	       0x197c6dc6c 0x1978ec000 + 3677292
    17  libdispatch.dylib             	       0x18f3cdf04 _dispatch_block_async_invoke2 + 148
    18  libdispatch.dylib             	       0x18f3d84b0 _dispatch_client_callout + 16
    19  libdispatch.dylib             	       0x18f3c7030 _dispatch_lane_serial_drain + 740
    20  libdispatch.dylib             	       0x18f3c7b64 _dispatch_lane_invoke + 448
    21  libdispatch.dylib             	       0x18f3c6e98 _dispatch_lane_serial_drain + 332
    22  libdispatch.dylib             	       0x18f3c7b64 _dispatch_lane_invoke + 448
    23  libdispatch.dylib             	       0x18f3d1e34 _dispatch_root_queue_drain_deferred_wlh + 284
    24  libdispatch.dylib             	       0x18f3d1734 _dispatch_workloop_worker_thread + 720
    25  libsystem_pthread.dylib       	       0x18f575ec0 _pthread_wqthread + 292
    26  libsystem_pthread.dylib       	       0x18f574c10 start_wqthread + 8
    
  17. datlechin commented on Jun 9, 2026

    @datlechin
    Member

    Hi anh @tunglt1810, em mới release plugin Oracle v1.2.11, anh vô settings update xong thử lại xem hoạt động được chưa nha anh

  18. tunglt1810 commented on Jun 9, 2026

    @tunglt1810

    @datlechin store caching của driver update như thế nào thế
    mình vào xem vẫn chỉ thấy bản 1.2.10
    còn xoá driver thì app đang ko check đc thiếu driver và chỉ nhả ra crash

  19. tunglt1810 commented on Jun 9, 2026

    @tunglt1810
    Image bản driver này vẫn bị crash, kể cả restart app nhé
    0   OracleDriver                  	       0x121911d04 0x121830000 + 924932
    1   OracleDriver                  	       0x121914bf0 0x121830000 + 936944
    2   OracleDriver                  	       0x121915df8 0x121830000 + 941560
    3   OracleDriver                  	       0x1218f92ac 0x121830000 + 823980
    4   OracleDriver                  	       0x1218f83c8 0x121830000 + 820168
    5   OracleDriver                  	       0x1218f81cc OracleBackendMessageDecoder.decode(context:buffer:) + 96
    6   OracleDriver                  	       0x1218f9b3c 0x121830000 + 826172
    7   OracleDriver                  	       0x121a52554 0x121830000 + 2237780
    8   OracleDriver                  	       0x121a522c4 0x121830000 + 2237124
    9   OracleDriver                  	       0x121a52a9c ByteToMessageHandler.channelRead(context:data:) + 220
    10  OracleDriver                  	       0x121a44a5c 0x121830000 + 2181724
    11  OracleDriver                  	       0x121a42d64 ChannelPipeline._fireChannelRead0(_:) + 48
    12  OracleDriver                  	       0x121b60cf0 0x121830000 + 3345648
    13  OracleDriver                  	       0x121b66084 0x121830000 + 3367044
    14  Network                       	       0x197c6de80 0x1978ec000 + 3677824
    15  Network                       	       0x197c6fc84 0x1978ec000 + 3685508
    16  Network                       	       0x197c6dc6c 0x1978ec000 + 3677292
    17  libdispatch.dylib             	       0x18f3cdf04 _dispatch_block_async_invoke2 + 148
    18  libdispatch.dylib             	       0x18f3d84b0 _dispatch_client_callout + 16
    19  libdispatch.dylib             	       0x18f3c7030 _dispatch_lane_serial_drain + 740
    20  libdispatch.dylib             	       0x18f3c7b64 _dispatch_lane_invoke + 448
    21  libdispatch.dylib             	       0x18f3c6e98 _dispatch_lane_serial_drain + 332
    22  libdispatch.dylib             	       0x18f3c7b64 _dispatch_lane_invoke + 448
    23  libdispatch.dylib             	       0x18f3d1e34 _dispatch_root_queue_drain_deferred_wlh + 284
    24  libdispatch.dylib             	       0x18f3d1734 _dispatch_workloop_worker_thread + 720
    25  libsystem_pthread.dylib       	       0x18f575ec0 _pthread_wqthread + 292
    26  libsystem_pthread.dylib       	       0x18f574c10 start_wqthread + 8
    
  20. tunglt1810 commented on Jun 9, 2026

    @tunglt1810

    mình đang chạy oracle 19

  21. datlechin commented on Jun 21, 2026

    @datlechin
    Member

    Hi anh @tunglt1810, anh update lên bản mới v0.52.1 thử lại giúp em xem works chưa anh

  22. tunglt1810 commented on Jul 8, 2026

    @tunglt1810

    sau hôm report cái bug này #1807 (comment)

    mình update driver lên 1.2.15 và bị cái lỗi mới này rồi

    Connection Failed
    OracleSQLError(code: advancedNegotiationFailed) - Some information has been reducted to prevent accidental leakage of sensitive data. For additional debugging details, use `String(reflecting: error)`.
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions