Skip to content
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

[Bug]: SANDBOX_USE_HOST_NETWORK=true Error: Container openhands-runtime-rw4CAy3vto3MnbaaAAAD not found #5943

Open
1 task done
herrschmidt opened this issue Dec 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@herrschmidt
Copy link

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

I am using OpenHands on Windows 11 / WSL. And I would like to interact with a web server that the agent has spun up. I tried to do it with SANDBOX_USE_HOST_NETWORK=true and / or with network_mode: "host" in my docker_compose.yml file. But when I enable one of them or both, I get the error that the runtime can't be found (see error message below).

docker_compose.yml:

services:
  openhands-app:
    image: docker.all-hands.dev/all-hands-ai/openhands:0.16
    container_name: openhands-app
    environment:
      - SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.16-nikolaik
      - LOG_ALL_EVENTS=true
    #  - SANDBOX_USE_HOST_NETWORK=true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    # network_mode: "host"
    ports:
      - "3000:3000"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    restart: unless-stopped

networks:
  default:
    name: openhands-network

Error:

OpenHands Installation

Docker command in README

OpenHands Version

0.16

Operating System

WSL on Windows

Logs, Errors, Screenshots, and Additional Context

17:04:15 - openhands:ERROR: eventstream_runtime.py:154 - [runtime rw4CAy3vto3MnbaaAAAD] Container openhands-runtime-rw4CAy3vto3MnbaaAAAD not found.
openhands-app | INFO: 172.18.0.1:34636 - "GET /api/list-files HTTP/1.1" 500 Internal Server Error
openhands-app | ERROR: Exception in ASGI application
openhands-app | Traceback (most recent call last):
openhands-app | File "/app/.venv/lib/python3.12/site-packages/docker/api/client.py", line 275, in _raise_for_status
openhands-app | response.raise_for_status()
openhands-app | File "/app/.venv/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
openhands-app | raise HTTPError(http_error_msg, response=self)
openhands-app | requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.47/containers/openhands-runtime-rw4CAy3vto3MnbaaAAAD/json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant