HostSNI cant connect with dbeaver

Hello guys,

K8s, Traefik 20.8

I have pgbouncer service like ClusterIP and i would like to connect to it with DBeaver.

I opened a 6432 port in my LoadBalancer to proxy connection from it to my pgbouncer port

    address: ':6433/tcp'
    port: 6433 # where my pgbouncer working
    expose: true
    exposedPort: 6432 # where i want to connect 
    protocol: TCP

My Ingressroutetcp config

kind: IngressRouteTCP
  name: pgbouncer-ingressroute
      - pgbouncer
  - match: HostSNI(`')
    - name: pgbouncer
      port: 6433
    passthrough: true

I can see in dashboard that my router is made and it has status is OK with rule service etc.


Test-NetConnection -ComputerName -Port 6432

ComputerName :
RemoteAddress :
RemotePort : 6432
InterfaceAlias : Ethernet 2
SourceAddress :
TcpTestSucceeded : True

nslookup passed okay for with IP what i need

nmap passed okay for with 6432 port open status

But when i am trying to connect with DBeaver host port 6432 i received Read timed out. I stuck on this already 1 week and cant understand what could be a problem.

PS i put cause i cant post more than 4 links in a post

I think I am missing something important but idk what.

Thanks a lot in advance!

Last time I checked(a while ago nowjust now) the postgres wire protocol does not complete a TLS handshake so HostSNI will not work.

In fact a SSLRequest is sent and the server will send a N or S in response.

To continue after S, perform an SSL startup handshake (not described here, part of the SSL specification) with the server

1 Like

If no TLS is used, you can only use HostSNI(`*`), which usually means you have to use a dedicated port per target service.

1 Like

Yeap, i changed to '*' and took out tls: passthrough: true and now everything working fine, thanks a lot for help:)

Yeap, thanks a lot, i fix it:)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.