You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Tabularis cannot connect to PostgreSQL via kubectl port-forward while pgAdmin works #75
Tabularis fails to connect to a PostgreSQL instance exposed locally via kubectl port-forward.
The client returns the following error:
Error: error communicating with database: failed to lookup address information: nodename nor servname provided, or not known
However, the same database connection works correctly when using pgAdmin and psql, which suggests the database itself and the port-forward are functioning correctly.
This indicates a potential issue in how Tabularis resolves or parses the connection parameters.
To Reproduce
Steps to reproduce
1. Expose PostgreSQL service locally using port-forward: kubectl port-forward svc/postgres 5432:5432
2. Connect using pgAdmin: Host: localhost Port: 5432 Database: postgres User: postgres
Connection succeeds.
3. Attempt the same connection in Tabularis using identical parameters.
4. Tabularis returns: Error: error communicating with database: failed to lookup address information: nodename nor servname provided, or not known
@getsueineko i suspected is something related to localhost resolution.
But i am afk.
I sent the request to Claude Code If you want to do a check I referenced the commit in this issue if you want check.
I tried to debug the connection using tcpdump while connecting Tabularis to a PostgreSQL instance exposed via kubectl port-forward.
Command used:
sudo tcpdump -i lo0 -X port 53729
Connection sequence observed:
1. TCP handshake completes successfully.
2. Client sends PostgreSQL SSLRequest:
0000 0008 04d2 162f
3. Server responds with S (SSL supported).
4. Client starts TLS handshake (ClientHello).
The packet begins with:
16 03 03
5. Inside ClientHello the SNI value appears to be 127.0.0.1.
6. Server immediately responds with a TLS alert:
15 03 03 00 02 02 46
which corresponds to:
TLS fatal alert: certificate_unknown
7. After that the server closes the TCP connection (FIN).
So the connection flow looks like:
TCP connect
→ SSLRequest
→ server returns S
→ TLS ClientHello (SNI=127.0.0.1)
→ TLS alert certificate_unknown
→ connection closed.
This suggests the failure happens during TLS negotiation rather than PostgreSQL authentication.
The instance is accessed through kubectl port-forward, so the client connects to 127.0.0.1, while the PostgreSQL server certificate is issued for the Kubernetes service hostname like postgres.default.svc.cluster.local
Version 0.9.7 - the same error occurs when selecting any of the four SSL modes, but now the menu for selecting databases works, meaning there is a connection, but at the same time, there isn't one.
Maybe the problem is in the http/https scheme?? I use http
Version 0.9.7 - the same error occurs when selecting any of the four SSL modes, but now the menu for selecting databases works, meaning there is a connection, but at the same time, there isn't one. Maybe the problem is in the http/https scheme?? I use http
Why HTTP or HTTPS? It's a database, not an API.
This one is working on my side:
I've tried all the options, but to no avail. In pgdmin I see prefer mode. But in tabularis I have same error "Error: error occurred while attempting to establish a TLS connection: bad protocol version"
Hi @getsueineko, I have PG in k8s with CNPG as well, and is one of the reasons I submitted #246 which is now available. Have you tried it already? Perhaps this solves your problem.
Closing due to inactivity. Native Kubernetes port-forward support (#246) is now available and should cover this setup. If it still fails on the latest release, feel free to reopen.
Activity
debba commentedon Mar 7, 2026
Thanks for feedback.
Are you able to debug from code?
I am afk now but I can do a check later
fix: normalize localhost to 127.0.0.1 to prevent IPv6 DNS resolution …
debba commentedon Mar 7, 2026
@getsueineko i suspected is something related to localhost resolution.
But i am afk.
I sent the request to Claude Code If you want to do a check I referenced the commit in this issue if you want check.
I will check when I'll back
getsueineko commentedon Mar 7, 2026
I'm not rustman =)
I tried to debug the connection using tcpdump while connecting Tabularis to a PostgreSQL instance exposed via kubectl port-forward.
Command used:
sudo tcpdump -i lo0 -X port 53729
Connection sequence observed:
1. TCP handshake completes successfully.
2. Client sends PostgreSQL SSLRequest:
0000 0008 04d2 162f
3. Server responds with S (SSL supported).
4. Client starts TLS handshake (ClientHello).
The packet begins with:
16 03 03
5. Inside ClientHello the SNI value appears to be 127.0.0.1.
6. Server immediately responds with a TLS alert:
15 03 03 00 02 02 46
which corresponds to:
TLS fatal alert: certificate_unknown
7. After that the server closes the TCP connection (FIN).
So the connection flow looks like:
TCP connect
→ SSLRequest
→ server returns S
→ TLS ClientHello (SNI=127.0.0.1)
→ TLS alert certificate_unknown
→ connection closed.
This suggests the failure happens during TLS negotiation rather than PostgreSQL authentication.
The instance is accessed through kubectl port-forward, so the client connects to 127.0.0.1, while the PostgreSQL server certificate is issued for the Kubernetes service hostname like postgres.default.svc.cluster.local
debba commentedon Mar 7, 2026
I will definitely check it when I will be on pc
debba commentedon Mar 9, 2026
@getsueineko Can you check if #77 has been solved the issue?
It's on main branch now.
getsueineko commentedon Mar 10, 2026
Version 0.9.7 - the same error occurs when selecting any of the four SSL modes, but now the menu for selecting databases works, meaning there is a connection, but at the same time, there isn't one.
Maybe the problem is in the http/https scheme?? I use http
sycured commentedon Mar 12, 2026
Why HTTP or HTTPS? It's a database, not an API.

This one is working on my side:
getsueineko commentedon Mar 12, 2026
I agree about scheme, however
sycured commentedon Mar 12, 2026
None of the SSL modes is working in your case?
In pgAdmin, click on your server name, go to the Properties tab on the right, and look at Connection String.
In my case, I see: sslmode=prefer (I've not set it manually)
getsueineko commentedon Mar 15, 2026
I've tried all the options, but to no avail. In pgdmin I see prefer mode. But in tabularis I have same error "Error: error occurred while attempting to establish a TLS connection: bad protocol version"
Cap.2026-03-15.at.16.38.08.mp4
sycured commentedon Mar 17, 2026
Can you tell me how you've deployed this PostgreSQL instance?
So I can try to reproduce your setup and issue
getsueineko commentedon May 5, 2026
I use the https://cloudnative-pg.io/ with settings like these:
metalgrid commentedon Jun 16, 2026
Hi @getsueineko, I have PG in k8s with CNPG as well, and is one of the reasons I submitted #246 which is now available. Have you tried it already? Perhaps this solves your problem.
debba commentedon Oct 6, 2026
Closing due to inactivity. Native Kubernetes port-forward support (#246) is now available and should cover this setup. If it still fails on the latest release, feel free to reopen.