most-vr-18651
02/16/2026, 9:48 AMtall-airline-16756
02/16/2026, 9:48 AMtall-airline-16756
02/16/2026, 9:49 AMException: worker connection closed unexpectedly from the LiveKit agent worker. You also have a log line showing the worker registered successfully (wss://dpi-kccd98ec.livekit.cloud) right before the connection closed. I’ll help you diagnose likely causes and walk through targeted checks and mitigations.
Quick summary of likely causes
• Network instability causing the WebSocket/WebRTC connection to drop.
• A firewall, VPN, or security proxy (for example, ZScaler or another DPI proxy) interfering with WebSocket, TURN, or encrypted media streams.
• Intermediate proxies performing Deep Packet Inspection that break WebRTC/TURN traffic.
Actionable checks and next steps
1. Run the Connection Test utility
◦ Use the LiveKit Connection Test to verify WebSocket, WebRTC, and TURN connectivity from the agent’s host. If tests fail for WebSocket or TURN, the problem is almost certainly network/proxy related.
1. Check for proxies/ DPI (ZScaler-like)
◦ If your network uses ZScaler or a DPI proxy, configure bypass rules for your LiveKit project domain and TURN servers. Example bypass entries:
▪︎ turn.livekit.cloud — detect_protocol(no)
▪︎ dpi-kccd98ec.livekit.cloud — detect_protocol(no)
◦ Bypassing protocol detection prevents the proxy from attempting to inspect or modify encrypted WebRTC/TURN traffic (which breaks connections).
1. Verify ports and protocols
◦ Ensure outbound ports and protocols required by WebSocket, WebRTC, and TURN are allowed from the agent host (including UDP for TURN if you use UDP).
◦ Temporarily disable VPNs or test from a network without corporate proxies to confirm if the proxy is the cause.
1. Inspect agent logs & retry behavior
◦ Confirm the agent’s retry/backoff is enabled. The agent log shows “failed to connect to livekit, retrying in 0s” which means it does attempt reconnects — keep an eye on repeated failures and timestamps to see if disconnections are transient or immediate after registration.
1. Reproduce from a different network/location
◦ Try running the worker from a different network (home network, cloud VM in a different region) to determine whether the issue is local-network specific.
What I can help with next
• If you can share the outcome of the Connection Test or the specific network environment (behind ZScaler or other proxy?), I’ll suggest the exact bypass rules and further steps.
• If you prefer, paste a sanitized portion of more detailed agent logs (timestamps around registration and the failure) and I’ll help pinpoint whether the disconnect is immediately post-registration or after some activity.
If you don’t use a proxy or the Connection Test passes, tell me the test results and I’ll guide you through additional logs and configuration checks.
Sources: Configure ZScaler proxy for LiveKit connections | LiveKit | Diagnosing Connection Errors with the Connection Test Utility | LiveKit | server-sdk-go | livekit/livekit_composite | DeepWikimost-vr-18651
02/16/2026, 9:50 AMtall-airline-16756
02/16/2026, 9:50 AMturn.livekit.cloud (detect_protocol=no)
▪︎ dpi-kccd98ec.livekit.cloud (detect_protocol=no)
◦ These bypass rules prevent protocol inspection that breaks WebRTC/TURN encrypted streams.
1. Confirm outbound ports/protocols
◦ Ensure outbound TCP for WebSocket and TCP/UDP for TURN are allowed. TURN over UDP is preferred; if UDP is blocked, TURN TCP must be allowed.
1. Review agent logs around disconnects
◦ Share a short, sanitized snippet of logs from just before registration through the disconnect (timestamps). I’ll look for patterns (immediate close vs. after activity).
If tests fail or you have a proxy
• Share the Connection Test results or confirm proxy type and I’ll provide exact bypass entries and any network settings to change.
Next step suggestion
• If you can, run the Connection Test from that Nigerian host and paste the results (or paste the small log snippet and answer the proxy/network questions). I’ll use that to give precise steps you can apply.