Skip to content

Support the local backend with the in-server proxy #2858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2025

Conversation

jvstme
Copy link
Collaborator

@jvstme jvstme commented Jun 30, 2025

Fix this error when requesting a service running
on the local backend and served by the in-server
proxy:

  File "/dstack/src/dstack/_internal/proxy/lib/services/service_connection.py", line 82, in open
    await self._tunnel.aopen()
  File "/dstack/src/dstack/_internal/core/services/ssh/tunnel.py", line 204, in aopen
    raise get_ssh_error(stderr)
dstack._internal.core.errors.SSHError: Connection closed by UNKNOWN port 65535

If the replica runs on the local backend, connect
directly to the container, without proxy jumping
through the shim host. Similar to workarounds in
SSHAttach and runner_ssh_tunnel.

Fix this error when requesting a service running
on the local backend and served by the in-server
proxy:

```python
  File "/dstack/src/dstack/_internal/proxy/lib/services/service_connection.py", line 82, in open
    await self._tunnel.aopen()
  File "/dstack/src/dstack/_internal/core/services/ssh/tunnel.py", line 204, in aopen
    raise get_ssh_error(stderr)
dstack._internal.core.errors.SSHError: Connection closed by UNKNOWN port 65535
```

If the replica runs on the local backend, connect
directly to the container, without proxy jumping
through the shim host. Similar to workarounds in
`SSHAttach` and `runner_ssh_tunnel`.
@jvstme jvstme requested a review from r4victor June 30, 2025 11:24
@jvstme jvstme merged commit a510369 into master Jul 2, 2025
25 checks passed
@jvstme jvstme deleted the local_backend_in_server_proxy branch July 2, 2025 06:48
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.

2 participants