Skip to content

Commit 02a0103

Browse files
ralyodioclaude
andcommitted
fix(sfu): stop offering the broken TLS TURN relay; keep working TCP relay
coturn's TLS listener (:5349) is broken on this box — clients' TLS relay allocations fail with "TLS/TCP socket buffer operation error" / OpenSSL-3 "SSL routines internal error". Those failing candidates churn ICE and delay the publisher until livekit hits a dtls timeout ("could not establish pc connection"), even though a plain-TCP relay (3478/tcp) carries media fine — verified in coturn logs (~830 KB relayed up to the SFU on a working session). Drop the turns: URL from the offered ICE servers; clients now use the TCP relay only. Server-side, applies on the next connect (no app release). Re-add turns: once coturn TLS is fixed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent d55c587 commit 02a0103

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎apps/web/src/lib/ice-servers.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ export function getIceServers(): IceServer[] {
3030
? u
3131
: `${u}${u.includes('?') ? '&' : '?'}transport=tcp`;
3232

33+
// NOTE: the turns: (TLS :5349) URL is intentionally NOT offered. coturn's
34+
// TLS handshake is broken on this box (OpenSSL-3 "SSL routines internal
35+
// error" / "TLS/TCP socket buffer operation error") — clients allocate TLS
36+
// relay candidates that fail and churn, delaying ICE until livekit's
37+
// publisher hits a dtls timeout, even though a plain-TCP relay carries media
38+
// fine (verified: ~830 KB relayed over a 3478/tcp session). Offer only the
39+
// TCP relay until coturn TLS is fixed.
3340
const turnUrls = [
34-
process.env.NEXT_PUBLIC_TURNS_URL,
3541
process.env.TURN_SERVER_URL ?? process.env.NEXT_PUBLIC_TURN_URL,
3642
process.env.TURN_SERVER_IP_URL ?? process.env.NEXT_PUBLIC_TURN_IP_URL,
3743
]

0 commit comments

Comments
 (0)