gorgeous-soccer-57984
10/01/2025, 7:01 AMtall-airline-16756
10/01/2025, 7:01 AMtall-airline-16756
10/01/2025, 7:02 AMwss://)
◦ TCP 7880 and 7881 (used by LiveKit for signaling)
◦ UDP 7882 (used for media via WebRTC)
1. Ensure Valid SSL/TLS Certificates: If you're using wss://, it's essential to have valid SSL certificates installed on your server. Without this, the WebSocket handshake might not complete successfully.
2. Use the Connection Test Utility: I recommend running the LiveKit Connection Test utility—it’s a handy tool that can help diagnose any issues with WebSocket and WebRTC connectivity.
3. Adjust Client-Side Timeout: Sometimes, if your AWS instance experiences high latency, increasing the WebSocket timeout in the JavaScript SDK can make a difference. Here's how you can do it:
signalClient.join(url, token, {
autoSubscribe: true,
websocketTimeout: 15000 // Adjust timeout as needed
});
If after trying these steps the issue still persists, it might be helpful to check your server logs for any errors related to WebSocket connections or if proxies/load balancers are closing connections too early. Please feel free to reach out if you’d like me to guide you through any of these steps or if you have more questions—I’m here to help!
Sources: Running LiveKit on AWS | Diagnosing Connection Errors with Connection Test Utility | src/connectionHelper/checks/websocket.ts | signalling/signaltransport_websocket.go | How to Send Logs from the JavaScript SDK to Providers like Datadoggorgeous-soccer-57984
10/01/2025, 7:03 AMtall-airline-16756
10/01/2025, 7:03 AMws:// (non-secure WebSocket), let's make sure a few things are set up correctly to help you out:
1. Network Configuration: Please double-check that your AWS instance allows inbound traffic on TCP port 7880, as this port is essential for signaling with non-secure WebSocket connections.
2. DNS Configuration: It’s important to confirm that your domain's DNS (like an A record) is correctly pointing to the public IP of your AWS instance.
3. Server Configuration: Make sure your LiveKit server is set up to accept non-secure WebSocket connections. Also, take a peek at the server logs to see if there are any WebSocket-related errors.
4. Client-Side Timeout: If you’re experiencing connection timeouts, you might want to increase the WebSocket timeout in the JavaScript SDK like this:
signalClient.join(url, token, {
autoSubscribe: true,
websocketTimeout: 15000 // Adjust timeout as needed
});
Just a friendly note: using ws:// isn’t usually recommended for production because of security reasons. If you can, switching to wss:// with proper SSL/TLS certificates would be a safer bet for your communication. If you’d like, I’m here to help guide you through that process or anything else you need!gorgeous-soccer-57984
10/01/2025, 7:04 AMtall-airline-16756
10/01/2025, 7:05 AMtelnet or curl?
• Are there any reverse proxies (like Nginx) or load balancers set up in front of the LiveKit server?
Getting this info will really help us understand the situation better and find the right solution for you.