billowy-engineer-17375
04/14/2026, 9:47 AMtall-airline-16756
04/14/2026, 9:47 AMtall-airline-16756
04/14/2026, 9:48 AMrtcConfig.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 elementsbillowy-engineer-17375
04/14/2026, 9:52 AMtall-airline-16756
04/14/2026, 9:52 AMrtcConfig.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 elementsbillowy-engineer-17375
04/14/2026, 10:43 AMpunycode 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.542375927Ztall-airline-16756
04/14/2026, 10:43 AMrtcConfig.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 elementsbillowy-engineer-17375
04/14/2026, 12:31 PMtall-airline-16756
04/14/2026, 12:32 PMbillowy-engineer-17375
04/14/2026, 12:58 PM/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 resolvedbillowy-engineer-17375
04/14/2026, 3:56 PM/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.