why am I getting this error Error: could not estab...
# ask-ai
c
why am I getting this error Error: could not establish pc connection
g
The error "could not establish pc connection" typically indicates a problem with establishing a peer-to-peer connection in WebRTC, which LiveKit uses for real-time communication. Common causes include network issues, incorrect server configuration, or firewall restrictions. To troubleshoot, ensure that: - Your network allows the necessary ports for WebRTC (e.g., UDP ports 5000-6000) as shown in

AWS inbound rules

. - Your LiveKit server URL and tokens are correctly configured. - There are no issues with your TURN server, as indicated by similar issues in Slack discussions. Would you like more detailed troubleshooting steps? Sources: - Figure - Slack discussions Image 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
c
@millions-hair-24956 I get this problem running livekit and livekit server loally
g
When running LiveKit and LiveKit server locally, the "could not establish pc connection" error can often be due to network configuration issues or incorrect server setup. Here are some steps to troubleshoot: 1. Check Port Configuration: Ensure that the necessary ports are open. For local setups, LiveKit typically uses ports 7880 for WebSocket connections and a range of UDP ports (50000-60000) for WebRTC traffic. Verify that these ports are not blocked by your firewall. 2. Server Configuration: Make sure your LiveKit server is correctly configured to use the local network. The
use_external_ip
setting should be set to
false
for local development, as per the LiveKit deployment guide. 3. Network Setup: If you're using Docker, ensure that the network mode is set correctly. For local development, using
--network host
can help avoid network isolation issues. 4. WebSocket URL: Verify that the WebSocket URL (
wsUrl
) used in your client matches the server's address and port. For local development, this is often
ws://localhost:7880
. Would you like more detailed guidance on any of these steps? Sources: - LiveKit Deployment Guide 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.