OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Bug] No able to run OpenDevin after 0.5.x

Open imkebe opened this issue 9 months ago • 14 comments

Is there an existing issue for the same bug?

  • [X] I have checked the troubleshooting document at https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting
  • [X] I have checked the existing issues.

Describe the bug

There is still an issue after 0.5.2. Was fine on 0.4.x

My user has

❯ id -u                                                                                                                                                               
1000

It is passed as a SANDBOX_USER_ID The var RUN_AS_DEVIN=false

User has an access to docker command without sudo .

❯ docker --version                                                                                                                                                    
Docker version 26.1.1, build 4cf5afa
❯ getent group 991                                                                                                                                                    
docker:x:991:kebe

Docker is exposed via:

❯ cat /etc/docker/daemon.json 
1  │ {
2  │      "hosts" : [
3  │           "unix:///var/run/docker.sock",                                                                                                                     
4  │           "tcp://0.0.0.0:2375"                                                                                                                               
5  │      ]                                                                                                                                                       
6  │ } 

Open Devin container has defined binding to:

/var/run/docker.sock:/var/run/docker.sock

❯ /usr/bin/ls /var/run/docker.sock -l                                                                                                                                 
srw-rw---- 1 root docker 0 05-07 16:09 /var/run/docker.sock

Current Version

0.5.2

Installation and Configuration

docker pull ghcr.io/opendevin/opendevin:0.5.2

Model and Agent

N/A

Reproduction Steps

Run container. Open WebUI

Logs, Errors, Screenshots, and Additional Context

usermod: no changes
useradd: user 'enduser' already exists
Failed to create user enduser with id 1000 for a second time. Exiting.

imkebe avatar May 07 '24 14:05 imkebe

Strange. It works for me fine.

PierrunoYT avatar May 07 '24 14:05 PierrunoYT

Thanks for the report! Definitely concerning.

@imkebe did you get a message like this in the logs?

  echo "Failed to create user enduser with id $SANDBOX_USER_ID. Moving opendevin user."

rbren avatar May 07 '24 15:05 rbren

@imkebe did you get a message like this in the logs?

Yes. It's the container logs. Where else would I get them?

imkebe avatar May 07 '24 17:05 imkebe

Pleas contact me here or via e-mail if you want an access to the container via Portainer. I can provide that.

imkebe avatar May 07 '24 18:05 imkebe

Weird. I've restarted the container and now there is no such logs.

Current ones: _opendevin_logs (5).txt

docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))

imkebe avatar May 07 '24 18:05 imkebe

Also seeing error:

Error while fetching server API version

Software seems to be broken at the moment

catid avatar May 07 '24 23:05 catid

I am experiencing the same:

docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))

When trying to load a model controller

blevlabs avatar May 08 '24 14:05 blevlabs

Error while fetching server API version is indicative of another issue--see https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting#unable-to-connect-to-docker as well as https://github.com/OpenDevin/OpenDevin/issues/1226

rbren avatar May 08 '24 15:05 rbren

It's really weird. Once again i've just restarted container. No other changes applied and now :

INFO:     192.168.201.8:59118 - "GET /api/messages/total HTTP/1.1" 200 OK
10:43:49 - opendevin:INFO: session.py:40 - WebSocket disconnected, sid: a62917c3-787e-472f-8fb9-fd440e88d9b2
INFO:     connection closed
useradd: user 'enduser' already exists
Failed to create user enduser with id 1000. Moving opendevin user.
useradd: user 'enduser' already exists
Failed to create user enduser with id 1000 for a second time. Exiting.
useradd: user 'enduser' already exists
Failed to create user enduser with id 1000. Moving opendevin user.
usermod: no changes
useradd: user 'enduser' already exists
Failed to create user enduser with id 1000 for a second time. Exiting.
useradd: user 'enduser' already exists
Failed to create user enduser with id 1000. Moving opendevin user.
usermod: no changes
useradd: user 'enduser' already exists
Failed to create user enduser with id 1000 for a second time. Exiting.
useradd: user 'enduser' already exists
Failed to create user enduser with id 1000. Moving opendevin user.
usermod: no changes
useradd: user 'enduser' already exists
Failed to create user enduser with id 1000 for a second time. Exiting.
useradd: user 'enduser' already exists
Failed to create user enduser with id 1000. Moving opendevin user.
usermod: no changes
useradd: user 'enduser' already exists
Failed to create user enduser with id 1000 for a second time. Exiting.
useradd: user 'enduser' already exists
Failed to create user enduser with id 1000. Moving opendevin user.
usermod: no changes

imkebe avatar May 08 '24 17:05 imkebe

I am also experiencing the same error on the macOS. I fixed this by reverting to the following Docker Image: ghcr.io/opendevin/opendevin:1458-merge. Changes following this tag seem to break OpenDevin in my environment.

jrgriffiniii avatar May 08 '24 20:05 jrgriffiniii

I was able to fix that in entrypoint.sh by adding docker group with fetched gid. None of the above hasn't happened since then. Now I faceing another issue but not related to this one and mentioned issues.

imkebe avatar May 08 '24 20:05 imkebe

@jrgriffiniii @imkebe 0.5.3 should hopefully fix these issues. Let me know if you're able to give it a shot!

rbren avatar May 11 '24 14:05 rbren

@rbren 0.5.3 still gives the same error for me.

xennygrimmato avatar May 11 '24 23:05 xennygrimmato

@rbren 0.5.3 still gives the same error for me.

@xennygrimmato please attach full log file here.

imkebe avatar May 13 '24 13:05 imkebe

I think this is probably fixed, we can open a new issue if @xennygrimmato can provide a log.

neubig avatar May 23 '24 16:05 neubig