Open gharia opened 4 years ago
Even sometimes I observe the Internal data flow error
when no RTP endpoint is connecting. It is intermittent. @igracia @j1elo I would appreciate it if you can give some hints regarding how can I fix this.
Judging by the logs, the error is raised from the audiotestsrc
element, and "streaming task paused, reason not-linked" makes me think that the problem happens in this link:
https://github.com/Kurento/kms-core/blob/dee9f41c4f2a0b0ba45d0233f3c7d149f02c0007/src/gst-plugins/kmsaudiomixer.c#L845
You might want to print some debug info around there to have a clearer picture of what is going on. The audiotestsrc
connects with a capsfilter, so I guess the caps are being changed in an incompatible way when the new endpoint is connected.
You could also increment the debug level for audiotestsrc
, maybe also basesrc
; probably there is some useful information in there:
https://doc-kurento.readthedocs.io/en/latest/features/logging.html#logging-levels-and-components
You would set something like
export GST_DEBUG="${GST_DEBUG:-3},audiotestsrc:5,basesrc:5"
in /etc/default/kurento-media-server
Hey @j1elo ,
As you are aware, from our discussion on the Google group at https://groups.google.com/d/msg/kurento/fOj3iO1kycc/uoxCGMtfBAAJ, I am testing the new pipeline setup with DispatcherOneToMany. Not sure it is related, but this bug re-surfaced during testing.
Description:
Following is out overall pipeline:
Presenters' WebRTCEndpoint > Composite > DispatcherOneToMany > Listeners' WebRTCEndpoint( (which includes both WebRTC and RTP consumers)
SDP offer from WebRtc consumer (from chrome):
v=0
o=- 4319769343296506756 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=msid-semantic: WMS
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:P2Vt
a=ice-pwd:frbpQ97aOR73A45kahgReoYR
a=ice-options:trickle
a=fingerprint:sha-256 4B:41:CA:CB:4A:27:02:31:48:7F:7A:E1:6B:2D:04:94:E2:A4:A7:4E:D8:36:A2:E2:2F:84:DE:E1:F2:70:4A:32
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=recvonly
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
SDP offer sent from RTP client/consumer (from jar utility):
v=0
t=0 0
m=audio 8978 RTP/AVP 98
c=IN IP4 192.168.2.4
a=recvonly
a=rtpmap:98 opus/48000/2
a=fmtp:98 stereo=0; sprop-stereo=0; useinbandfec=1
Logs:
I have added listeners to the endpoints in our application server code. Following are the logs from those listeners:
17:58:12.706 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t451] INFO com.benzinga.PresenterSession - [Broadcaster-WebRtcEndpoint::ConnectionStateChanged] source: 59de01ae-b4e2-4b5b-9c49-5a9bb0b31f32_kurento.MediaPipeline/877d6977-f27c-4c23-8cc8-3cc872f75b82_kurento.WebRtcEndpoint, timestamp: 1578679092, tags: [], oldState: DISCONNECTED, newState: CONNECTED
17:58:12.752 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t451] INFO com.benzinga.PresenterSession - [Broadcaster-WebRtcEndpoint::MediaFlowOutStateChange] source: 59de01ae-b4e2-4b5b-9c49-5a9bb0b31f32_kurento.MediaPipeline/877d6977-f27c-4c23-8cc8-3cc872f75b82_kurento.WebRtcEndpoint, timestamp: 1578679092, tags: [], state: FLOWING, padName: default, mediaType: AUDIO
17:58:12.795 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t452] INFO com.benzinga.PresenterSession - [Broadcaster-WebRtcEndpoint::MediaTranscodingStateChange] source: 59de01ae-b4e2-4b5b-9c49-5a9bb0b31f32_kurento.MediaPipeline/877d6977-f27c-4c23-8cc8-3cc872f75b82_kurento.WebRtcEndpoint, timestamp: 1578679092, tags: [], state: TRANSCODING, binName: kmsagnosticbin2-673, mediaType: AUDIO
17:58:13.486 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t452] INFO com.benzinga.PresenterSession - [Broadcaster-WebRtcEndpoint::MediaStateChanged] source: 59de01ae-b4e2-4b5b-9c49-5a9bb0b31f32_kurento.MediaPipeline/877d6977-f27c-4c23-8cc8-3cc872f75b82_kurento.WebRtcEndpoint, timestamp: 1578679093, tags: [], oldState: DISCONNECTED, newState: CONNECTED
17:58:16.714 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t452] INFO com.benzinga.PresenterSession - [Broadcaster-WebRtcEndpoint::MediaFlowOutStateChange] source: 59de01ae-b4e2-4b5b-9c49-5a9bb0b31f32_kurento.MediaPipeline/877d6977-f27c-4c23-8cc8-3cc872f75b82_kurento.WebRtcEndpoint, timestamp: 1578679096, tags: [], state: NOT_FLOWING, padName: default, mediaType: AUDIO
18:02:50.058 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t456] INFO com.benzinga.PresenterSession - [Broadcaster-WebRtcEndpoint::MediaFlowOutStateChange] source: 59de01ae-b4e2-4b5b-9c49-5a9bb0b31f32_kurento.MediaPipeline/877d6977-f27c-4c23-8cc8-3cc872f75b82_kurento.WebRtcEndpoint, timestamp: 1578679370, tags: [], state: FLOWING, padName: default, mediaType: AUDIO
As you can see in the above logs, it took almost 5 minutes from NOT_FLOWING (log 17:58:16.714) to FLOWING (log 18:02:50.058).
I have attached the respective kurento logs generated at that time.
Am I stuck with transcoding? I appreciate it if you can point me in the right direction.
Thanks
KMS Version:
Kurento Media Server version: 6.12.0 Found modules: 'core' version 6.12.0 'elements' version 6.12.0 'filters' version 6.12.0
Ubuntu Version
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.6 LTS Release: 16.04 Codename: xenial
Other libraries versions:
Client libraries
Browsers tested Not applicable. Actually fails on each browser as streaming stops
System description:
Everything is on same server. Kurento, Coturn and application server
What steps will reproduce the problem?
WebRtcEndpoint
toRecorderEndpoint
and toHubPort
of compositeRtpEndpoint
and connecting it to aHubPort
of the same composite (need to do SDP negotiation on RTP first)Internal data flow error
and streaming will stop for a few seconds. And eventually, it crashes/disconnecting everyone from application server (which uses kms java client library)What is the expected result? There should not be
Internal data flow error
and the streaming should not pause/stop if during ongoing streaming we connect RtpEndpoint to composite (which is connected toWebRtcEndpoint
)What happens instead? It stops streaming for a few seconds. And if this occurs regularly (RTP connects while ongoing WebRTC streaming), like 10 times in 1 minute, then eventually it crashes the application server and/or kurento and we need to restart both of them.
Does it happen with one of the tutorials? Have not tested with tutorial
Please provide any additional information below Following are the logs when the mentioned scenario occurs: