My agent registers with LiveKit Cloud successfully...
# ask-ai
b
My agent registers with LiveKit Cloud successfully (worker ID AW_RqP7ZTAHF4Cd, region US West B), but room connections fail. The /settings/regions endpoint at bg-interviews-2-jru6e6g5.livekit.cloud takes 20+ seconds to respond (curl confirms HTTP 200 but with extreme latency). The @livekit/rtc-node SDK times out before it completes. Worker registration works fine, only room-level connections fail. Project was just created today.
t
Thanks for reaching out, Ameh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m sorry you’re hitting this. I’m responding to the issue you described: worker registration succeeds (worker ID AW_RqP7ZTAHF4Cd, region US West B) but room joins fail because the project’s /settings/regions endpoint responds slowly (~20+s), causing the @livekit/rtc-node SDK to time out. Quick troubleshooting steps to try now: • Run the LiveKit Connection Tester (https://livekit.io/connection-test) from the same host/region to check WebRTC, WebSocket, and TURN connectivity. • Curl the endpoint with timing to confirm where the delay occurs: a. curl -w "@curl-format.txt" -o /dev/null -s "https://bg-interviews-2-jru6e6g5.livekit.cloud/settings/regions" (Use curl’s timing format to see DNS/TCP/TLS/first-byte timing.) • Test from a machine geographically near US West B to rule out network path issues. • Temporarily force relay-only ICE to bypass UDP path issues: ◦ In your connect options set
rtcConfig.iceTransportPolicy = 'relay'
when calling the SDK (this is a workaround, not a root fix). • Check for corporate/firewall rules that might throttle or block UDP (ICE) or long-lived connections. Questions to narrow this down: 1. Does curl from multiple locations show consistent 20+s latency, or does it vary by location? 2. Can you share the exact SDK timeout/error message you see when the join fails? 3. Was any custom DNS, proxy, or firewall configured for the project or the host running the agent? What I can do next: • If you share the answers above plus the exact SDK error text, I’ll help interpret the timings and recommend next steps to resolve the endpoint latency or suggest additional workarounds. Sources: Agents Framework | livekit/livekit_composite | DeepWiki | Server-side | livekit/livekit_composite | DeepWiki | Diagnosing Connection Errors with Connection Test Utility | Agents on LiveKit Cloud | Deploy voice AI on global infrastructure | LiveKi... | Checklist for Regional Deployments | LiveKit, with interactive elements
b
DNS: Intermittent resolution failures. nslookup via local DNS resolves to 158.101.233.226 and 79.72.12.128, but curl frequently gets "could not resolve host" (exit code 6). Google DNS (8.8.8.8) times out before eventually resolving. Curl timing (bypassing DNS with --resolve to 158.101.233.226): TCP connect: ~1s TLS handshake + renegotiation: ~4s First byte: ~5s HTTP 200 with body "unauthorized" SDK error: BootstrapStageError: Room connection bootstrap failed: engine: signal failure: failed to retrieve region info: error sending request for url (https://bg-interviews-2-jru6e6g5.livekit.cloud/settings/regions) — from @strong-father-34524/rtc-node Room.connect(). Key finding: Worker registration succeeds (worker ID AW_RqP7ZTAHF4Cd, region US West B), confirming API key/secret are correct. Only room connections fail. No custom DNS, proxy, or firewall configured. Agent is self-hosted on Railway. Testing from Windows 11 locally, agent runs in Docker on Railway.
t
Thanks — this is very helpful detail. I’m responding to your DNS/TLS timings and the SDK bootstrap error for /settings/regions. Summary of what you’ve found • DNS is intermittent: nslookup works but curl often fails with “could not resolve host”; 8.8.8.8 also times out sometimes. • Bypassing DNS (curl --resolve) shows slow TCP/TLS (connect ~1s, TLS ~4s, first byte ~5s) and an HTTP 200 body "unauthorized". • Worker registration succeeds, so API key/secret are valid. Room joins fail with BootstrapStageError because the SDK can’t reliably fetch region info. What this implies • Unstable DNS resolution plus slow TLS/HTTP responses are preventing the SDK’s region lookup and ICE bootstrap. • The "unauthorized" response when you bypass DNS suggests the endpoint is reachable but something in the request (headers, origin, or routing) may differ when the SDK calls it vs your curl. However, worker registration proves credentials are valid, so the primary blocker is the intermittent DNS + slow TLS timings. Practical next steps to try now 1. Reduce DNS variability ◦ Configure a reliable resolver on the Railway host (e.g., use Cloudflare 1.1.1.1 or a stable internal resolver) and test resolution repeatedly: ▪︎ dig +trace bg-interviews-2-jru6e6g5.livekit.cloud ▪︎ while true; do dig @1.1.1.1 bg-interviews-2-jru6e6g5.livekit.cloud; sleep 1; done ◦ If Railway allows, bind the host’s resolv.conf to a stable resolver or add a short-lived hosts entry for testing. 1. Reproduce from multiple networks ◦ Run your curl --resolve test from your local machine, from Railway, and from a third cloud region near US West to see whether DNS/TLS slowness is isolated to Railway. 1. Compare the SDK request vs curl ◦ Capture a raw curl request that matches the SDK’s call (same method, headers, TLS SNI). Check whether the SDK sends any auth header differently. ◦ Example to show TLS SNI and headers: ▪︎ curl -v --resolve bg-interviews-2-jru6e6g5.livekit.cloud443158.101.233.226 "https://bg-interviews-2-jru6e6g5.livekit.cloud/settings/regions" ◦ Confirm the SDK and curl use the same SNI hostname (bg-interviews-2-jru6e6g5.livekit.cloud). 1. Workaround to allow room joins while investigating ◦ Force relay-only ICE in the agent to avoid UDP/ICE issues: ▪︎ set
rtcConfig.iceTransportPolicy = 'relay'
on connect. ◦ Increase the SDK request timeout temporarily if possible so the SDK will wait through the slow TLS/HTTP timings (short-term only). 1. Railway-specific checks ◦ Verify Railway’s outbound DNS behavior — some container platforms use flaky resolver forwarding. Check Railway docs/settings for custom DNS or outbound network restrictions. ◦ Ensure Railway containers are allowed to make outbound UDP (for STUN/TURN) and outbound TCP/443 without transparent proxying. Information I still need to help further • From Railway: do you see any network logs showing DNS failures or upstream resolver timeouts? • The exact SDK error stacktrace beyond the BootstrapStageError (if available). • Results of a repeated dig/nslookup test from the Railway host and from a separate region (paste a few samples showing inconsistency). If you share those quick results I’ll help interpret them and recommend whether this is resolvable by changing DNS/resolver settings or if we should focus on other routing/TLS causes. , with interactive elements
b
message,severity,attributes,tags,timestamp (node:1) [DEP0040] DeprecationWarning: The
punycode
module is deprecated. Please use a userland alternative instead.,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""be18f42d-28d8-478b-9168-4a1d8fdd3020"",""replica"":""89c75b9a-1598-4554-9bf1-498da0886026""}",2026-04-14T093806.320788271Z " failureCode: 'BOOTSTRAP_ROOM_CONNECT_FAILED',",error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""be18f42d-28d8-478b-9168-4a1d8fdd3020"",""replica"":""89c75b9a-1598-4554-9bf1-498da0886026""}",2026-04-14T093806.320791008Z " sessionId: null,",error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""be18f42d-28d8-478b-9168-4a1d8fdd3020"",""replica"":""89c75b9a-1598-4554-9bf1-498da0886026""}",2026-04-14T093806.320793565Z stack: 'BootstrapStageError: Room connection bootstrap failed: engine: signal failure: failed to retrieve region info: error sending request for url (https://bg-interviews-2-jru6e6g5.livekit.cloud/settings/regions)\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""be18f42d-28d8-478b-9168-4a1d8fdd3020"",""replica"":""89c75b9a-1598-4554-9bf1-498da0886026""}",2026-04-14T093806.320796429Z ' at file///app/agent/dist/agent/src/livekit worker.js615:27\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""5cf80470-a0c0-4682-b4b1-0edcf0707d4c"",""replica"":""f5e34333-cc8e-4a62-9093-98c3e72efd53""}",2026-04-14T102452.561111995Z ' at async runInterviewJob (file///app/agent/dist/agent/src/livekit worker.js601:27)\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""5cf80470-a0c0-4682-b4b1-0edcf0707d4c"",""replica"":""f5e34333-cc8e-4a62-9093-98c3e72efd53""}",2026-04-14T102452.561118271Z ' at async entry (file///app/agent/dist/agent/src/livekit worker.js829:9)\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""5cf80470-a0c0-4682-b4b1-0edcf0707d4c"",""replica"":""f5e34333-cc8e-4a62-9093-98c3e72efd53""}",2026-04-14T102453.540416557Z ' at async file:///app/node_modules/@livekit/agents/dist/telemetry/traces.js7616\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""5cf80470-a0c0-4682-b4b1-0edcf0707d4c"",""replica"":""f5e34333-cc8e-4a62-9093-98c3e72efd53""}",2026-04-14T102453.540424686Z ' at async DynamicTracer.startActiveSpan (file:///app/node_modules/@livekit/agents/dist/telemetry/traces.js7412)\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""5cf80470-a0c0-4682-b4b1-0edcf0707d4c"",""replica"":""f5e34333-cc8e-4a62-9093-98c3e72efd53""}",2026-04-14T102453.540432634Z ' at async file:///app/node_modules/@livekit/agents/dist/ipc/job_proc_lazy_main.js1017',error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""5cf80470-a0c0-4682-b4b1-0edcf0707d4c"",""replica"":""f5e34333-cc8e-4a62-9093-98c3e72efd53""}",2026-04-14T102453.540438460Z },error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""5cf80470-a0c0-4682-b4b1-0edcf0707d4c"",""replica"":""f5e34333-cc8e-4a62-9093-98c3e72efd53""}",2026-04-14T102453.540445113Z (node:66) [DEP0040] DeprecationWarning: The
punycode
module is deprecated. Please use a userland alternative instead.,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""5cf80470-a0c0-4682-b4b1-0edcf0707d4c"",""replica"":""f5e34333-cc8e-4a62-9093-98c3e72efd53""}",2026-04-14T102453.542370405Z (Use
node --trace-deprecation ...
to show where the warning was created),error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""5cf80470-a0c0-4682-b4b1-0edcf0707d4c"",""replica"":""f5e34333-cc8e-4a62-9093-98c3e72efd53""}",2026-04-14T102453.542375927Z
t
Thanks — this is very helpful. I’m responding to the logs you pasted (BootstrapStageError + intermittent DNS + slow TLS) and the environment details (Railway, Docker). What this shows • DNS is intermittent from the Railway host (curl sometimes fails with "could not resolve host"; 8.8.8.8 also times out). • When you bypass DNS, the /settings/regions request completes but with slow TLS/HTTP timings and returns "unauthorized" body. • Worker registration succeeds, so keys are valid; the failure point is the SDK’s region lookup (the SDK times out waiting on /settings/regions), causing BootstrapStageError. Immediate actions to try 1. Force relay-only ICE in the agent (short-term) to let rooms join despite network issues: ◦ Set
rtcConfig.iceTransportPolicy = 'relay'
on connect. 1. Make Railway use a stable resolver and verify DNS repeatedly: ◦ Try Cloudflare (1.1.1.1) and run: ▪︎ dig +trace bg-interviews-2-jru6e6g5.livekit.cloud ▪︎ while true; do dig @1.1.1.1 bg-interviews-2-jru6e6g5.livekit.cloud; sleep 1; done ◦ If Railway supports custom DNS for containers, set it there or add a hosts entry for temporary testing. 1. Reproduce from multiple locations (local, Railway, another cloud region) and compare results for DNS and curl --resolve timings: ◦ curl -v --resolve bg-interviews-2-jru6e6g5.livekit.cloud443158.101.233.226 "https://bg-interviews-2-jru6e6g5.livekit.cloud/settings/regions" ◦ Capture curl’s timing breakdown (DNS/TCP/TLS/TTFB) with
-w
or
--trace-time
. 1. Match SDK request shape to curl: ◦ Confirm SDK and curl use the same SNI hostname (
bg-interviews-2-jru6e6g5.livekit.cloud
) and same headers/auth. The "unauthorized" body implies the endpoint is reachable but auth or routing differs when the SDK calls it. Railway-specific checks • Check Railway docs or settings for known outbound DNS issues or resolver forwarding; many container hosts forward DNS and can be flaky. • Confirm Railway allows outbound UDP (STUN) and TCP/443 without proxying. What I need from you next 1. A few sample dig/nslookup lines showing intermittent failures from the Railway container (paste 5–10 outputs). 2. The full SDK error stacktrace (you pasted part — the longer trace may show the underlying HTTP client error). 3. Results of the curl --resolve timing from Railway and from your local machine. With those I’ll interpret whether this is resolvable by changing the resolver/timeout or if the issue points to Railway’s network path or a TLS/auth mismatch we need to address. , with interactive elements
b
" error: 'Room connection bootstrap failed: engine: signal failure: failed to retrieve region info: error sending request for url (https://bg-interviews-2-jru6e6g5.livekit.cloud/settings/regions)',",error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.694922692Z " failureStage: 'ROOM_CONNECT',",error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.694926007Z " failureCode: 'BOOTSTRAP_ROOM_CONNECT_FAILED',",error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.694930256Z " sessionId: null,",error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.694933347Z stack: 'BootstrapStageError: Room connection bootstrap failed: engine: signal failure: failed to retrieve region info: error sending request for url (https://bg-interviews-2-jru6e6g5.livekit.cloud/settings/regions)\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.694936733Z ' at file///app/agent/dist/agent/src/livekit worker.js620:27\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.694940195Z ' at async Promise.all (index 1)\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.694943602Z ' at async runInterviewJob (file///app/agent/dist/agent/src/livekit worker.js601:27)\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.694946976Z ' at async entry (file///app/agent/dist/agent/src/livekit worker.js829:9)\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.696581413Z ' at async file:///app/node_modules/@livekit/agents/dist/telemetry/traces.js7616\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.696585973Z ' at async DynamicTracer.startActiveSpan (file:///app/node_modules/@livekit/agents/dist/telemetry/traces.js7412)\n' +,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.696589359Z ' at async file:///app/node_modules/@livekit/agents/dist/ipc/job_proc_lazy_main.js1017',error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.696592403Z },error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.696595121Z (node:98) [DEP0040] DeprecationWarning: The ``punycode`` module is deprecated. Please use a userland alternative instead.,error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.698331475Z (Use ``node --trace-deprecation ...`` to show where the warning was created),error,"{""level"":""error""}","{""project"":""114bb543-7051-42c4-82c1-54c10fc97fe1"",""environment"":""987d863c-7c79-4bb4-9bdb-a7731695c922"",""service"":""ba0f1a1d-1217-4b3b-9b1e-dd586b0244db"",""deployment"":""b37b1287-8620-4442-b30c-ac0bfcaccceb"",""replica"":""0635101a-f7d4-443a-8a82-08cfc01f3ca1""}",2026-04-14T121919.698336354Z
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!
b
We found the root cause. The
/settings/regions
endpoint at
bg-interviews-2-jru6e6g5.livekit.cloud
returns HTTP 200 with body "unauthorized" instead of either: • HTTP 200 with valid JSON region data (for authenticated requests), or • HTTP 401 (for unauthenticated requests) The SDK (
RegionUrlProvider.ts
) checks
response.ok
, sees
true
(200), then calls
response.json()
on the "unauthorized" string, which throws a JSON parse error. This gets wrapped as
ConnectionError.serverUnreachable
. We confirmed: •
curl <https://bg-interviews-2-jru6e6g5.livekit.cloud/settings/regions>
→ HTTP 200, body: "unauthorized" • Worker registration succeeds (API key/secret are valid) • This appears to be a server-side configuration issue with this project's regions endpoint Can you check why this project's
/settings/regions
is returning "unauthorized" for authenticated SDK requests? how can this be resolved
1. DNS Resolution Failure Problem: The LiveKit agent running on the hosting platform could not resolve the LiveKit Cloud hostname. DNS lookups failed inside the Docker container, preventing the agent from connecting. Fix: Added a DNS override in the startup script that writes a stable nameserver to
/etc/resolv.conf
before the agent starts. 2. Regions HTTP Request Failure Problem: After DNS was fixed, the agent worker registered successfully, but when it tried to join a room, the native RTC binary failed to fetch the regions/settings endpoint. The issue was network/TLS related, not authentication related. Root cause: The slim Docker image lacked required CA certificates and OpenSSL libraries. Node.js worked because it bundled its own CA certificates, while the native binary depended on system-level TLS libraries. Fix: Installed
ca-certificates
and
openssl
in the runtime image. 3. Audio Capture Unavailable Problem: The agent joined the room and asked questions, but could not hear the candidate. Logs showed repeated audio capture unavailable errors because the candidate microphone track was not properly subscribed. Root cause: • The ICE transport configuration forced relay-only behavior without the required TURN setup. • Auto-subscribe behavior did not handle late-joining participants correctly. Fix: Removed the custom RTC config and switched to subscribing to all tracks so late-joining participant audio is captured automatically.