We are face a Livekit Gstreamer rtc connection iss...
# ask-ai
n
We are face a Livekit Gstreamer rtc connection issue, we are using livekit/gstreamer 1.24.5-prod image and get this error message Nest] 1 - 08/20/2025, 25915 AM LOG [MONITOR_LMVMTPE007337_02-52-05] Room LMVMTPE007337 track published [Nest] 630 - 08/20/2025, 25916 AM ERROR [RC_LMVMTPE007337_2025-08-20-02-59-15] Error: Could not read from resource. [Nest] 630 - 08/20/2025, 25916 AM ERROR [RC_LMVMTPE007337_2025-08-20-02-59-15] Debug information: ../ext/dtls/gstdtlsdec.c(504): process_buffer (): /GstPipelinepipeline0/GstLiveKitWebRTCSrcsrc/GstBinbin0/GstWebRTCBinwebrtcbin0/TransportReceiveBintransportreceivebin0/GstDtlsSrtpDecdtlssrtpdec0/GstDtlsDecdtlsdec0 Fatal SSL error 00000.800169969 115 0x7fffd0001e30 FIXME default gstutils.c4088gst_element_decorate_stream_id_internal:<nicesrc0> Creating random stream-id, consider implementing a deterministic way of creating a stream-id 00000.800201469 115 0x7fffd0001e30 WARN GST_PADS gstpad.c4392gst_pad_peer_query&lt;nicesrc0src> could not send sticky events 00000.805383026 115 0x7fffb412e5b0 ERROR webrtcbin gstwebrtcbin.c7153gst_webrtc_bin_get_transceiver:<webrtcbin0> No transceiver for idx 0 00000.805632237 115 0x7fffb412e5b0 WARN webrtcsrc net/webrtc/src/webrtcsrc/imp.rs854gstrswebrtc:webrtcsrc👿Sessionremote description set{{closure}} Transceiver for idx 0 does not exist, GStreamer <= 1.24, adding it ourself 00000.809583655 115 0x7fffb412e5b0 ERROR webrtcbin gstwebrtcbin.c7153gst_webrtc_bin_get_transceiver:<webrtcbin0> No transceiver for idx 1 00000.809622655 115 0x7fffb412e5b0 WARN webrtcsrc net/webrtc/src/webrtcsrc/imp.rs854gstrswebrtc:webrtcsrc👿Sessionremote description set{{closure}} Transceiver for idx 1 does not exist, GStreamer <= 1.24, adding it ourself 00001.825881218 115 0x7fffd0002790 FIXME default gstutils.c4088gst_element_decorate_stream_id_internal:<dtlsenc0> Creating random stream-id, consider implementing a deterministic way of creating a stream-id 00001.921580589 115 0x7fffd0002150 ERROR dtlsconnection gstdtlsconnection.c994handle_error:<dtlsconnection0> Fatal SSL error 00001.922628892 115 0x7fffd0002150 ERROR dtlsconnection gstdtlsconnection.c977ssl_err_cb:<dtlsconnection0> ssl error: C0C63FBDFF7F0000error0A000152:SSL routinesfinal renegotiateunsafe legacy renegotiation disabled../deps/openssl/openssl/ssl/statem/extensions.c921: [晚上 7:57] Currently we are using livekit/gstreamer 1.24.5-prod as base image and it's using ubuntu 24 and it's related openssl is version 3.*, and looks like livekit server is responding legacy ssl back.
t
Thanks for reaching out, 11. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! Could you share a bit more about your LiveKit server setup? A few things that would help us understand better: • Are you running LiveKit Cloud or a self-hosted LiveKit server? • Have you tweaked any settings on the server or the GStreamer pipeline? • Are there any network conditions or firewalls that might be impacting DTLS or SSL connections? Sources: CHANGELOG.md | Firewall Tips
n
i'm using LiveKit Cloud, we are running correctly since yesterday. And without any change suddenly our webrtc cannot connect to livekit server Here is our gstreamer livekitwebrtcsrc name=src signaller::ws-url=${data.wsUrl} signaller::api-key=${data.apiKey} signaller::secret-key=${data.secretKey} signaller::room-name=${data.roomName} signaller::identity=${data.identity} signaller::participant-name=${data.identity} video-codecs=${videoCodec} queue name=video_queue ! identity sync=true ! rtph264depay ! h264parse name=h264parse config-interval=-1 ! queue ! mux.video_0 audiotestsrc wave=0 volume=0 ! audioconvert ! audioresample ! audio_mixer. audiomixer name=audio_mixer ! avenc_aac ! aacparse ! queue ! mux.audio_0 mp4mux name=mux reserved-max-duration=${MAX_RECORDING_DURATION * Gst.MSECOND * 1.5} reserved-moov-update-period=${Gst.SECOND} ! filesink location=${data.location} our docker file FROM livekit/gstreamer:1.24.5-prod AS base RUN apt update && apt install -y curl libgirepository1.0-dev gir1.2-gstreamer-1.0 && \ curl -L -o /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrswebrtc.so https://github.com/BeeInventor/gst-plugins-rs/releases/download/0.14.0-alpha.1-a8146f33/libgstrswebrtc.so && \ curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ apt install -y nodejs && npm install -g corepack@latest && \ corepack enable && corepack prepare pnpm --activate WORKDIR /app FROM base AS pnpm-fetch COPY package.json pnpm-lock.yaml ./ RUN pnpm fetch FROM pnpm-fetch AS prod-deps RUN pnpm install --offline --ignore-scripts --ignore-scripts --prod FROM pnpm-fetch AS build RUN pnpm install --offline --ignore-scripts --ignore-scripts COPY . ./ RUN pnpm exec nest build FROM base AS app COPY --from=prod-deps /app/node_modules ./node_modules/ COPY --from=build /app/dist ./dist/ COPY .env* ./ CMD ["node", "dist/main"]
t
Hey there! If you’re running into a sudden WebRTC connection issue with LiveKit Cloud and your GStreamer pipeline, no worries—let’s try these steps together: • Run Connection Tests: Give the LiveKit Connection Test Utility a shot to check WebRTC, WebSocket, and TURN server connectivity. You can find it here: https://livekit.io/connection-test. • Check Network Configuration: Make sure your network isn’t blocking WebRTC traffic. If needed, whitelist
*.turn.livekit.cloud
. • Force TURN Usage: If you think network restrictions might be the culprit, try forcing TURN by setting
connectOpts.rtcConfig = { iceTransportPolicy: 'relay' };
. • Monitor GStreamer Logs: Take a look at your GStreamer pipeline logs for any errors or warnings that might give us clues. • Test with a Separate Project: To keep things safe, try creating a separate LiveKit project just for testing—this way your main setup stays unaffected. If you’re still stuck after these steps, it could be something like a firewall or VPN blocking the connection. Double-check your firewall settings, try temporarily turning off any VPNs, or reach out to your IT team for help. Sources: Diagnosing Connection Errors with Connection Test Utility | Connecting to LiveKit | LiveKit Docs | Firewall Tips | Universal Egress | pkg/pipeline/watch.go
n
Connecting to signal connection via WebSocket Connected to server, version 1.9.0. LiveKit Cloud: Japan Establishing WebRTC connection udp 161.33.140.139:50000 host udp [2603c021800d8b000a26075a7d6b]50000 host tcp 161.33.140.139:7881 host (passive) tcp [2603c021800d8b000a26075a7d6b]7881 host (passive) udp 161.33.140.139:50001 host udp [2603c021800d8b000a26075a7d6b]50001 host tcp 161.33.140.139:7881 host (passive) tcp [2603c021800d8b000a26075a7d6b]7881 host (passive) Warning: error with ICE candidate: 701 STUN host lookup received error. stunip 161 33 140 139.host.livekit.cloud3478 Warning: error with ICE candidate: 701 STUN host lookup received error. stunip 161 33 140 139.host.livekit.cloud3478 Warning: error with ICE candidate: 701 STUN host lookup received error. stunip 161 33 140 139.host.livekit.cloud3478 Warning: error with ICE candidate: 701 TURN host lookup received error. turnip 161 33 140 139.host.livekit.cloud3478?transport=udp Warning: error with ICE candidate: 701 TURN host lookup received error. turnip 161 33 140 139.host.livekit.cloud3478?transport=udp Warning: error with ICE candidate: 701 TURN host lookup received error. turnip 161 33 140 139.host.livekit.cloud3478?transport=udp Warning: error with ICE candidate: 701 Address not associated with the desired network interface. turnsdasiotvideo etbwvdkf.turn.livekit.cloud443?transport=tcp Warning: error with ICE candidate: 701 Address not associated with the desired network interface. turnsdasiotvideo etbwvdkf.turn.livekit.cloud443?transport=tcp Warning: error with ICE candidate: 701 Address not associated with the desired network interface. turnsdasiotvideo etbwvdkf.turn.livekit.cloud443?transport=tcp Warning: error with ICE candidate: 701 Address not associated with the desired network interface. turnsotokyo1b.turn.livekit.cloud443?transport=tcp Warning: error with ICE candidate: 701 Address not associated with the desired network interface. turnsotokyo1b.turn.livekit.cloud443?transport=tcp Warning: error with ICE candidate: 701 Address not associated with the desired network interface. turnsotokyo1b.turn.livekit.cloud443?transport=tcp Warning: error with ICE candidate: 701 Address not associated with the desired network interface. turnsotokyo1b.turn.livekit.cloud443?transport=tcp Warning: error with ICE candidate: 701 Address not associated with the desired network interface. turnsotokyo1b.turn.livekit.cloud443?transport=tcp Warning: error with ICE candidate: 701 Address not associated with the desired network interface. turnsotokyo1b.turn.livekit.cloud443?transport=tcp Warning: error with ICE candidate: 701 Address not associated with the desired network interface. turnsdasiotvideo etbwvdkf.turn.livekit.cloud443?transport=tcp Warning: error with ICE candidate: 701 Address not associated with the desired network interface. turnsdasiotvideo etbwvdkf.turn.livekit.cloud443?transport=tcp Warning: error with ICE candidate: 701 Address not associated with the desired network interface. turnsdasiotvideo etbwvdkf.turn.livekit.cloud443?transport=tcp Can connect via TURN Can publish audio detected audio from microphone published 144 audio packets Can publish video received video frames published 1456 video packets Resuming connection after interruption
t
Hey there! Those ICE candidate errors and STUN/TURN host lookup hiccups you're seeing can usually be sorted out with a few simple steps: • Whitelist TURN Servers: Make sure
*.turn.livekit.cloud
is on your firewall's allowlist, especially for TCP/443. This helps keep things running smoothly. • Force TURN Usage: If you think network restrictions might be causing trouble, try forcing your connection to use TURN by setting
connectOpts.rtcConfig = { iceTransportPolicy: 'relay' };
. • Keep an Eye on ICE Connection States: It’s super helpful to track changes in ICE connection states and candidate errors. Logging events like
iceconnectionstatechange
and
icecandidateerror
can give you a clearer picture of what’s going on. • Run Connection Tests: The LiveKit Connection Tester is a handy tool for pinpointing connectivity issues. You can check it out here: https://livekit.io/connection-test. • Try Different Transport Methods: LiveKit smartly falls back to TCP or TURN/TLS if UDP isn’t playing nice. Just double-check that these fallback options are working as they should. If you’re still stuck after trying these, no worries! Just share a bit more about your network setup—things like firewall rules or VPN details—and we’ll dig in together to find the best fix. Sources: CHANGELOG.md | Firewall Tips | Connecting to LiveKit | LiveKit Docs | pkg/rtc/transport.go