Skip to content

j failed to connect to all addresses; last error: UNKNOWN: unix:/..../jumpstarter-wjgvwyaf/socket #117

@mangelajo

Description

@mangelajo

This happens sometimes when entering a jmp shell that was waiting on a lease.

Reproducer

  1. Have some slow init driver like DutLink in some configurations (power sequencing)
  2. jmp shell -l some=board
  3. jmp shell -l some=board (on a different shell)
  4. exit the shell from 2
  5. shell is entered in 3
  6. j
~ jmp shell -l board=orin-agx
[10/02/2025 14:39:39] INFO     INFO:jumpstarter.client.lease:Acquiring lease 0199a4ef-723c-7459-ab1f-554221529a14 for       lease.py:69
                               selector board=orin-agx for duration 0:30:00
~ ⚡rnoriega-orin-agx ➤ j
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/ajo/.local/jumpstarter/bin/j:7 in <module>                                                │
│                                                                                                  │
│   4 if __name__ == '__main__':                                                                   │
│   5 │   if sys.argv[0].endswith('.exe'):                                                         │
│   6 │   │   sys.argv[0] = sys.argv[0][:-4]                                                       │
│ ❱ 7 │   sys.exit(j())                                                                            │
│   8                                                                                              │
│                                                                                                  │
│ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/jumpstarter_cli/j.py:47 in j     │
│                                                                                                  │
│   44                                                                                             │
│   45 def j():                                                                                    │
│   46 │   traceback.install()                                                                     │
│ ❱ 47 │   run(j_async)                                                                            │
│   48                                                                                             │
│   49                                                                                             │
│   50 if __name__ == "__main__":                                                                  │
│                                                                                                  │
│ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/anyio/_core/_eventloop.py:74 in  │
│ run                                                                                              │
│                                                                                                  │
│    71 │                                                                                          │
│    72 │   try:                                                                                   │
│    73 │   │   backend_options = backend_options or {}                                            │
│ ❱  74 │   │   return async_backend.run(func, args, {}, backend_options)                          │
│    75 │   finally:                                                                               │
│    76 │   │   if token:                                                                          │
│    77 │   │   │   sniffio.current_async_library_cvar.reset(token)                                │
│                                                                                                  │
│ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py:2325 │
│ in run                                                                                           │
│                                                                                                  │
│   2322 │   │   │   loop_factory = uvloop.new_event_loop                                          │
│   2323 │   │                                                                                     │
│   2324 │   │   with Runner(debug=debug, loop_factory=loop_factory) as runner:                    │
│ ❱ 2325 │   │   │   return runner.run(wrapper())                                                  │
│   2326 │                                                                                         │
│   2327 │   @classmethod                                                                          │
│   2328 │   def current_token(cls) -> object:                                                     │
│                                                                                                  │
│ /opt/homebrew/Cellar/python@3.13/3.13.7/Frameworks/Python.framework/Versions/3.13/lib/python3.13 │
│ /asyncio/runners.py:118 in run                                                                   │
│                                                                                                  │
│   115 │   │                                                                                      │
│   116 │   │   self._interrupt_count = 0                                                          │
│   117 │   │   try:                                                                               │
│ ❱ 118 │   │   │   return self._loop.run_until_complete(task)                                     │
│   119 │   │   except exceptions.CancelledError:                                                  │
│   120 │   │   │   if self._interrupt_count > 0:                                                  │
│   121 │   │   │   │   uncancel = getattr(task, "uncancel", None)                                 │
│                                                                                                  │
│ /opt/homebrew/Cellar/python@3.13/3.13.7/Frameworks/Python.framework/Versions/3.13/lib/python3.13 │
│ /asyncio/base_events.py:725 in run_until_complete                                                │
│                                                                                                  │
│    722 │   │   if not future.done():                                                             │
│    723 │   │   │   raise RuntimeError('Event loop stopped before Future completed.')             │
│    724 │   │                                                                                     │
│ ❱  725 │   │   return future.result()                                                            │
│    726 │                                                                                         │
│    727 │   def stop(self):                                                                       │
│    728 │   │   """Stop running the event loop.                                                   │
│                                                                                                  │
│ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py:2313 │
│ in wrapper                                                                                       │
│                                                                                                  │
│   2310 │   │   │   _task_states[task] = TaskState(None, None)                                    │
│   2311 │   │   │                                                                                 │
│   2312 │   │   │   try:                                                                          │
│ ❱ 2313 │   │   │   │   return await func(*args)                                                  │
│   2314 │   │   │   finally:                                                                      │
│   2315 │   │   │   │   del _task_states[task]                                                    │
│   2316                                                                                           │
│                                                                                                  │
│ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/jumpstarter_cli/j.py:25 in       │
│ j_async                                                                                          │
│                                                                                                  │
│   22 │   │   │   │   │   await to_thread.run_sync(lambda: client.cli()(standalone_mode=False)    │
│   23 │                                                                                           │
│   24 │   try:                                                                                    │
│ ❱ 25 │   │   async with create_task_group() as tg:                                               │
│   26 │   │   │   tg.start_soon(signal_handler, tg.cancel_scope)                                  │
│   27 │   │   │                                                                                   │
│   28 │   │   │   try:                                                                            │
│                                                                                                  │
│ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py:781  │
│ in __aexit__                                                                                     │
│                                                                                                  │
│    778 │   │   │   │   │   # added to self._exceptions so it's ok to break exception             │
│    779 │   │   │   │   │   # chaining and avoid adding a "During handling of above..."           │
│    780 │   │   │   │   │   # for each nesting level.                                             │
│ ❱  781 │   │   │   │   │   raise BaseExceptionGroup(                                             │
│    782 │   │   │   │   │   │   "unhandled errors in a TaskGroup", self._exceptions               │
│    783 │   │   │   │   │   ) from None                                                           │
│    784 │   │   │   │   elif exc_val:                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)

╭──────────────────────────────────────── Sub-exception jumpstarter-dev/jumpstarter-controller#1 ────────────────────────────────────────╮
│ ╭───────────────────────────── Traceback (most recent call last) ──────────────────────────────╮ │
│ │ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/jumpstarter_cli/j.py:29 in   │ │
│ │ j_async                                                                                      │ │
│ │                                                                                              │ │
│ │   26 │   │   │   tg.start_soon(signal_handler, tg.cancel_scope)                              │ │
│ │   27 │   │   │                                                                               │ │
│ │   28 │   │   │   try:                                                                        │ │
│ │ ❱ 29 │   │   │   │   await cli()                                                             │ │
│ │   30 │   │   │   finally:                                                                    │ │
│ │   31 │   │   │   │   tg.cancel_scope.cancel()                                                │ │
│ │   32                                                                                         │ │
│ │                                                                                              │ │
│ │ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/jumpstarter_cli_common/excep │ │
│ │ tions.py:31 in wrapped                                                                       │ │
│ │                                                                                              │ │
│ │    28 │   │   │   │   elif isinstance(exc, click.ClickException):                            │ │
│ │    29 │   │   │   │   │   raise exc from None                                                │ │
│ │    30 │   │   │   # If no handled exceptions, re-raise the original group                    │ │
│ │ ❱  31 │   │   │   raise eg                                                                   │ │
│ │    32 │   │   except JumpstarterException as e:                                              │ │
│ │    33 │   │   │   raise ClickExceptionRed(str(e)) from None                                  │ │
│ │    34 │   │   except click.ClickException:                                                   │ │
│ │                                                                                              │ │
│ │ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/jumpstarter_cli_common/excep │ │
│ │ tions.py:22 in wrapped                                                                       │ │
│ │                                                                                              │ │
│ │    19 │   @wraps(func)                                                                       │ │
│ │    20 │   async def wrapped(*args, **kwargs):                                                │ │
│ │    21 │   │   try:                                                                           │ │
│ │ ❱  22 │   │   │   return await func(*args, **kwargs)                                         │ │
│ │    23 │   │   except BaseExceptionGroup as eg:                                               │ │
│ │    24 │   │   │   # Handle exceptions wrapped in ExceptionGroup (e.g., from task groups)     │ │
│ │    25 │   │   │   for exc in leaf_exceptions(eg, fix_tracebacks=False):                      │ │
│ │                                                                                              │ │
│ │ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/jumpstarter_cli/j.py:19 in   │ │
│ │ cli                                                                                          │ │
│ │                                                                                              │ │
│ │   16 async def j_async():                                                                    │ │
│ │   17 │   @async_handle_exceptions                                                            │ │
│ │   18 │   async def cli():                                                                    │ │
│ │ ❱ 19 │   │   async with BlockingPortal() as portal:                                          │ │
│ │   20 │   │   │   with ExitStack() as stack:                                                  │ │
│ │   21 │   │   │   │   async with env_async(portal, stack) as client:                          │ │
│ │   22 │   │   │   │   │   await to_thread.run_sync(lambda: client.cli()(standalone_mode=False │ │
│ │                                                                                              │ │
│ │ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/anyio/from_thread.py:199 in  │ │
│ │ __aexit__                                                                                    │ │
│ │                                                                                              │ │
│ │   196 │   │   exc_tb: TracebackType | None,                                                  │ │
│ │   197 │   ) -> bool:                                                                         │ │
│ │   198 │   │   await self.stop()                                                              │ │
│ │ ❱ 199 │   │   return await self._task_group.__aexit__(exc_type, exc_val, exc_tb)             │ │
│ │   200 │                                                                                      │ │
│ │   201 │   def _check_running(self) -> None:                                                  │ │
│ │   202 │   │   if self._event_loop_thread_id is None:                                         │ │
│ │                                                                                              │ │
│ │ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py: │ │
│ │ 781 in __aexit__                                                                             │ │
│ │                                                                                              │ │
│ │    778 │   │   │   │   │   # added to self._exceptions so it's ok to break exception         │ │
│ │    779 │   │   │   │   │   # chaining and avoid adding a "During handling of above..."       │ │
│ │    780 │   │   │   │   │   # for each nesting level.                                         │ │
│ │ ❱  781 │   │   │   │   │   raise BaseExceptionGroup(                                         │ │
│ │    782 │   │   │   │   │   │   "unhandled errors in a TaskGroup", self._exceptions           │ │
│ │    783 │   │   │   │   │   ) from None                                                       │ │
│ │    784 │   │   │   │   elif exc_val:                                                         │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)                                │
│                                                                                                  │
│ ╭────────────────────────────────────── Sub-exception jumpstarter-dev/jumpstarter-controller#1 ──────────────────────────────────────╮ │
│ │ ╭─────────────────────────── Traceback (most recent call last) ────────────────────────────╮ │ │
│ │ │ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/jumpstarter_cli/j.py:21  │ │ │
│ │ │ in cli                                                                                   │ │ │
│ │ │                                                                                          │ │ │
│ │ │   18 │   async def cli():                                                                │ │ │
│ │ │   19 │   │   async with BlockingPortal() as portal:                                      │ │ │
│ │ │   20 │   │   │   with ExitStack() as stack:                                              │ │ │
│ │ │ ❱ 21 │   │   │   │   async with env_async(portal, stack) as client:                      │ │ │
│ │ │   22 │   │   │   │   │   await to_thread.run_sync(lambda: client.cli()(standalone_mode=F │ │ │
│ │ │   23 │                                                                                   │ │ │
│ │ │   24 │   try:                                                                            │ │ │
│ │ │                                                                                          │ │ │
│ │ │ /opt/homebrew/Cellar/python@3.13/3.13.7/Frameworks/Python.framework/Versions/3.13/lib/py │ │ │
│ │ │ thon3.13/contextlib.py:214 in __aenter__                                                 │ │ │
│ │ │                                                                                          │ │ │
│ │ │   211 │   │   # they are only needed for recreation, which is not possible anymore       │ │ │
│ │ │   212 │   │   del self.args, self.kwds, self.func                                        │ │ │
│ │ │   213 │   │   try:                                                                       │ │ │
│ │ │ ❱ 214 │   │   │   return await anext(self.gen)                                           │ │ │
│ │ │   215 │   │   except StopAsyncIteration:                                                 │ │ │
│ │ │   216 │   │   │   raise RuntimeError("generator didn't yield") from None                 │ │ │
│ │ │   217                                                                                    │ │ │
│ │ │                                                                                          │ │ │
│ │ │ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/jumpstarter/utils/env.py │ │ │
│ │ │ :26 in env_async                                                                         │ │ │
│ │ │                                                                                          │ │ │
│ │ │   23 │                                                                                   │ │ │
│ │ │   24 │   drivers = ClientConfigV1Alpha1Drivers()                                         │ │ │
│ │ │   25 │                                                                                   │ │ │
│ │ │ ❱ 26 │   async with client_from_path(                                                    │ │ │
│ │ │   27 │   │   host,                                                                       │ │ │
│ │ │   28 │   │   portal,                                                                     │ │ │
│ │ │   29 │   │   stack,                                                                      │ │ │
│ │ │                                                                                          │ │ │
│ │ │ /opt/homebrew/Cellar/python@3.13/3.13.7/Frameworks/Python.framework/Versions/3.13/lib/py │ │ │
│ │ │ thon3.13/contextlib.py:214 in __aenter__                                                 │ │ │
│ │ │                                                                                          │ │ │
│ │ │   211 │   │   # they are only needed for recreation, which is not possible anymore       │ │ │
│ │ │   212 │   │   del self.args, self.kwds, self.func                                        │ │ │
│ │ │   213 │   │   try:                                                                       │ │ │
│ │ │ ❱ 214 │   │   │   return await anext(self.gen)                                           │ │ │
│ │ │   215 │   │   except StopAsyncIteration:                                                 │ │ │
│ │ │   216 │   │   │   raise RuntimeError("generator didn't yield") from None                 │ │ │
│ │ │   217                                                                                    │ │ │
│ │ │                                                                                          │ │ │
│ │ │ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/jumpstarter/client/clien │ │ │
│ │ │ t.py:20 in client_from_path                                                              │ │ │
│ │ │                                                                                          │ │ │
│ │ │   17 │   async with grpc.aio.secure_channel(                                             │ │ │
│ │ │   18 │   │   f"unix://{path}", grpc.local_channel_credentials(grpc.LocalConnectionType.U │ │ │
│ │ │   19 │   ) as channel:                                                                   │ │ │
│ │ │ ❱ 20 │   │   yield await client_from_channel(channel, portal, stack, allow, unsafe)      │ │ │
│ │ │   21                                                                                     │ │ │
│ │ │   22                                                                                     │ │ │
│ │ │   23 async def client_from_channel(                                                      │ │ │
│ │ │                                                                                          │ │ │
│ │ │ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/jumpstarter/client/clien │ │ │
│ │ │ t.py:37 in client_from_channel                                                           │ │ │
│ │ │                                                                                          │ │ │
│ │ │   34 │                                                                                   │ │ │
│ │ │   35 │   stub = MultipathExporterStub([channel])                                         │ │ │
│ │ │   36 │                                                                                   │ │ │
│ │ │ ❱ 37 │   response = await stub.GetReport(empty_pb2.Empty())                              │ │ │
│ │ │   38 │                                                                                   │ │ │
│ │ │   39 │   for index, report in enumerate(response.reports):                               │ │ │
│ │ │   40 │   │   topo[index] = []                                                            │ │ │
│ │ │                                                                                          │ │ │
│ │ │ /Users/ajo/.local/jumpstarter/venv/lib/python3.13/site-packages/grpc/aio/_call.py:330 in │ │ │
│ │ │ __await__                                                                                │ │ │
│ │ │                                                                                          │ │ │
│ │ │   327 │   │   │   if self._cython_call.is_locally_cancelled():                           │ │ │
│ │ │   328 │   │   │   │   raise asyncio.CancelledError()                                     │ │ │
│ │ │   329 │   │   │   else:                                                                  │ │ │
│ │ │ ❱ 330 │   │   │   │   raise _create_rpc_error(                                           │ │ │
│ │ │   331 │   │   │   │   │   self._cython_call._initial_metadata,                           │ │ │
│ │ │   332 │   │   │   │   │   self._cython_call._status,                                     │ │ │
│ │ │   333 │   │   │   │   )                                                                  │ │ │
│ │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ │ │
│ │ AioRpcError: <AioRpcError of RPC that terminated with:                                       │ │
│ │         status = StatusCode.UNAVAILABLE                                                      │ │
│ │         details = "failed to connect to all addresses; last error: UNKNOWN:                  │ │
│ │ unix:/var/folders/4p/1zd2b2pj5c3g9tjrv9vfp6940000gn/T/jumpstarter-wjgvwyaf/socket:           │ │
│ │ connection attempt timed out before receiving SETTINGS frame"                                │ │
│ │         debug_error_string = "UNKNOWN:Error received from peer  {grpc_status:14,             │ │
│ │ grpc_message:"failed to connect to all addresses; last error: UNKNOWN:                       │ │
│ │ unix:/var/folders/4p/1zd2b2pj5c3g9tjrv9vfp6940000gn/T/jumpstarter-wjgvwyaf/socket:           │ │
│ │ connection attempt timed out before receiving SETTINGS frame"}"                              │ │
│ │ >                                                                                            │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions