Skip to content
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

[Bug]: fail Waiting for client to become ready... #5968

Open
1 task done
chenglu66 opened this issue Jan 2, 2025 · 17 comments
Open
1 task done

[Bug]: fail Waiting for client to become ready... #5968

chenglu66 opened this issue Jan 2, 2025 · 17 comments
Labels
bug Something isn't working

Comments

@chenglu66
Copy link

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

when i use make docker and make bulid and make run , show Waiting for client to become ready..., and does not go on

OpenHands Installation

Docker command in README

OpenHands Version

No response

Operating System

None

Logs, Errors, Screenshots, and Additional Context

INFO: 172.18.0.1:38276 - "POST /api/conversations HTTP/1.1" 200 OK
INFO: ('172.18.0.1', 38284) - "WebSocket /socket.io/?latest_event_id=-1&conversation_id=a989d29db53f479db2eafaafb461c76d&EIO=4&transport=websocket" [accepted]
INFO: 172.18.0.1:38276 - "GET /api/options/config HTTP/1.1" 200 OK
07:31:30 - openhands:INFO: listen_socket.py:26 - sio:connect: 7r8dqN7ApDcuNCJuAAAF
07:31:30 - openhands:INFO: manager.py:209 - join_conversation:a989d29db53f479db2eafaafb461c76d:7r8dqN7ApDcuNCJuAAAF
07:31:30 - openhands:INFO: manager.py:364 - _get_event_stream:a989d29db53f479db2eafaafb461c76d
07:31:30 - openhands:INFO: manager.py:367 - found_local_agent_loop:a989d29db53f479db2eafaafb461c76d
07:31:31 - openhands:INFO: docker_runtime.py:133 - [runtime a989d29db53f479db2eafaafb461c76d] Starting runtime with image: ghcr.io/all-hands-ai/runtime:0.17-nikolaik
07:31:31 - openhands:INFO: docker_runtime.py:137 - [runtime a989d29db53f479db2eafaafb461c76d] Container started: openhands-runtime-a989d29db53f479db2eafaafb461c76d. VSCode URL:
None
07:31:31 - openhands:INFO: docker_runtime.py:145 - [runtime a989d29db53f479db2eafaafb461c76d] Waiting for client to become ready at http://localhost:35402...
INFO: 172.18.0.1:38298 - "GET /api/settings HTTP/1.1" 200 OK
INFO: 172.18.0.1:38308 - "GET /api/options/config HTTP/1.1" 200 OK
07:31:45 - openhands:INFO: manager.py:434 - _cleanup_session:a989d29db53f479db2eafaafb461c76d
INFO: 172.18.0.1:53872 - "GET /api/options/config HTTP/1.1" 200 OK
INFO: 172.18.0.1:53874 - "GET /api/settings HTTP/1.1" 200 OK
INFO: 172.18.0.1:53900 - "GET /api/options/config HTTP/1.1" 200 OK
INFO: 172.18.0.1:53890 - "GET /api/settings HTTP/1.1" 200 OK
INFO: 172.18.0.1:42306 - "GET /api/options/config HTTP/1.1" 200 OK
INFO: 172.18.0.1:42298 - "GET /api/settings HTTP/1.1" 200 OK
^CINFO: Shutting down
07:32:06 - openhands:INFO: listen_socket.py:99 - sio:disconnect:7r8dqN7ApDcuNCJuAAAF
07:32:06 - openhands:INFO: manager.py:413 - disconnect_from_session:7r8dqN7ApDcuNCJuAAAF:a989d29db53f479db2eafaafb461c76d
07:32:06 - openhands:INFO: manager.py:458 - _close_session:a989d29db53f479db2eafaafb461c76d
07:32:06 - openhands:INFO: manager.py:466 - removing connections: []
07:32:06 - openhands:INFO: manager.py:475 - closing_session:a989d29db53f479db2eafaafb461c76d
INFO: Waiting for background tasks to complete. (CTRL+C to force quit)
07:32:08 - openhands:ERROR: session.py:116 - Error creating controller: HTTPConnectionPool(host='localhost', port=36361): Max retries exceeded with url: /alive (Caused by NewCon
nectionError('<urllib3.connection.HTTPConnection object at 0x7f8acde96930>: Failed to establish a new connection: [Errno 111] Connection refused'))
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/openhands-ai-9TtSrW0h-py3.12/lib/python3.12/site-packages/urllib3/connection.py", line 199, in _new_conn
sock = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.cache/pypoetry/virtualenvs/openhands-ai-9TtSrW0h-py3.12/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection
raise err
File "/root/.cache/pypoetry/virtualenvs/openhands-ai-9TtSrW0h-py3.12/lib/python3.12/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

@mamoodi
Copy link
Collaborator

mamoodi commented Jan 2, 2025

I'm guessing you are running the main branch and running make build and make run?
What OS are you running?

@avi12
Copy link

avi12 commented Jan 2, 2025

I'm also experiencing this
image

Docker command:

docker run
  -p 3000:3000
  -v /var/run/docker.sock:/var/run/docker.sock
  -v C:\repositories\extensions\youtube-time-manager\:/opt/workspace_base
  -v ~/.openhands-state:/.openhands-state
  --env DEBUG=1
  --env LOG_ALL_EVENTS=true
  --env SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:main-nikolaik
  --env WORKSPACE_MOUNT_PATH=C:\repositories\extensions\youtube-time-manager
  --name open-hands
  --pull always
  -t
  -i
  --add-host host.docker.internal:host-gateway
  --rm
  docker.all-hands.dev/all-hands-ai/openhands:main 

I think the Docker log is

ERROR:    Exception in ASGI application
2025-01-02T13:58:50.774356780Z   + Exception Group Traceback (most recent call last):
2025-01-02T13:58:50.774364923Z   |   File "/app/.venv/lib/python3.12/site-packages/starlette/_utils.py", line 76, in collapse_excgroups
2025-01-02T13:58:50.774367938Z   |     yield
2025-01-02T13:58:50.774370653Z   |   File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 186, in __call__
2025-01-02T13:58:50.774373266Z   |     async with anyio.create_task_group() as task_group:
2025-01-02T13:58:50.774375780Z   |   File "/app/.venv/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 763, in __aexit__
2025-01-02T13:58:50.774378796Z   |     raise BaseExceptionGroup(
2025-01-02T13:58:50.774381208Z   | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
2025-01-02T13:58:50.774383722Z   +-+---------------- 1 ----------------
2025-01-02T13:58:50.774386134Z     | Traceback (most recent call last):
2025-01-02T13:58:50.774388648Z     |   File "/app/.venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
2025-01-02T13:58:50.774391261Z     |     result = await app(  # type: ignore[func-returns-value]
2025-01-02T13:58:50.774393674Z     |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774407949Z     |   File "/app/.venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
2025-01-02T13:58:50.774411066Z     |     return await self.app(scope, receive, send)
2025-01-02T13:58:50.774413478Z     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774415992Z     |   File "/app/.venv/lib/python3.12/site-packages/engineio/async_drivers/asgi.py", line 75, in __call__
2025-01-02T13:58:50.774418605Z     |     await self.other_asgi_app(scope, receive, send)
2025-01-02T13:58:50.774421119Z     |   File "/app/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
2025-01-02T13:58:50.774425642Z     |     await super().__call__(scope, receive, send)
2025-01-02T13:58:50.774428055Z     |   File "/app/.venv/lib/python3.12/site-packages/starlette/applications.py", line 113, in __call__
2025-01-02T13:58:50.774430568Z     |     await self.middleware_stack(scope, receive, send)
2025-01-02T13:58:50.774433383Z     |   File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 187, in __call__
2025-01-02T13:58:50.774436198Z     |     raise exc
2025-01-02T13:58:50.774438611Z     |   File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 165, in __call__
2025-01-02T13:58:50.774441124Z     |     await self.app(scope, receive, _send)
2025-01-02T13:58:50.774444844Z     |   File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 185, in __call__
2025-01-02T13:58:50.774447558Z     |     with collapse_excgroups():
2025-01-02T13:58:50.774449971Z     |   File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
2025-01-02T13:58:50.774452484Z     |     self.gen.throw(value)
2025-01-02T13:58:50.774454897Z     |   File "/app/.venv/lib/python3.12/site-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-01-02T13:58:50.774457611Z     |     raise exc
2025-01-02T13:58:50.774460024Z     |   File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 187, in __call__
2025-01-02T13:58:50.774462637Z     |     response = await self.dispatch_func(request, call_next)
2025-01-02T13:58:50.774465050Z     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774467563Z     |   File "/app/openhands/server/middleware.py", line 157, in __call__
2025-01-02T13:58:50.774470077Z     |     response = await self._attach_conversation(request)
2025-01-02T13:58:50.774472489Z     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774477315Z     |   File "/app/openhands/server/middleware.py", line 137, in _attach_conversation
2025-01-02T13:58:50.774479929Z     |     request.state.conversation = await session_manager.attach_to_conversation(
2025-01-02T13:58:50.774482341Z     |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774488071Z     |   File "/app/openhands/server/session/manager.py", line 197, in attach_to_conversation
2025-01-02T13:58:50.774490786Z     |     await c.connect()
2025-01-02T13:58:50.774493198Z     |   File "/app/openhands/server/session/conversation.py", line 43, in connect
2025-01-02T13:58:50.774495712Z     |     await self.runtime.connect()
2025-01-02T13:58:50.774498124Z     |   File "/app/openhands/runtime/impl/docker/docker_runtime.py", line 148, in connect
2025-01-02T13:58:50.774500638Z     |     await call_sync_from_async(self._wait_until_alive)
2025-01-02T13:58:50.774503050Z     |   File "/app/openhands/utils/async_utils.py", line 18, in call_sync_from_async
2025-01-02T13:58:50.774505564Z     |     result = await coro
2025-01-02T13:58:50.774508077Z     |              ^^^^^^^^^^
2025-01-02T13:58:50.774510389Z     |   File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
2025-01-02T13:58:50.774513003Z     |     result = self.fn(*self.args, **self.kwargs)
2025-01-02T13:58:50.774515416Z     |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774517828Z     |   File "/app/openhands/utils/async_utils.py", line 17, in <lambda>
2025-01-02T13:58:50.774520543Z     |     coro = loop.run_in_executor(None, lambda: fn(*args, **kwargs))
2025-01-02T13:58:50.774523056Z     |                                               ^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774525770Z     |   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 336, in wrapped_f
2025-01-02T13:58:50.774528384Z     |     return copy(f, *args, **kw)
2025-01-02T13:58:50.774530897Z     |            ^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774533310Z     |   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 475, in __call__
2025-01-02T13:58:50.774535823Z     |     do = self.iter(retry_state=retry_state)
2025-01-02T13:58:50.774538236Z     |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774540648Z     |   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 376, in iter
2025-01-02T13:58:50.774543162Z     |     result = action(retry_state)
2025-01-02T13:58:50.774545574Z     |              ^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774547987Z     |   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 418, in exc_check
2025-01-02T13:58:50.774550500Z     |     raise retry_exc.reraise()
2025-01-02T13:58:50.774552913Z     |           ^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774555326Z     |   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 185, in reraise
2025-01-02T13:58:50.774557839Z     |     raise self.last_attempt.result()
2025-01-02T13:58:50.774560252Z     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774562664Z     |   File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 449, in result
2025-01-02T13:58:50.774581866Z     |     return self.__get_result()
2025-01-02T13:58:50.774586993Z     |            ^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774589506Z     |   File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
2025-01-02T13:58:50.774592019Z     |     raise self._exception
2025-01-02T13:58:50.774594432Z     |   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 478, in __call__
2025-01-02T13:58:50.774597046Z     |     result = fn(*args, **kwargs)
2025-01-02T13:58:50.774599659Z     |              ^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774602072Z     |   File "/app/openhands/runtime/impl/docker/docker_runtime.py", line 331, in _wait_until_alive
2025-01-02T13:58:50.774604686Z     |     self.check_if_alive()
2025-01-02T13:58:50.774607099Z     |   File "/app/openhands/runtime/impl/action_execution/action_execution_client.py", line 99, in check_if_alive
2025-01-02T13:58:50.774609612Z     |     with self._send_action_server_request(
2025-01-02T13:58:50.774612025Z     |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774614638Z     |   File "/app/openhands/runtime/impl/action_execution/action_execution_client.py", line 96, in _send_action_server_request
2025-01-02T13:58:50.774617353Z     |     return send_request(self.session, method, url, **kwargs)
2025-01-02T13:58:50.774619966Z     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774622480Z     |   File "/app/openhands/runtime/utils/request.py", line 28, in send_request
2025-01-02T13:58:50.774625797Z     |     response = session.request(method, url, timeout=timeout, **kwargs)
2025-01-02T13:58:50.774628411Z     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774630924Z     |   File "/app/.venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
2025-01-02T13:58:50.774633538Z     |     resp = self.send(prep, **send_kwargs)
2025-01-02T13:58:50.774635951Z     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774638263Z     |   File "/app/.venv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
2025-01-02T13:58:50.774640877Z     |     r = adapter.send(request, **kwargs)
2025-01-02T13:58:50.774643189Z     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774646004Z     |   File "/app/.venv/lib/python3.12/site-packages/requests/adapters.py", line 682, in send
2025-01-02T13:58:50.774648517Z     |     raise ConnectionError(err, request=request)
2025-01-02T13:58:50.774651030Z     | requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2025-01-02T13:58:50.774653744Z     +------------------------------------
2025-01-02T13:58:50.774656157Z 
2025-01-02T13:58:50.774662390Z During handling of the above exception, another exception occurred:
2025-01-02T13:58:50.774665004Z 
2025-01-02T13:58:50.774667416Z Traceback (most recent call last):
2025-01-02T13:58:50.774669829Z   File "/app/.venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
2025-01-02T13:58:50.774672443Z     result = await app(  # type: ignore[func-returns-value]
2025-01-02T13:58:50.774674856Z              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774677369Z   File "/app/.venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
2025-01-02T13:58:50.774679882Z     return await self.app(scope, receive, send)
2025-01-02T13:58:50.774682295Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774684708Z   File "/app/.venv/lib/python3.12/site-packages/engineio/async_drivers/asgi.py", line 75, in __call__
2025-01-02T13:58:50.774687221Z     await self.other_asgi_app(scope, receive, send)
2025-01-02T13:58:50.774689634Z   File "/app/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
2025-01-02T13:58:50.774692247Z     await super().__call__(scope, receive, send)
2025-01-02T13:58:50.774695967Z   File "/app/.venv/lib/python3.12/site-packages/starlette/applications.py", line 113, in __call__
2025-01-02T13:58:50.774698581Z     await self.middleware_stack(scope, receive, send)
2025-01-02T13:58:50.774700993Z   File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 187, in __call__
2025-01-02T13:58:50.774703507Z     raise exc
2025-01-02T13:58:50.774706221Z   File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 165, in __call__
2025-01-02T13:58:50.774708835Z     await self.app(scope, receive, _send)
2025-01-02T13:58:50.774711247Z   File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 185, in __call__
2025-01-02T13:58:50.774713861Z     with collapse_excgroups():
2025-01-02T13:58:50.774716274Z   File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
2025-01-02T13:58:50.774718687Z     self.gen.throw(value)
2025-01-02T13:58:50.774721099Z   File "/app/.venv/lib/python3.12/site-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-01-02T13:58:50.774723613Z     raise exc
2025-01-02T13:58:50.774726025Z   File "/app/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 187, in __call__
2025-01-02T13:58:50.774728539Z     response = await self.dispatch_func(request, call_next)
2025-01-02T13:58:50.774730951Z                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774733464Z   File "/app/openhands/server/middleware.py", line 157, in __call__
2025-01-02T13:58:50.774735978Z     response = await self._attach_conversation(request)
2025-01-02T13:58:50.774740904Z                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774743417Z   File "/app/openhands/server/middleware.py", line 137, in _attach_conversation
2025-01-02T13:58:50.774745930Z     request.state.conversation = await session_manager.attach_to_conversation(
2025-01-02T13:58:50.774748443Z                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774788454Z   File "/app/openhands/server/session/manager.py", line 197, in attach_to_conversation
2025-01-02T13:58:50.774813788Z     await c.connect()
2025-01-02T13:58:50.774817206Z   File "/app/openhands/server/session/conversation.py", line 43, in connect
2025-01-02T13:58:50.774819719Z     await self.runtime.connect()
2025-01-02T13:58:50.774822132Z   File "/app/openhands/runtime/impl/docker/docker_runtime.py", line 148, in connect
2025-01-02T13:58:50.774824645Z     await call_sync_from_async(self._wait_until_alive)
2025-01-02T13:58:50.774827058Z   File "/app/openhands/utils/async_utils.py", line 18, in call_sync_from_async
2025-01-02T13:58:50.774829470Z     result = await coro
2025-01-02T13:58:50.774831883Z              ^^^^^^^^^^
2025-01-02T13:58:50.774834296Z   File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
2025-01-02T13:58:50.774836910Z     result = self.fn(*self.args, **self.kwargs)
2025-01-02T13:58:50.774839423Z              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774841836Z   File "/app/openhands/utils/async_utils.py", line 17, in <lambda>
2025-01-02T13:58:50.774844449Z     coro = loop.run_in_executor(None, lambda: fn(*args, **kwargs))
2025-01-02T13:58:50.774846862Z                                               ^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774849375Z   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 336, in wrapped_f
2025-01-02T13:58:50.774851888Z     return copy(f, *args, **kw)
2025-01-02T13:58:50.774855105Z            ^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774857619Z   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 475, in __call__
2025-01-02T13:58:50.774860132Z     do = self.iter(retry_state=retry_state)
2025-01-02T13:58:50.774862545Z          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774864957Z   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 376, in iter
2025-01-02T13:58:50.774867471Z     result = action(retry_state)
2025-01-02T13:58:50.774869883Z              ^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774872195Z   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 418, in exc_check
2025-01-02T13:58:50.774874809Z     raise retry_exc.reraise()
2025-01-02T13:58:50.774877222Z           ^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774884159Z   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 185, in reraise
2025-01-02T13:58:50.774886873Z     raise self.last_attempt.result()
2025-01-02T13:58:50.774889286Z           ^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774891799Z   File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 449, in result
2025-01-02T13:58:50.774894312Z     return self.__get_result()
2025-01-02T13:58:50.774897026Z            ^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774899439Z   File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
2025-01-02T13:58:50.774901952Z     raise self._exception
2025-01-02T13:58:50.774904365Z   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 478, in __call__
2025-01-02T13:58:50.774906979Z     result = fn(*args, **kwargs)
2025-01-02T13:58:50.774909291Z              ^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774911704Z   File "/app/openhands/runtime/impl/docker/docker_runtime.py", line 331, in _wait_until_alive
2025-01-02T13:58:50.774914317Z     self.check_if_alive()
2025-01-02T13:58:50.774916630Z   File "/app/openhands/runtime/impl/action_execution/action_execution_client.py", line 99, in check_if_alive
2025-01-02T13:58:50.774919243Z     with self._send_action_server_request(
2025-01-02T13:58:50.774921656Z          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774924069Z   File "/app/openhands/runtime/impl/action_execution/action_execution_client.py", line 96, in _send_action_server_request
2025-01-02T13:58:50.774926783Z     return send_request(self.session, method, url, **kwargs)
2025-01-02T13:58:50.774929196Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774931609Z   File "/app/openhands/runtime/utils/request.py", line 28, in send_request
2025-01-02T13:58:50.774934122Z     response = session.request(method, url, timeout=timeout, **kwargs)
2025-01-02T13:58:50.774936535Z                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774939048Z   File "/app/.venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
2025-01-02T13:58:50.774941963Z     resp = self.send(prep, **send_kwargs)
2025-01-02T13:58:50.774944476Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774946789Z   File "/app/.venv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
2025-01-02T13:58:50.774949402Z     r = adapter.send(request, **kwargs)
2025-01-02T13:58:50.774951714Z         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-02T13:58:50.774954127Z   File "/app/.venv/lib/python3.12/site-packages/requests/adapters.py", line 682, in send
2025-01-02T13:58:50.774956640Z     raise ConnectionError(err, request=request)
2025-01-02T13:58:50.774959154Z requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

@mamoodi
Copy link
Collaborator

mamoodi commented Jan 2, 2025

@rbren any changes recently that would have changed this on main?

@avi12
Copy link

avi12 commented Jan 2, 2025

Huh, when I returned to the OH instance a moment later I noticed that the agent did start executing commands; strange

@mamoodi
Copy link
Collaborator

mamoodi commented Jan 2, 2025

I think something changed on main that makes OH wait on "Waiting for client" for some time instead of the regular messages. Mine took 2-3 minutes. However, I think the original user may be running into something different as they get errors.

@rbren
Copy link
Collaborator

rbren commented Jan 2, 2025

In the original issue, the agent is getting cleaned up, even though there's clearly a websocket connection...not sure what is happening here

@rbren
Copy link
Collaborator

rbren commented Jan 2, 2025

this logic did change recently, so good chance there's a bug

@rbren
Copy link
Collaborator

rbren commented Jan 2, 2025

Oh no I was wrong, _cleanup_session gets called, but bails out before it gets to _close_session. We should rename that function/log.

It seems like we just timed out while waiting for the container to come up. Maybe we need a little more grace there for slower machines?

@rbren
Copy link
Collaborator

rbren commented Jan 2, 2025

@chenglu66 it looks like you hit Ctrl+C about 15 seconds after things started up. Can you try waiting 2-3 minutes for the container to start up? it usually takes about 1 minute

@avi12
Copy link

avi12 commented Jan 2, 2025

@rbren I pulled 0.18 and after prompting the agent, it hasn't initialized even after 10 minutes

@rbren
Copy link
Collaborator

rbren commented Jan 2, 2025

Sorry @avi12 your problem appears to be totally different from OP's.

Seems like you're on windows--are you using WSL?

@chenglu66
Copy link
Author

@mamoodi yes, i just run main branch in my docker,my OS Windows 10, when i make run it show waitting,i try many times and wait sever mintues , it does not work, but when i bulid image and use this image in my docker it can work。

@chenglu66 chenglu66 reopened this Jan 3, 2025
@avi12
Copy link

avi12 commented Jan 3, 2025

@rbren I'm not using WSL
As far as I found, either running a Docker command through PowerShell or letting my IDE around the Docker command directly works just as well

@rbren
Copy link
Collaborator

rbren commented Jan 3, 2025

@avi12 we don't support running on windows without WSL. You might be able to make it work! But it's too error-prone for us to really offer support there

@rbren
Copy link
Collaborator

rbren commented Jan 3, 2025

@chenglu66 are you using WSL? or are you also running directly on windows?

@avi12
Copy link

avi12 commented Jan 3, 2025

It practically works the same in my experience
I also built OH from source via WSL and it often worked

@Paillat-dev
Copy link

I am getting this issue currently - running from wsl with the 19 docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
5 participants