-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Error with ollama by following localllm guide #1591
Comments
I got the same error and i narrowed it down to my user not being allowed to read & write to the docker socket |
that worked, thanks, but now I'm here: sudo docker run --rm --add-host host.docker.internal=host-gateway -e LLM_API_KEY="ollama" -e LLM_BASE_URL="http://host.docker.internal:11434" -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE -v $WORKSPACE_BASE:/opt/workspace_base -v /var/run/docker.sock:/var/run/docker.sock -p 3000:3000 ghcr.io/opendevin/opendevin:main |
Same issue. However adding SANDBOX_USER_ID hasn't fixed the issue.
However |
I think it might be related #1582. Mine is also |
Hey all--main issue is you need to be able to run docker without sudo See: https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting#unable-to-connect-to-docker |
@rbren My user is in docker group that allows docker running without sudo. That worked fine in 0.4. However - see my first comment - it reports that the group does not extists |
I can run it without sude but I got this strange error, and gemini suggests the wrong shell is used. 19:09:52 - opendevin:ERROR: agent.py:167 - Error creating controller: could not set shell prompt (received: b"unset PROMPT_COMMAND\r\nPS1='[PEXPECT]\$ '\r\nset prompt='[PEXPECT]\$ '\r\nprompt restore;\r\nPS1='[PEXPECT]%(!.#.$) '\r\n", expected: '\[PEXPECT\][\$\#] '). |
I can run it normally after upgrading docker to 26.0.0 |
Right now i'm experiencing that in #1624 again. My docker is 26.1.1 via official docker repo. |
@suoko your issue is a strange one I haven't seen before. Can you open a new issue if you're still seeing it on 0.5.3? |
sudo docker run --rm --add-host host.docker.internal=host-gateway -e LLM_API_KEY="ollama" -e LLM_BASE_URL="http://host.docker.internal:11434" -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE -v $WORKSPACE_BASE:/opt/workspace_base -v /var/run/docker.sock:/var/run/docker.sock -p 3000:3000 ghcr.io/opendevin/opendevin:main
I got these errors on ubuntu 24.04
usermod: no changes
Docker socket group id: 137
usermod: group '137' does not exist
INFO: Started server process [12]
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:57958 - "GET /index.html HTTP/1.1" 304 Not Modified
INFO: 172.17.0.1:57958 - "GET /index.html HTTP/1.1" 304 Not Modified
INFO: ('172.17.0.1', 57974) - "WebSocket /ws?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiJhYzBlNzg4Ni03MjdmLTQ0MDMtYmFkMS0yZmIzMGNmNjNmYTYifQ.Qfl-TBQuRrTL4ydeAIBZQVxiWliITBhLB3YVqpuSw4I" [accepted]
INFO: connection open
10:14:43 - opendevin:INFO: agent.py:156 - Creating agent CodeActAgent using LLM ollama/llama3:latest
10:14:43 - opendevin:INFO: llm.py:67 - Initializing LLM with model: ollama/llama3:latest
10:14:43 - opendevin:INFO: ssh_box.py:67 - SSHBox is running as opendevin user with USER_ID=1000 in the sandbox
10:14:43 - opendevin:ERROR: ssh_box.py:74 - Error creating controller. Please check Docker is running and visit
https://opendevin.github.io/OpenDevin/modules/usage/troubleshooting
for more debugging information.10:14:43 - opendevin:ERROR: agent.py:167 - Error creating controller: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
Traceback (most recent call last):
File "/app/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 793, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 496, in _make_request
conn.request(
File "/app/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 400, in request
self.endheaders()
File "/usr/local/lib/python3.12/http/client.py", line 1331, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.12/http/client.py", line 1091, in _send_output
self.send(msg)
File "/usr/local/lib/python3.12/http/client.py", line 1035, in send
self.connect()
File "/app/.venv/lib/python3.12/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/.venv/lib/python3.12/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 847, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/urllib3/util/retry.py", line 470, in increment
raise reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/urllib3/util/util.py", line 38, in reraise
raise value.with_traceback(tb)
File "/app/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 793, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 496, in _make_request
conn.request(
File "/app/.venv/lib/python3.12/site-packages/urllib3/connection.py", line 400, in request
self.endheaders()
File "/usr/local/lib/python3.12/http/client.py", line 1331, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.12/http/client.py", line 1091, in _send_output
self.send(msg)
File "/usr/local/lib/python3.12/http/client.py", line 1035, in send
self.connect()
File "/app/.venv/lib/python3.12/site-packages/docker/transport/unixconn.py", line 27, in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/.venv/lib/python3.12/site-packages/docker/api/client.py", line 213, in _retrieve_server_version
return self.version(api_version=False)["ApiVersion"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/docker/api/daemon.py", line 181, in version
return self._result(self._get(url), json=True)
^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/docker/utils/decorators.py", line 44, in inner
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/docker/api/client.py", line 236, in _get
return self.get(url, **self._set_request_timeout(kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/opendevin/server/agent/agent.py", line 159, in create_controller
self.controller = AgentController(
^^^^^^^^^^^^^^^^
File "/app/opendevin/controller/agent_controller.py", line 75, in init
self.action_manager = ActionManager(self.id)
^^^^^^^^^^^^^^^^^^^^^^
File "/app/opendevin/controller/action_manager.py", line 39, in init
self.sandbox = DockerSSHBox(
^^^^^^^^^^^^^
File "/app/opendevin/runtime/docker/ssh_box.py", line 78, in init
raise ex
File "/app/opendevin/runtime/docker/ssh_box.py", line 72, in init
self.docker_client = docker.from_env()
^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/docker/client.py", line 94, in from_env
return cls(
^^^^
File "/app/.venv/lib/python3.12/site-packages/docker/client.py", line 45, in init
self.api = APIClient(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/docker/api/client.py", line 197, in init
self._version = self._retrieve_server_version()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/docker/api/client.py", line 220, in _retrieve_server_version
raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
Starting loop_recv for sid: ac0e7886-727f-4403-bad1-2fb30cf63fa6
INFO: 172.17.0.1:57966 - "GET /api/litellm-models HTTP/1.1" 200 OK
INFO: 172.17.0.1:57958 - "GET /api/refresh-files HTTP/1.1" 200 OK
INFO: 172.17.0.1:57978 - "GET /api/messages/total HTTP/1.1" 200 OK
INFO: 172.17.0.1:57966 - "GET /api/agents HTTP/1.1" 200 OK
INFO: 172.17.0.1:57966 - "DELETE /api/messages HTTP/1.1" 200 OK
Above the errors I get. It's not a docker issue apparently
The text was updated successfully, but these errors were encountered: