All-Hands-AI / OpenHands

🙌 OpenHands: Code Less, Make More
https://all-hands.dev
MIT License
31.66k stars 3.65k forks source link

[Bug]: Command timed out, killing process.. when trying to use ssh #2157

Closed usamimeri closed 3 months ago

usamimeri commented 3 months ago

Is there an existing issue for the same bug?

Describe the bug

I try to use bash ./evaluation/swe_bench/scripts/run_infer.sh gpt-4o CodeActAgent 1 based on the document. But the program stuck on the SSH connection.

v2024-05-31 21:02:00,300 - INFO - SSHBox is running as root user with USER_ID=1000 in the sandbox
2024-05-31 21:02:00,316 - INFO - Using existing Docker container
2024-05-31 21:02:00,317 - INFO - Connecting to root@localhost via ssh. If you encounter any issues, you can try `ssh -v -p 63710 root@localhost` with the password '123456' and report the issue on GitHub. If you started OpenDevin with `docker run`, you should try `ssh -v -p 63710 root@localhost` with the password '123456 on the host machine (where you started the container).
2024-05-31 21:06:01,863 - ERROR - Command timed out, killing process...
2024-05-31 21:06:01,863 - ERROR - Command timed out, killing process...
2024-05-31 21:08:24,866 - INFO - SSHBox is running as root user with USER_ID=1000 in the sandbox
2024-05-31 21:08:24,885 - INFO - Using existing Docker container
2024-05-31 21:08:24,886 - INFO - Connecting to root@localhost via ssh. If you encounter any issues, you can try `ssh -v -p 63710 root@localhost` with the password '123456' and report the issue on GitHub. If you started OpenDevin with `docker run`, you should try `ssh -v -p 63710 root@localhost` with the password '123456 on the host machine (where you started the container).
2024-05-31 21:12:26,384 - ERROR - Command timed out, killing process...
2024-05-31 21:12:26,384 - ERROR - Command timed out, killing process...

I try to ssh -v -p 63710 root@localhost and input password "123456" then I login in successfully.

Current OpenDevin version

ghcr.io/opendevin/opendevin:0.5

Installation and Configuration

my config.toml is:

[core]
max_iterations = 100
cache_dir = "/tmp/cache"
sandbox_container_image = "ghcr.io/opendevin/sandbox:latest"
sandbox_type = "ssh"
ssh_hostname = "localhost"
sandbox_timeout = 120
ssh_password = "123456"
persist_sandbox = false

# SWEBench eval specific
use_host_network = false
run_as_devin = false
enable_auto_lint = true

# TODO: Change these to the model you want to evaluate
[gpt-4o]
model = "gpt-4o"
api_key = "sk-xxx"
temperature = 0.0

[eval_some_openai_compatible_model]
model = "openai/MODEL_NAME"
base_url = "https://OPENAI_COMPATIBLE_URL/v1"
api_key = "XXX"
temperature = 0.0

Model and Agent

No response

Operating System

wsl2 ubuntu 22.04

Reproduction Steps

No response

Logs, Errors, Screenshots, and Additional Context

No response

SmartManoj commented 3 months ago
2024-05-31 21:06:01,863 - ERROR - Command timed out, killing process...

Seems plugin initialization is timed out.

li-boxuan commented 3 months ago

Closed by https://github.com/OpenDevin/OpenDevin/pull/2172

Please let me know if you meet any other issue!

usamimeri commented 3 months ago

Closed by #2172

Please let me know if you meet any other issue!

Thanks! It acctually solved my problem and it ran smoothly now.