Skip to content

handle retriable ssh dial error#4570

Open
jgao54 wants to merge 1 commit into
mainfrom
ssh-dial-error
Open

handle retriable ssh dial error#4570
jgao54 wants to merge 1 commit into
mainfrom
ssh-dial-error

Conversation

@jgao54

@jgao54 jgao54 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Wrap ssh tunnel DialContext in SSHTunnelDialError and classify it accordingly.

The error we saw:

failed to sync records: failed to get schema for watermark table xxx.xxx: ssh: unexpected packet in response to channel open: <nil>

This can happen when SSH connection is torn down while a channel open is in flight. If the tunnel's TCP connection dies before the reply arrives from the bastion server, x/crypto/ssh's mux teardown closes the pending reply channel, and the nil message read from it formats as <nil>.

We observed this to have recovered on its own; if the bastion server is permanently down; the next attempt would fail with SSHTunnelSetupError instead and notify user.

Fixes: DBI-854

@jgao54 jgao54 requested a review from a team as a code owner July 11, 2026 02:29
@claude

claude Bot commented Jul 11, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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