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]: [Urgent] |exec /openhands/miniforge3/bin/mamba: no such file or directory #3748

Open
2 tasks done
imeDevelopers opened this issue Sep 5, 2024 · 5 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@imeDevelopers
Copy link

imeDevelopers commented Sep 5, 2024

Is there an existing issue for the same bug?

Describe the bug

The tool not works, I am still new to OpenHands, but I think the problem is that the last released docker image are not configured correctly, as the error bellow telling that mamba is not installed or miniforge is not configured, not sure!

the command:

WORKSPACE_BASE=$(pwd)/workspace

docker run -it --pull=always \
    -e SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:0.9.2-nikolaik \
    -e SANDBOX_USER_ID=$(id -u) \
    -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
    -v $WORKSPACE_BASE:/opt/workspace_base \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -p 3000:3000 \
    --add-host host.docker.internal:host-gateway \
    --name openhands-app-$(date +%Y%m%d%H%M%S) \
    ghcr.io/all-hands-ai/openhands:0.9

normal log:

0.9: Pulling from all-hands-ai/openhands
Digest: sha256:0d511d5b76d8d65506241ccd0ca88b408458712326ceff65ae84a9dc1af93b87
Status: Image is up to date for ghcr.io/all-hands-ai/openhands:0.9
Starting OpenHands...
Running OpenHands as root
INFO:     Started server process [10]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:3000 (Press CTRL+C to quit)
INFO:     172.17.0.1:40780 - "GET / HTTP/1.1" 200 OK
INFO:     172.17.0.1:40780 - "GET /assets/index-DOvY1mIk.js HTTP/1.1" 200 OK
INFO:     172.17.0.1:40782 - "GET /assets/index--zaQvvCW.css HTTP/1.1" 200 OK
INFO:     172.17.0.1:40782 - "GET /locales/en/translation.json HTTP/1.1" 200 OK
INFO:     172.17.0.1:40780 - "GET /locales/en-US/translation.json HTTP/1.1" 404 Not Found
INFO:     172.17.0.1:40782 - "GET /favicon-32x32.png HTTP/1.1" 200 OK
INFO:     172.17.0.1:40782 - "GET /api/options/models HTTP/1.1" 200 OK
INFO:     172.17.0.1:40782 - "GET /api/options/agents HTTP/1.1" 200 OK
INFO:     172.17.0.1:40782 - "GET /api/options/security-analyzers HTTP/1.1" 200 OK
INFO:     ('172.17.0.1', 43786) - "WebSocket /ws" [accepted]
INFO:     connection open

the error:

04:58:55 - openhands:WARNING: llm.py:85 - Could not get model info for openrouter/google/gemini-pro-1.5-exp:
This model isn't mapped yet. model=openrouter/google/gemini-pro-1.5-exp, custom_llm_provider=openrouter. Add it here - https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json.
04:58:55 - openhands:INFO: agent.py:79 - Using security analyzer: 
04:58:55 - openhands:INFO: agent.py:90 - Initializing runtime `eventstream` now...
04:58:55 - openhands:INFO: runtime.py:183 - Starting container with image: ghcr.io/all-hands-ai/runtime:0.9.2-nikolaik and name: openhands-sandbox-620acf0b-b6cf-4ef8-9f3a-f23dbdd1857c_9ca82228-7a43-4085-ba24-4a77f2ff7ab6
04:58:55 - openhands:INFO: runtime.py:204 - Mount dir: /workspace
04:58:56 - openhands:INFO: runtime.py:238 - Container started. Server url: http://host.docker.internal:60967
04:58:56 - openhands:INFO: runtime.py:157 - Container initialized with plugins: ['agent_skills', 'jupyter']
04:58:56 - openhands:INFO: runtime.py:160 - Container initialized with env vars: None
04:58:56 - openhands:INFO: agent.py:116 - Agents: {'agent': AgentConfig(micro_agent_name=None, memory_enabled=False, memory_max_threads=2, llm_config=None)}
04:58:56 - openhands:INFO: agent.py:117 - Creating agent CodeActAgent using LLM openrouter/google/gemini-pro-1.5-exp
04:58:56 - openhands:ERROR: state.py:118 - Failed to restore state from session: sessions/620acf0b-b6cf-4ef8-9f3a-f23dbdd1857c/agent_state.pkl
04:58:56 - openhands:INFO: agent.py:139 - Error restoring state: sessions/620acf0b-b6cf-4ef8-9f3a-f23dbdd1857c/agent_state.pkl
04:58:56 - openhands:INFO: agent.py:140 - Agent controller initialized.
04:58:56 - openhands:INFO: session.py:139 - Server event
04:58:56 - openhands:INFO: agent_controller.py:150 - [Agent Controller 620acf0b-b6cf-4ef8-9f3a-f23dbdd1857c] Starting step loop...
04:58:56 - openhands:INFO: session.py:139 - Server event
04:58:56 - openhands:INFO: runtime.py:263 - 
------------------------------Container logs:------------------------------
    |exec /openhands/miniforge3/bin/mamba: no such file or directory
------------------------------------------------------------------------------------------

Current OpenHands version

OpenHands: 0.9.2
Docker: 27.2.0, build: 3ab4256

Installation and Configuration

WORKSPACE_BASE=$(pwd)/workspace

docker run -it --pull=always \
    -e SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:0.9.2-nikolaik \
    -e SANDBOX_USER_ID=$(id -u) \
    -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
    -v $WORKSPACE_BASE:/opt/workspace_base \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -p 3000:3000 \
    --add-host host.docker.internal:host-gateway \
    --name openhands-app-$(date +%Y%m%d%H%M%S) \
    ghcr.io/all-hands-ai/openhands:0.9

Model and Agent

No response

Operating System

Kali linux:
cat /etc/os-release
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
VERSION_ID="2024.3"
VERSION="2024.3"
VERSION_CODENAME=kali-rolling
ID=kali
ID_LIKE=debian
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"
ANSI_COLOR="1;31"

Reproduction Steps

No response

Logs, Errors, Screenshots, and Additional Context

No response

@imeDevelopers imeDevelopers added the bug Something isn't working label Sep 5, 2024
@imeDevelopers
Copy link
Author

If you note in the error log you will find 04:58:55 - openhands:INFO: runtime.py:204 - Mount dir: /workspace

this line may take about 10 minutes! (if not more!) and blocking the tool to start + at the end it can not get the contents of the workspace folder and the tool not work too! even if you fixed the original error above.

@mamoodi
Copy link
Collaborator

mamoodi commented Sep 6, 2024

Hi again! Just wondering does anything change if you run with the main tag?

docker run -it --pull=always \
    -e SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:0.9.2-nikolaik \
    -e SANDBOX_USER_ID=$(id -u) \
    -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
    -v $WORKSPACE_BASE:/opt/workspace_base \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -p 3000:3000 \
    --add-host host.docker.internal:host-gateway \
    --name openhands-app-$(date +%Y%m%d%H%M%S) \
    ghcr.io/all-hands-ai/openhands:main
    ```

@imeDevelopers
Copy link
Author

@mamoodi

Hi again! Just wondering does anything change if you run with the main tag?

docker run -it --pull=always \
    -e SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:0.9.2-nikolaik \
    -e SANDBOX_USER_ID=$(id -u) \
    -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
    -v $WORKSPACE_BASE:/opt/workspace_base \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -p 3000:3000 \
    --add-host host.docker.internal:host-gateway \
    --name openhands-app-$(date +%Y%m%d%H%M%S) \
    ghcr.io/all-hands-ai/openhands:main
    ```

Same problem exists.

@tobitege
Copy link
Collaborator

tobitege commented Sep 6, 2024

If you don't have any docker images yet, the first startup time can take several minutes (maybe 10) for it to pull the base image and then build the runtime image and start the container.
Unfortunately, during that time there is no feedback in the UI on that progress, yet.
The agent is first ready to accept your input, once the Workspace has been filled in the Code Editor tab, not before.

@imeDevelopers
Copy link
Author

@mamoodi
@tobitege
I did it manually by following Development Setup and it worked, but I faced Issues that the docker image (user "openhands") wasn't able to change/edit/add files to "workspace" folder and I needed to create user called "openhands" and changed the folder owner from root to "openhands" user.

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

3 participants