TheAgentCompany: OpenHands ConnectionError on Mac
Whether pre-build all runtime images or use OpenHands for evaluation directly, the same error occurs. PS: run Openhands successfully. Besides, How can I test my agents efficiently on this benchmark?
Status: Downloaded newer image for ghcr.io/theagentcompany/admin-arrange-meeting-rooms-image:1.0.0
ghcr.io/theagentcompany/admin-arrange-meeting-rooms-image:1.0.0
Building OpenHands runtime image...
10:28:29 - openhands:INFO: run_eval.py:220 - Task image name is ghcr.io/theagentcompany/admin-arrange-meeting-rooms-image:1.0.0, short name is admin-arrange-meeting-rooms-image
10:28:29 - openhands:INFO: run_eval.py:238 - build-image-only mode, will build a runtime image and then exit
10:28:29 - openhands:INFO: runtime_build.py:182 - Building image: ghcr.io/all-hands-ai/runtime:oh_v0.25.0_sk7v26uletje0he9_7xfp9tdlf9vb9rcj
================ DOCKER BUILD STARTED ================
11:31:47 - openhands:INFO: docker.py:195 - Image [ghcr.io/all-hands-ai/runtime:oh_v0.25.0_sk7v26uletje0he9_7xfp9tdlf9vb9rcj] build finished.
11:31:47 - openhands:INFO: docker.py:200 - Re-tagged image [ghcr.io/all-hands-ai/runtime:oh_v0.25.0_sk7v26uletje0he9_7xfp9tdlf9vb9rcj] with more generic tag [oh_v0.25.0_sk7v26uletje0he9]
11:31:47 - openhands:INFO: docker.py:216 - Image ghcr.io/all-hands-ai/runtime with tags [oh_v0.25.0_sk7v26uletje0he9_7xfp9tdlf9vb9rcj, oh_v0.25.0_sk7v26uletje0he9] built successfully
11:31:47 - openhands:INFO: docker_runtime.py:140 - [runtime 0310237e-9480-4be7-97e8-420d129bfab7-1b0a89c6e75c204b] Starting runtime with image: ghcr.io/all-hands-ai/runtime:oh_v0.25.0_sk7v26uletje0he9_7xfp9tdlf9vb9rcj
11:33:17 - openhands:WARNING: docker_runtime.py:215 - [runtime 0310237e-9480-4be7-97e8-420d129bfab7-1b0a89c6e75c204b] Using host network mode. If you are using MacOS, please make sure you have the latest version of Docker Desktop and enabled host network feature: https://docs.docker.com/network/drivers/host/#docker-desktop
11:33:19 - openhands:INFO: docker_runtime.py:144 - [runtime 0310237e-9480-4be7-97e8-420d129bfab7-1b0a89c6e75c204b] Container started: openhands-runtime-0310237e-9480-4be7-97e8-420d129bfab7-1b0a89c6e75c204b. VSCode URL: None
11:33:19 - openhands:INFO: docker_runtime.py:155 - [runtime 0310237e-9480-4be7-97e8-420d129bfab7-1b0a89c6e75c204b] Waiting for client to become ready at http://localhost:39596...
ERROR:root: File "/Users/Desktop/TheAgentCompany-main/evaluation/run_eval.py", line 241, in <module>
call_async_from_sync(runtime.connect)
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/openhands/utils/async_utils.py", line 50, in call_async_from_sync
result = future.result()
^^^^^^^^^^^^^^^
File "/Users/
.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/Users/
.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/Users/
.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/openhands/utils/async_utils.py", line 44, in run
return asyncio.run(arun())
^^^^^^^^^^^^^^^^^^^
File "/Users/
.pyenv/versions/3.12.0/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/Users/
.pyenv/versions/3.12.0/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/
.pyenv/versions/3.12.0/lib/python3.12/asyncio/base_events.py", line 664, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/openhands/utils/async_utils.py", line 37, in arun
result = await coro
^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/openhands/runtime/impl/docker/docker_runtime.py", line 158, in connect
await call_sync_from_async(self._wait_until_alive)
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/openhands/utils/async_utils.py", line 18, in call_sync_from_async
result = await coro
^^^^^^^^^^
File "/Users/
.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/openhands/utils/async_utils.py", line 17, in <lambda>
coro = loop.run_in_executor(None, lambda: fn(*args, **kwargs))
^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 336, in wrapped_f
return copy(f, *args, **kw)
^^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 475, in __call__
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 376, in iter
result = action(retry_state)
^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 418, in exc_check
raise retry_exc.reraise()
^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 185, in reraise
raise self.last_attempt.result()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/
.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/Users/
.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 478, in __call__
result = fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/openhands/runtime/impl/docker/docker_runtime.py", line 347, in _wait_until_alive
self.check_if_alive()
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/openhands/runtime/impl/action_execution/action_execution_client.py", line 105, in check_if_alive
with self._send_action_server_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/openhands/runtime/impl/action_execution/action_execution_client.py", line 102, in _send_action_server_request
return send_request(self.session, method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 336, in wrapped_f
return copy(f, *args, **kw)
^^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 475, in __call__
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 376, in iter
result = action(retry_state)
^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 398, in <lambda>
self._add_action_func(lambda rs: rs.outcome.result())
^^^^^^^^^^^^^^^^^^^
File "/Users/
.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/Users/
.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 478, in __call__
result = fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/openhands/runtime/utils/request.py", line 44, in send_request
response = session.request(method, url, timeout=timeout, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/
Desktop/TheAgentCompany-main/.venv/lib/python3.12/site-packages/requests/adapters.py", line 700, in send
raise ConnectionError(e, request=request)
ERROR:root:<class 'requests.exceptions.ConnectionError'>: HTTPConnectionPool(host='localhost', port=39596): Max retries exceeded with url: /alive (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10d881d90>: Failed to establish a new connection: [Errno 61] Connection refused'))
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 19 (11 by maintainers)
Unresolved, maybe we need to add this to README, or try latest OpenHands version again
To conclude, as of today, with my Macbook M1, I
For Mac users, there’s a somewhat cumbersome way but shall still work: for each task, pull the official TheAgentCompany task image, and launch a container. Inside the container, manually/programmatically download OpenHands and run evaluation from there. In fact, that’s what I do to evaluate OWL: https://github.com/TheAgentCompany/TheAgentCompany/pull/1046