Hello team, I am experiencing a critical inconsist...
# ingress
c
Hello team, I am experiencing a critical inconsistency between client-side logs and LiveKit dashboard when streaming from GStreamer to LiveKit via WHIP protocol. INCONSISTENCY BETWEEN CLIENT AND SERVER From Client Side (GStreamer logs): • ✅ WHIP handshake successful (HTTP 201 Created) • ✅ ICE connection state: "connected" • ✅ Peer connection state: "connected" • ✅ Media streaming working normally From LiveKit Dashboard: • ❌ Shows error: "could not establish signal connection" • ❌ Connection reported as failed System Configuration • Protocol: WHIP • LiveKit Endpoint:
https://[project_url]/w/stream_key
• Stream Key: • Media Format: ◦ Video: H.264, 1280x720@10fps, constrained-baseline profile ◦ Audio: Opus, 48kHz mono • GStreamer Pipeline:
whipclientsink
with LiveKit endpoint Additional Information • Issue occurs consistently - client always reports connected but dashboard always shows error • Same stream key and endpoint used • Network connection is stable How can we debug the "signal connection" in more detail from LiveKit server side? Do you have any ideas?
# Important Log Lines ## SUCCESS CASE LOG (feeder-grpc_2025-08-26_01-00-13-livekit-whip-success.log) ### 1. GStreamer Pipeline Execution
Copy code
Line 33: 2025/08/26 01:00:57 :clapper: Executing GStreamer command: gst-launch-1.0 -v whipclientsink name=whip signaller::whip-endpoint=https://linkbal-webrtc-test-202506-po4gvtpa.whip.livekit.cloud/w/pbrtSvfzd9 audio-caps=audio/x-opus video-caps=video/x-h264 fdsrc fd=3 blocksize=1920 ! queue ! rawaudioparse use-sink-caps=false format=pcm pcm-format=s16le sample-rate=48000 num-channels=1 ! audio/x-raw,rate=48000,channels=1,layout=interleaved ! audioconvert ! audioresample ! queue ! whip.audio_0 fdsrc fd=4 blocksize=1382400 ! queue ! rawvideoparse format=i420 width=1280 height=720 framerate=10/1 ! videorate max-rate=10 ! videoconvert ! x264enc tune=zerolatency speed-preset=ultrafast key-int-max=60 ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! queue ! whip.video_0

Line 34: 2025/08/26 01:00:57 :white_check_mark: GStreamer pipeline started successfully (PID: 18)
### 2. WHIP Offer Sent
Copy code
Line 187: 0:00:01.462779751 DEBUG webrtc-whip-signaller Sending offer SDP: Ok("v=0\r\no=- 7506305671142243389 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=ice-options:trickle\r\na=group:BUNDLE video0 audio1\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 98 99 100 101...")

Line 188: 0:00:01.487232376 DEBUG webrtc-whip-signaller Using endpoint https://linkbal-webrtc-test-202506-po4gvtpa.whip.livekit.cloud/w/pbrtSvfzd9
### 3. LiveKit Response (SUCCESS)
Copy code
Line 201: 0:00:04.223752419 DEBUG webrtc-whip-signaller Parsing endpoint response
Line 202: 0:00:04.223781836 DEBUG response status: 201 Created
Line 203: 0:00:04.223789294 DEBUG WHIP resource: "/w/pbrtSvfzd9SS/WH_xeUahd6JdJVr"
### 4. ICE Connection Established
Copy code
Line 425: 0:00:04.437468044 DEBUG webrtcnicetransport 1 1 connected
Line 426: 0:00:04.437837336 INFO ICE connection state change from checking(1) to connected(2)
### 5. Peer Connection Established
Copy code
Line 432: 0:00:04.448770419 INFO Peer connection state change from connecting(1) to connected(2)
### 6. Media Streaming Active
Copy code
Line 441: 0:00:04.455224461 INFO session 0 ssrc 525047068 new sender ssrc
Line 481: 0:00:04.621398461 DEBUG getting pt map for pt 97 in session 0
Line 482: 0:00:04.621421294 DEBUG Found caps application/x-rtp, media=(string)audio, payload=(int)97, clock-rate=(int)48000, encoding-name=(string)OPUS, sprop-stereo=(string)0, encoding-params=(string)2, sprop-maxcapturerate=(string)48000 for pt 97 in session 0
--- ## FAILED CASE LOG (feeder-grpc_2025-08-26_01-11-39-livekit-whip-failed.log) ### 1. GStreamer Pipeline Execution (IDENTICAL)
Copy code
Line 32: 2025/08/26 01:11:47 :clapper: Executing GStreamer command: gst-launch-1.0 -v whipclientsink name=whip signaller::whip-endpoint=https://linkbal-webrtc-test-202506-po4gvtpa.whip.livekit.cloud/w/pbrtSvfzd9 audio-caps=audio/x-opus video-caps=video/x-h264 [same pipeline]

Line 33: 2025/08/26 01:11:47 :white_check_mark: GStreamer pipeline started successfully (PID: 19)
### 2. WHIP Offer Sent (IDENTICAL)
Copy code
Line 201: 0:00:01.480907001 DEBUG webrtc-whip-signaller Sending offer SDP: Ok("v=0\r\no=- 4589976753644177838 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=ice-options:trickle\r\na=group:BUNDLE audio0 video1...")

Line 202: 0:00:01.494673126 DEBUG webrtc-whip-signaller Using endpoint https://linkbal-webrtc-test-202506-po4gvtpa.whip.livekit.cloud/w/pbrtSvfzd9
### 3. LiveKit Response (ALSO SUCCESS!)
Copy code
Line 214: 0:00:04.043459794 DEBUG webrtc-whip-signaller Parsing endpoint response
Line 215: 0:00:04.043492877 DEBUG response status: 201 Created
Line 216: 0:00:04.043511335 DEBUG WHIP resource: "/w/pbrtSvfzd9SS/WH_kkCUW2hNxB9g"
### 4. ICE Connection Established (IDENTICAL)
Copy code
Line 470: 0:00:04.305729002 DEBUG webrtcnicetransport 1 1 connected
Line 471: 0:00:04.306065585 INFO ICE connection state change from checking(1) to connected(2)
### 5. Peer Connection Established (IDENTICAL)
Copy code
Line 477: 0:00:04.317165294 INFO Peer connection state change from connecting(1) to connected(2)
### 6. Media Streaming Active (IDENTICAL)
Copy code
Line 372: 0:00:04.054912794 INFO session 0 ssrc 2372964231 new sender ssrc
Line 466: 0:00:04.262537752 DEBUG getting pt map for pt 97 in session 0
Line 467: 0:00:04.262553085 DEBUG Found caps application/x-rtp, media=(string)audio, payload=(int)97, clock-rate=(int)48000, encoding-name=(string)OPUS, encoding-params=(string)2, sprop-stereo=(string)0, sprop-maxcapturerate=(string)48000 for pt 97 in session 0
Line 498: 0:00:04.323364419 INFO session 0 ssrc 2561932233 new sender ssrc (video)
--- ## KEY OBSERVATION ***BOTH LOGS SHOW IDENTICAL SUCCESS PATTERNS:* - ✅ HTTP 201 Created response from LiveKit - ✅ WHIP resource allocated successfully - ✅ ICE connection established - ✅ Peer connection established - ✅ Media streaming active (both audio and video) ***YET DASHBOARD SHOWS:* "could not establish signal connection"
FYI: here is my gstreamer command config is written by go lang
Copy code
func (s *IntegratedServer) buildGstCommandForLiveKitWHIP(streamKey string, childAudioFD, childVideoFD int) []string {
    const audioBlock = 48000 / 50 * 2 * 1 // 1920 bytes for 20ms
    const videoBlock = 1280 * 720 * 3 / 2 // 1382400 bytes for I420

    whipEndpoint := s.buildDynamicWhipEndpoint(streamKey)

    return []string{
        "gst-launch-1.0",
        "-v",

        // WHIP client for LiveKit
        "whipclientsink", "name=whip", fmt.Sprintf("signaller::whip-endpoint=%s", whipEndpoint),
        "audio-caps=audio/x-opus",
        "video-caps=video/x-h264",

        // Audio pipeline (fd=childAudioFD, 48k mono S16LE)
        "fdsrc", fmt.Sprintf("fd=%d", childAudioFD), fmt.Sprintf("blocksize=%d", audioBlock), "!",
        "queue", "!",
        "rawaudioparse", "use-sink-caps=false", "format=pcm", "pcm-format=s16le",
        "sample-rate=48000", "num-channels=1", "!",
        "audio/x-raw,rate=48000,channels=1,layout=interleaved", "!",
        "audioconvert", "!", "audioresample", "!",
        "queue", "!", "whip.audio_0",

        // Video pipeline (fd=childVideoFD, I420 1280x720/10fps)
        "fdsrc", fmt.Sprintf("fd=%d", childVideoFD), fmt.Sprintf("blocksize=%d", videoBlock), "!",
        "queue", "!",
        "rawvideoparse", "format=i420", "width=1280", "height=720", "framerate=10/1", "!",
        "videorate", "max-rate=10", "!",
        "videoconvert", "!",
        "x264enc", "tune=zerolatency", "speed-preset=ultrafast", "key-int-max=60", "!",
        "h264parse", "!", "video/x-h264,stream-format=avc,alignment=au", "!",
        "queue", "!", "whip.video_0",
    }
}
feeder-grpc_2025-08-26_01-00-13-livekit-whip-success.log,feeder-grpc_2025-08-26_01-11-39-livekit-whip-failed.log
https://livekit.io/connection-test I am trying to test connection for my ws , but these errors are happening:
Copy code
Connecting to signal connection via WebSocket
Error: Encountered unknown websocket error during connection: [object Event]

Establishing WebRTC connection
Warning: ports need to be open on firewall in order to connect.

Error: could not establish signal connection: Encountered unknown websocket error during connection: [object Event]

Can connect via TURN
Error: Encountered unknown websocket error during connection: [object Event]

Can publish audio
detected audio from microphone

published 174 audio packets

Can publish video
Error: could not establish signal connection: Encountered unknown websocket error during connection: [object Event]

Resuming connection after interruption
Error: could not establish signal connection: Encountered unknown websocket error during connection: [object Event]
could not establish signal connection
is appearing, so related?
Hi @refined-appointment-81829, could you please check this? I’d really appreciate your help.