Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Point docker errors to troubleshooting doc (#1453)

Graham Neubigc821d0967c03
diff --git a/docs/modules/usage/troubleshooting/troubleshooting.md b/docs/modules/usage/troubleshooting/troubleshooting.md
index 683045fb16..7a04722c2f 100644
--- a/docs/modules/usage/troubleshooting/troubleshooting.md
+++ b/docs/modules/usage/troubleshooting/troubleshooting.md
@@ -24,7 +24,7 @@ If you're running on Windows and having trouble, check out our [guide for Window
### Symptoms
```
-Error creating controller. Please check Docker is running using docker ps
+Error creating controller. Please check Docker is running and visit `https://github.com/OpenDevin/OpenDevin/blob/main/docs/guides/Troubleshooting.md` for more debugging information.
```
```
@@ -37,8 +37,9 @@ OpenDevin uses a docker container to do its work safely, without potentially bre
### Workarounds
-- Run `docker ps` to ensure that docker is running
-- Make sure you don't need `sudo` to run docker [see here](https://www.baeldung.com/linux/docker-run-without-sudo)
+* Run `docker ps` to ensure that docker is running
+* Make sure you don't need `sudo` to run docker [see here](https://www.baeldung.com/linux/docker-run-without-sudo)
+* If you are on a mac, check the [permissions requirements](https://docs.docker.com/desktop/mac/permission-requirements/) and in particular consider enabling the "Allow the default Docker socket to be used" under "Settings > Advanced" in Docker Desktop.
## [Unable to connect to SSH box](https://github.com/OpenDevin/OpenDevin/issues/1156)
diff --git a/opendevin/sandbox/docker/exec_box.py b/opendevin/sandbox/docker/exec_box.py
index 7e86ed0ad5..fa48071a3d 100644
--- a/opendevin/sandbox/docker/exec_box.py
+++ b/opendevin/sandbox/docker/exec_box.py
@@ -57,7 +57,7 @@ class DockerExecBox(Sandbox):
self.docker_client = docker.from_env()
except Exception as ex:
logger.exception(
- 'Please check Docker is running using `docker ps`.', exc_info=False)
+ 'Error creating controller. Please check Docker is running and visit `https://github.com/OpenDevin/OpenDevin/blob/main/docs/guides/Troubleshooting.md` for more debugging information.', exc_info=False)
raise ex
self.instance_id = sid if sid is not None else str(uuid.uuid4())
diff --git a/opendevin/sandbox/docker/ssh_box.py b/opendevin/sandbox/docker/ssh_box.py
index 4a13a95f1b..8a6063cd40 100644
--- a/opendevin/sandbox/docker/ssh_box.py
+++ b/opendevin/sandbox/docker/ssh_box.py
@@ -67,7 +67,7 @@ class DockerSSHBox(Sandbox):
self.docker_client = docker.from_env()
except Exception as ex:
logger.exception(
- 'Please check Docker is running using `docker ps`.', exc_info=False)
+ 'Error creating controller. Please check Docker is running and visit `https://github.com/OpenDevin/OpenDevin/blob/main/docs/guides/Troubleshooting.md` for more debugging information.', exc_info=False)
raise ex
self.instance_id = sid if sid is not None else str(uuid.uuid4())
diff --git a/opendevin/server/agent/agent.py b/opendevin/server/agent/agent.py
index 66c8b39be1..05ec0d67e7 100644
--- a/opendevin/server/agent/agent.py
+++ b/opendevin/server/agent/agent.py
@@ -154,7 +154,7 @@ class AgentUnit:
except Exception as e:
logger.exception(f'Error creating controller: {e}')
await self.send_error(
- 'Error creating controller. Please check Docker is running using `docker ps`.'
+ 'Error creating controller. Please check Docker is running and visit `https://github.com/OpenDevin/OpenDevin/blob/main/docs/guides/Troubleshooting.md` for more debugging information..'
)
return
await self.init_done()