Skip to content

[Bug] TCP TLS handshakes fail because the peer hostname is missing #16589

Closed

Description

@wozhenbang2004

Pre-check

  • I am sure that all the content I provide is in English.

Search before asking

  • I had searched in the issues and found no similar issues.

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

3.3.8-SNAPSHOT (1cf125c42), Netty 4.2.15.Final, Temurin 21.0.13, Linux.

Steps to reproduce this issue

Connect NettyClient or NettyConnectionClient to a TLS server with a trusted certificate whose SAN matches the target address. Configure the client certificate, key and CA through SslConfig.

TCP connects, but the first TLS handshake fails:

SSLHandshakeException: (certificate_unknown) Hostname or IP address is undefined.

SslClientTlsHandler creates the engine with newEngine(alloc), leaving the peer host unset. Netty 4.2 enables HTTPS endpoint verification by default.

What you expected to happen

A trusted certificate with a matching SAN should complete the handshake. A mismatched SAN should still be rejected.

Anything else

Related to #16200, which addresses the QUIC client. This affects the TCP client pipeline in dubbo-remoting-netty4.

Reproduced with a CA-signed server certificate for 127.0.0.1. Passing the connection address to the TLS engine allows the handshake; a certificate from the same CA with SAN 127.0.0.2 is still rejected.

Do you have a (mini) reproduction demo?

  • Yes, I have a minimal reproduction demo to help resolve this issue more effectively!

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

Activity

  1. added a commit that references this issue on Nov 19, 2026
    a8dcd53
  2. added a commit that references this issue on Nov 20, 2026
    d809bb1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions