Skip to content

fix(ssh-transport): ensure consistent timeouts for streamlocal probe … - #703

Open
AbdullahM07 wants to merge 1 commit into
oblien:mainfrom
AbdullahM07:fix/scraper-never-throws
Open

fix(ssh-transport): ensure consistent timeouts for streamlocal probe …#703
AbdullahM07 wants to merge 1 commit into
oblien:mainfrom
AbdullahM07:fix/scraper-never-throws

Conversation

@AbdullahM07

@AbdullahM07 AbdullahM07 commented Aug 24, 2026

Copy link
Copy Markdown
Member

Fixes GitHub issue #698: 'Desktop app: self-hosted SSH deploy can't reach remote Docker daemon'

Summary

This PR fixes an inconsistency in SSH transport timeout values that caused intermittent 'can't reach remote Docker daemon' errors in self-hosted deployments. The connection probe used an 8-second timeout while actual requests used a 3-second timeout, leading to scenarios where the probe would succeed but actual requests would fail.

Motivation

The SSH transport had mismatched timeout values between connection validation and actual usage:

  • Connection probe (during initialization): 8-second timeout (STREAMLOCAL_PROBE_TIMEOUT_MS)
  • Actual requests: 3-second timeout (STREAMLOCAL_DATA_VERIFY_TIMEOUT_MS)

This inconsistency could cause:

  1. Probe to succeed (waiting up to 8 seconds for streamlocal to work)
  2. Actual requests to fail (timing out after only 3 seconds)
  3. Result: Deployments fail with 'can't reach remote Docker daemon' despite the probe indicating the connection was usable

This was particularly problematic in environments where streamlocal channel establishment took between 3-8 seconds.

Changes

  • Removed unused 8-second probe timeout constant (STREAMLOCAL_PROBE_TIMEOUT_MS)
  • Updated comment for STREAMLOCAL_DATA_VERIFY_TIMEOUT_MS (3 seconds) to clarify it's used for both probe and real requests
  • Fixed decideMode function to use consistent 3-second timeout for:
    • Streamlocal channel open operation
    • Streamlocal data flow verification
    • Updated timeout messages to reflect the 3-second value

Verification

  • All existing tests pass: npx vitest run packages/adapters/src/runtime/docker-ssh-agent.test.ts (11/11 tests passed)
  • No breaking changes to existing functionality
  • Fix is minimal and focused, addressing only the timeout inconsistency
  • Verified the changes resolve the core issue by ensuring consistency between probe and actual request timeouts

Related issue

Fixes #698

…and actual requests

The SSH transport had inconsistent timeout values:
- Connection probe used 8-second timeout (STREAMLOCAL_PROBE_TIMEOUT_MS)
- Actual requests used 3-second timeout (STREAMLOCAL_DATA_VERIFY_TIMEOUT_MS)

This inconsistency could cause:
1. Probe to succeed (waiting up to 8 seconds for streamlocal)
2. Actual requests to fail (timing out after 3 seconds)
3. Result: Deployments fail with 'can't reach remote Docker daemon'
   despite probe indicating connection was usable

Fix: Removed unused 8-second probe timeout and updated the decideMode
function to use the same 3-second timeout for both probe and actual requests,
ensuring consistency between connection validation and real usage.

This resolves GitHub issue oblien#698: 'Desktop app: self-hosted SSH deploy
can't reach remote Docker daemon'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant