4
votes

I am trying to setup a Kurento media server behind an nginx proxy & testing with the Kurento-hello-world example. The TURN server is in place & Kurento is up.

I added the TURN url in file /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini as explained here

turnURL=kurento:[email protected]:3478

I opened the specified ports :

  • 3478 TCP & UDP
  • 49152-65535 UDP

EDIT : I notice TURN is announcing a remote HEAD IP that seems to be in my network, but is not linked to my project and never specified in configs, as seen in the browser console, I receive a candidate 2 with the unknown external IP and a candidate 3 with good external IP but wonder if the browser can be stocked trying to connect to a bad one. Is it possible to avoid TURN propose a specific address ?

Locally, I can see (netstat -tulpn) the candidates UDP ports allocted on both kurento & TURN machines. The video input that should come from the server never appears, meaning the Connection is never achieved ?

TURN Server :

handle_udp_packet: New UDP endpoint: local addr 192.168.LO.CAL:3478, remote addr 130.206.UNK.KNO:54384
realm <x> user <>: incoming packet OLD BINDING processed, success
realm <x> user <kurento>: incoming packet OLD BINDING processed, success
realm <x> user <kurento>: incoming packet OLD BINDING processed, success
realm <x> user <>: incoming packet OLD BINDING processed, success
realm <x> user <>: incoming packet OLD BINDING processed, success
realm <x> user <kurento>: incoming packet OLD BINDING processed, success
closed (2nd stage), user <> realm <x> origin <>, local 192.168.LO.CAL:3478, remote **130.206.UNK.KNO**:54384, reason: allocation watchdog determined stale session state

Brower Hello-World Console :

WebRTC loopback starting
Use freeice
...
Created SDP offer
Local description set
...
onOffer
Got MediaPipeline
...
Local candidate:
{}
Got WebRtcEndpoint
Got FaceOverlayFilter
Connecting...
SDP answer obtained. Processing...
SDP answer received, setting remote description
SDP answer received, setting remote description
Remote candidate:
{
__module__: 'kurento'
,
__type__: 'IceCandidate'
,
candidate: 'candidate:1 1 UDP 2013266431 192.168.LO.CAL 53311 typ host'
,
sdpMLineIndex: 0
,
sdpMid: 'audio'
}
ICE candidate received
Remote candidate:
{
__module__: 'kurento'
,
__type__: 'IceCandidate'
,
candidate: 'candidate:1 1 UDP 2013266431 192.168.LO.CAL 53311 typ host'
,
sdpMLineIndex: 1
,
sdpMid: 'video'
}
ICE candidate received
Remote URL:
'blob:http%3A//localhost%3A8080/7b1cfb2c-d8bd-4e74-9a98-990ff35ac3fe'
Remote candidate:
{
__module__: 'kurento'
,
__type__: 'IceCandidate'
,
candidate: 'candidate:1 2 UDP 2013266430 192.168.LO.CAL 54384 typ host'
,
sdpMLineIndex: 0
,
sdpMid: 'audio'
}
ICE candidate received
Remote candidate:
{
__module__: 'kurento'
,
__type__: 'IceCandidate'
,
candidate: 'candidate:1 2 UDP 2013266430 192.168.LO.CAL 54384 typ host'
,
sdpMLineIndex: 1
,
sdpMid: 'video'
}
ICE candidate received
Loopback established
Remote candidate:
{
__module__: 'kurento'
,
__type__: 'IceCandidate'
,
candidate: 'candidate:2 1 UDP 1677721855 130.206.UNK.KNO 53311 typ srflx raddr 192.168.LO.CAL rport 53311'
,
sdpMLineIndex: 0
,
sdpMid: 'audio'
}
ICE candidate received
Remote candidate:
{
__module__: 'kurento'
,
__type__: 'IceCandidate'
,
candidate: 'candidate:2 1 UDP 1677721855 130.206.UNK.KNO  53311 typ srflx raddr 192.168.LO.CAL rport 53311'
,
sdpMLineIndex: 1
,
sdpMid: 'video'
}
ICE candidate received
Remote candidate:
{
__module__: 'kurento'
,
__type__: 'IceCandidate'
,
candidate: 'candidate:3 1 UDP 1006633215 130.206.REM.OTE 63499 typ relay raddr 192.168.LO.CAL rport 53311'
,
sdpMLineIndex: 0
,
sdpMid: 'audio'
}
ICE candidate received
Remote candidate:
{
__module__: 'kurento'
,
__type__: 'IceCandidate'
,
candidate: 'candidate:3 1 UDP 1006633215 130.206.REM.OTE 63499 typ relay raddr 192.168.LOC.AL rport 53311'
,
sdpMLineIndex: 1
,
sdpMid: 'video'
}
ICE candidate received

And the kurento log (sorry) :

pointImpl.cpp:281 WebRtcEndpointImpl()  stun port 3478
pointImpl.cpp:285 WebRtcEndpointImpl()  stun address 130.206.REM.OTE
pointImpl.cpp:294 WebRtcEndpointImpl()  turn info: 
...
Transport.cpp:482 processMessage()  Message: >{"id":19,"jsonrpc":"2.0","method":"invoke","params":{"object":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","operation":"gatherCandidates","sessionId":"f3b4f17e-d7e1-44d6-aec5-e0106ce37c50"}}
EventHandler.cpp:52 sendEvent()  Sending event: {"jsonrpc":"2.0","method":"onEvent","params":{"value":{"data":{"candidate":{"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 1 UDP 2013266431 192.168.LO.CAL 58764 typ host","sdpMLineIndex":0,"sdpMid":"audio"},"source":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","tags":[],"timestamp":"1449959528","type":"OnIceCandidate"},"object":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","type":"OnIceCandidate"}}}
 -> f3b4f17e-d7e1-44d6-aec5-e0106ce37c50
KurentoEventHandler EventHandler.cpp:52 sendEvent()  Sending event: {"jsonrpc":"2.0","method":"onEvent","params":{"value":{"data":{"candidate":{"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 1 UDP 2013266431 192.168.LO.CAL 58764 typ host","sdpMLineIndex":1,"sdpMid":"video"},"source":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","tags":[],"timestamp":"1449959528","type":"OnIceCandidate"},"object":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","type":"OnIceCandidate"}}}
 -> f3b4f17e-d7e1-44d6-aec5-e0106ce37c50
KurentoEventHandler EventHandler.cpp:52 sendEvent()  Sending event: {"jsonrpc":"2.0","method":"onEvent","params":{"value":{"data":{"candidate":{"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 2 UDP 2013266430 192.168.LO.CAL 36158 typ host","sdpMLineIndex":0,"sdpMid":"audio"},"source":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","tags":[],"timestamp":"1449959528","type":"OnIceCandidate"},"object":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","type":"OnIceCandidate"}}}
 -> f3b4f17e-d7e1-44d6-aec5-e0106ce37c50
KurentoEventHandler EventHandler.cpp:52 sendEvent()  Sending event: {"jsonrpc":"2.0","method":"onEvent","params":{"value":{"data":{"candidate":{"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:1 2 UDP 2013266430 192.168.LO.CAL 36158 typ host","sdpMLineIndex":1,"sdpMid":"video"},"source":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","tags":[],"timestamp":"1449959528","type":"OnIceCandidate"},"object":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","type":"OnIceCandidate"}}}
 -> f3b4f17e-d7e1-44d6-aec5-e0106ce37c50
Transport.cpp:484 processMessage()  Response: >{"id":19,"jsonrpc":"2.0","result":{"sessionId":"f3b4f17e-d7e1-44d6-aec5-e0106ce37c50","value":null}}
Transport.cpp:482 processMessage()  Message: >{"id":20,"jsonrpc":"2.0","method":"invoke","params":{"object":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/d4e4e54b-1610-4b0c-93e7-5f46558c7a40_kurento.FaceOverlayFilter","operation":"setOverlayedImage","operationParams":{"heightPercent":1.6000000000000001,"offsetXPercent":-0.34999999999999998,"offsetYPercent":-1.2,"uri":"https://localhost:8080/img/mario-wings.png","widthPercent":1.6000000000000001},"sessionId":"f3b4f17e-d7e1-44d6-aec5-e0106ce37c50"}}
Transport.cpp:484 processMessage()  Response: >{"id":20,"jsonrpc":"2.0","result":{"sessionId":"f3b4f17e-d7e1-44d6-aec5-e0106ce37c50","value":null}}
Transport.cpp:482 processMessage()  Message: >{"id":21,"jsonrpc":"2.0","method":"invoke","params":{"object":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","operation":"connect","operationParams":{"sink":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/d4e4e54b-1610-4b0c-93e7-5f46558c7a40_kurento.FaceOverlayFilter"},"sessionId":"f3b4f17e-d7e1-44d6-aec5-e0106ce37c50"}}
ementImpl.cpp:655 connect()  Connecting 235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint -> 235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/d4e4e54b-1610-4b0c-93e7-5f46558c7a40_kurento.FaceOverlayFilter params AUDIO
ementImpl.cpp:655 connect()  Connecting 235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint -> 235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/d4e4e54b-1610-4b0c-93e7-5f46558c7a40_kurento.FaceOverlayFilter params VIDEO
ementImpl.cpp:655 connect()  Connecting 235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint -> 235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/d4e4e54b-1610-4b0c-93e7-5f46558c7a40_kurento.FaceOverlayFilter params DATA
Transport.cpp:484 processMessage()  Response: >{"id":21,"jsonrpc":"2.0","result":{"sessionId":"f3b4f17e-d7e1-44d6-aec5-e0106ce37c50","value":null}}
Transport.cpp:482 processMessage()  Message: >{"id":22,"jsonrpc":"2.0","method":"invoke","params":{"object":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/d4e4e54b-1610-4b0c-93e7-5f46558c7a40_kurento.FaceOverlayFilter","operation":"connect","operationParams":{"sink":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint"},"sessionId":"f3b4f17e-d7e1-44d6-aec5-e0106ce37c50"}}
ementImpl.cpp:655 connect()  Connecting 235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/d4e4e54b-1610-4b0c-93e7-5f46558c7a40_kurento.FaceOverlayFilter -> 235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint params AUDIO
ementImpl.cpp:655 connect()  Connecting 235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/d4e4e54b-1610-4b0c-93e7-5f46558c7a40_kurento.FaceOverlayFilter -> 235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint params VIDEO
ementImpl.cpp:655 connect()  Connecting 235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/d4e4e54b-1610-4b0c-93e7-5f46558c7a40_kurento.FaceOverlayFilter -> 235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint params DATA
EventHandler.cpp:52 sendEvent()  Sending event: {"jsonrpc":"2.0","method":"onEvent","params":{"value":{"data":{"candidate":{"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:2 1 UDP 1677721855 130.206.UNK.KNO 58764 typ srflx raddr 192.168.LO.CAL rport 58764","sdpMLineIndex":0,"sdpMid":"audio"},"source":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","tags":[],"timestamp":"1449959528","type":"OnIceCandidate"},"object":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","type":"OnIceCandidate"}}}
 -> f3b4f17e-d7e1-44d6-aec5-e0106ce37c50
EventHandler.cpp:52 sendEvent()  Sending event: {"jsonrpc":"2.0","method":"onEvent","params":{"value":{"data":{"candidate":{"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:2 1 UDP 1677721855 130.206.UNK.KNO 58764 typ srflx raddr 192.168.LO.CAL rport 58764","sdpMLineIndex":1,"sdpMid":"video"},"source":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","tags":[],"timestamp":"1449959528","type":"OnIceCandidate"},"object":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","type":"OnIceCandidate"}}}
 -> f3b4f17e-d7e1-44d6-aec5-e0106ce37c50
Transport.cpp:484 processMessage()  Response: >{"id":22,"jsonrpc":"2.0","result":{"sessionId":"f3b4f17e-d7e1-44d6-aec5-e0106ce37c50","value":null}}
EventHandler.cpp:52 sendEvent()  Sending event: {"jsonrpc":"2.0","method":"onEvent","params":{"value":{"data":{"candidate":{"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:3 1 UDP 1006633215 130.206.REM.OTE 52131 typ relay raddr 192.168.LO.CAL rport 58764","sdpMLineIndex":0,"sdpMid":"audio"},"source":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","tags":[],"timestamp":"1449959528","type":"OnIceCandidate"},"object":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","type":"OnIceCandidate"}}}
 -> f3b4f17e-d7e1-44d6-aec5-e0106ce37c50
EventHandler.cpp:52 sendEvent()  Sending event: {"jsonrpc":"2.0","method":"onEvent","params":{"value":{"data":{"candidate":{"__module__":"kurento","__type__":"IceCandidate","candidate":"candidate:3 1 UDP 1006633215 130.206.REM.OTE52131 typ relay raddr 192.168.LO.CAL rport 58764","sdpMLineIndex":1,"sdpMid":"video"},"source":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","tags":[],"timestamp":"1449959528","type":"OnIceCandidate"},"object":"235a7f0a-87c0-4b8d-a726-e91b7095ea7b_kurento.MediaPipeline/4d01d709-1471-4fa6-b889-b3a79cb4e02c_kurento.WebRtcEndpoint","type":"OnIceCandidate"}}}
 -> f3b4f17e-d7e1-44d6-aec5-e0106ce37c50
Transport.cpp:543 closeHandler()  Connection closed
Transport.cpp:504 openHandler()  Client connected from http://localhost:8080

Thanks !

EDIT : installed packages/version

gstreamer1.5-libav:amd64/1.5.2.1~20150901123759.34.g07a7b16.trusty  
gstreamer1.5-nice:amd64/0.1.7.1~20151125151103.10.ge060eb5.trusty  
gstreamer1.5-plugins-bad:amd64/1.5.2.1~20150901123827.61.gced9e06.trusty  
gstreamer1.5-plugins-base:amd64/1.7.0.1~20151125150805.140.g2b445d5.trusty 
gstreamer1.5-plugins-good:amd64/.7.0.1~20151125150841.141.g0708286.trusty 
gstreamer1.5-plugins-ugly:amd64/1.7.0.1~20151126085656.24.g9ec26a4.trusty  
gstreamer1.5-pulseaudio:amd64/1.7.0.1~20151125150841.141.g0708286.trusty 
gstreamer1.5-x:amd64/1.7.0.1~20151125150805.140.g2b445d5.trusty 
kms-core-6.0/6.2.0.trusty                               
kms-elements-6.0/6.2.0.trusty                               
kms-filters-6.0/6.2.0.trusty                               
kms-jsonrpc-1.0/1.0.1.trusty                               
kmsjsoncpp/1.6.3~20151125151041.38.g263929e.trusty    
kurento-media-server-6.0/6.1.0.trusty                               
libgstreamer-plugins-bad1.5-0:amd64/1.5.2.1~20150901123827.61.gced9e06.trusty  
libgstreamer-plugins-base1.5-0:amd64/1.7.0.1~20151125150805.140.g2b445d5.trusty 
libgstreamer1.5-0:amd64/1.7.0.1~20151125150753.298.g6d22bfb.trusty 
libnice10:amd64/0.1.7.1~20151125151103.10.ge060eb5.trusty  
openwebrtc-gst-plugins/0.10.0~20151125150950.100.g61cc54b.trusty 
1
Can you please say which exact version of KMS and browser (version and type) you are using? The command dpkg -l | egrep -i "kurento|gstreamer|nice" should help youigracia
Hi @igracia, I added packages version to the quextion. I tested with same results on both Chrome Version 48.0.2564.41 beta (64-bit) & firefox 43.0b9.jbheren
Ok, there's no incompatibility between those versions. Try opening all UDP ports. STUN will use any available UDP port, the range you have defined is just for TURN (we need to fix that in the documentation), and it might be the case that the STUN candidate is outside of that interval.igracia
Thanks @igracia I extended the port range but it has no effect, in fact when I check the opened UDP ports with netstat -tulpn, those are in the range. I have TURN & NGINX services installed on font server with web address & Kurento is on a second server with local & internet access, could it be an issue ? Seems like TURN is made for that. I can see also that kurento is waiting for connection, but TURN displays a different IP address as remote than itself.jbheren
Cool! Thanks for the update. I think updating that image to the lates Kurento doesn't work that well, that's why the fresh install did. Probably some dependencies didn't get installed right.igracia

1 Answers

-2
votes

Hello Jean-Baptiste Heren , This is the issue of dependencies. So i suggest you to please installed all of your dependencies correctly or upgarde your dist first and than install Kurento-media-server 6.0 after that you will be able to resloved all of these issues in one go for same related issue with commands please follow the link answer:-

And also install openJdk7

Node Tutorial one to Many has no loading the remote server Stream Spinner moving endless

Thanks