> Hi, i'm getting an error at agents startup.
# ask-ai
h
Hi, i'm getting an error at agents startup.
t
Thanks for reaching out, Rodrigo. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
h
Here is the logs... {"level": "INFO", "name": "livekit.agents", "message": "initializing process", "pid": 70, "timestamp": "2025-11-25T180135.421793+00:00"} {"level": "INFO", "name": "livekit.agents", "message": "initializing process", "pid": 74, "timestamp": "2025-11-25T180135.451335+00:00"} {"level": "INFO", "name": "livekit.agents", "message": "process initialized", "pid": 70, "elapsed_time": 0.34, "timestamp": "2025-11-25T180135.763179+00:00"} {"level": "INFO", "name": "livekit.agents", "message": "process initialized", "pid": 74, "elapsed_time": 0.32, "timestamp": "2025-11-25T180135.776014+00:00"} {"level": "WARNING", "name": "livekit.agents", "message": "failed to connect to livekit, retrying in 0s", "exc_info": "Traceback (most recent call last):\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/connector.py\", line 1268, in _wrap_create_connection\n sock = await aiohappyeyeballs.start_connection(\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohappyeyeballs/impl.py\", line 141, in start_connection\n raise OSError(first_errno, msg)\nConnectionRefusedError: [Errno 111] Multiple exceptions: [Errno 111] Connect call failed ('::1', 7880, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 7880)\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/home/appuser/.local/lib/python3.10/site-packages/livekit/agents/worker.py\", line 941, in _connection_task\n ws = await self._http_session.ws_connect(\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/client.py\", line 1076, in _ws_connect\n resp = await self.request(\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/client.py\", line 779, in _request\n resp = await handler(req)\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/client.py\", line 734, in _connect_and_send_request\n conn = await self._connector.connect(\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/connector.py\", line 642, in connect\n proto = await self._create_connection(req, traces, timeout)\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/connector.py\", line 1209, in _create_connection\n _, proto = await self._create_direct_connection(req, traces, timeout)\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/connector.py\", line 1581, in _create_direct_connection\n raise last_exc\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/connector.py\", line 1550, in _create_direct_connection\n transp, proto = await self._wrap_create_connection(\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/connector.py\", line 1291, in _wrap_create_connection\n raise client_error(req.connection_key, exc) from exc\naiohttp.client_exceptions.ClientConnectorError: Cannot connect to host localhost:7880 ssl:default [Multiple exceptions: [Errno 111] Connect call failed ('::1', 7880, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 7880)]", "timestamp": "2025-11-25T180135.783327+00:00"}
t
Thanks — I can help with that. To diagnose the agent startup error I need a few details: • The exact error message and any stack trace or logs you see • Are you running locally (dev/console) or in production (start mode)? • Recent changes to agent code, dependencies, or deploy/config (if any) • Are you using LiveKit Cloud or a self-hosted/custom deployment? • The agent version or commit and the command you run to start it Send those and I’ll guide you through targeted troubleshooting steps. Sources: Troubleshooting Guide | livekit/livekit_composite | DeepWiki | Voice AI quickstart | LiveKit docs | Agent server options | LiveKit docs
h
Here is the logs: {"level": "INFO", "name": "livekit.agents", "message": "initializing process", "pid": 70, "timestamp": "2025-11-25T180135.421793+00:00"} {"level": "INFO", "name": "livekit.agents", "message": "initializing process", "pid": 74, "timestamp": "2025-11-25T180135.451335+00:00"} {"level": "INFO", "name": "livekit.agents", "message": "process initialized", "pid": 70, "elapsed_time": 0.34, "timestamp": "2025-11-25T180135.763179+00:00"} {"level": "INFO", "name": "livekit.agents", "message": "process initialized", "pid": 74, "elapsed_time": 0.32, "timestamp": "2025-11-25T180135.776014+00:00"} {"level": "WARNING", "name": "livekit.agents", "message": "failed to connect to livekit, retrying in 0s", "exc_info": "Traceback (most recent call last):\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/connector.py\", line 1268, in _wrap_create_connection\n sock = await aiohappyeyeballs.start_connection(\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohappyeyeballs/impl.py\", line 141, in start_connection\n raise OSError(first_errno, msg)\nConnectionRefusedError: [Errno 111] Multiple exceptions: [Errno 111] Connect call failed ('::1', 7880, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 7880)\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/home/appuser/.local/lib/python3.10/site-packages/livekit/agents/worker.py\", line 941, in _connection_task\n ws = await self._http_session.ws_connect(\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/client.py\", line 1076, in _ws_connect\n resp = await self.request(\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/client.py\", line 779, in _request\n resp = await handler(req)\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/client.py\", line 734, in _connect_and_send_request\n conn = await self._connector.connect(\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/connector.py\", line 642, in connect\n proto = await self._create_connection(req, traces, timeout)\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/connector.py\", line 1209, in _create_connection\n _, proto = await self._create_direct_connection(req, traces, timeout)\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/connector.py\", line 1581, in _create_direct_connection\n raise last_exc\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/connector.py\", line 1550, in _create_direct_connection\n transp, proto = await self._wrap_create_connection(\n File \"/home/appuser/.local/lib/python3.10/site-packages/aiohttp/connector.py\", line 1291, in _wrap_create_connection\n raise client_error(req.connection_key, exc) from exc\naiohttp.client_exceptions.ClientConnectorError: Cannot connect to host localhost:7880 ssl:default [Multiple exceptions: [Errno 111] Connect call failed ('::1', 7880, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 7880)]", "timestamp": "2025-11-25T180135.783327+00:00"}
Running on cloud
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!