Skip to content

fix(clickhouse): log why connections fail - #367

Merged
catinspace-au merged 1 commit into
mainfrom
fix/connect-error-causes
Nov 21, 2026
Merged

catinspace-au merged 1 commit into
mainfrom
fix/connect-error-causes

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

DNS failures, refused connections and untrusted certificates all logged "network error: client error (Connect)". The log gave no way to tell which one to fix.

The client keeps the transport's reason only as the error's source. error_text appends each cause. The connector names its endpoint.

  • connecting to 127.0.0.1:8123: tcp connect error: Connection refused (os error 111)
  • connecting to clickhouse.invalid:8123: dns error: failed to lookup address information
  • connecting to 127.0.0.1:8443: invalid peer certificate: UnknownIssuer

The tests use a closed loopback port, a .invalid name and a TLS server with a self-signed certificate.

Add tower-service as a direct dependency. The lockfile had it through hyper-util.

DNS failures, refused connections and untrusted certificates all logged "network error: client error (Connect)". The log gave no way to tell which one to fix.

The client keeps the transport's reason only as the error's source. error_text appends each cause. The connector names its endpoint.

- connecting to 127.0.0.1:8123: tcp connect error: Connection refused (os error 111)
- connecting to clickhouse.invalid:8123: dns error: failed to lookup address information
- connecting to 127.0.0.1:8443: invalid peer certificate: UnknownIssuer

The tests use a closed loopback port, a .invalid name and a TLS server with a self-signed certificate.

Add tower-service as a direct dependency. The lockfile had it through hyper-util.
@catinspace-au
catinspace-au merged commit 925d703 into main Nov 21, 2026
26 checks passed
@catinspace-au
catinspace-au deleted the fix/connect-error-causes branch November 21, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant