Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

KMS 6.4.0 Ubuntu 14.04 LTS (64 bits), JS hello-world-tutorial 6.2.2-dev, Windows -- Can’t see loopback video #77

Closed
bhushanvadgave opened this issue May 31, 2016 · 10 comments
Assignees

Comments

@bhushanvadgave
Copy link

KMS kurento.conf.json

{
  "mediaServer" : {
    "resources": {
    //  //Resources usage limit for raising an exception when an object creation is attempted
    //  "exceptionLimit": "0.8",
    //  // Resources usage limit for restarting the server when no objects are alive
    //  "killLimit": "0.7",
        // Garbage collector period in seconds
        "garbageCollectorPeriod": 240
    },
    "net" : {
      "websocket": {
        "port": 8888,
        "secure": {
          "port": 8433,
          "certificate": "/opt/kurento/defaultCertificate.pem",
          "password": ""
        },
        //"registrar": {
        //  "address": "ws://localhost:9090",
        //  "localAddress": "localhost"
        //},
        "path": "kurento",
        "threads": 10
      }
    }
  }
}

I started JS kurento-hello-world tutorial by running
http-server -p 8443 -S -C keys/server.crt -K keys/server.key

Accessed https://<KMS Host>/kurento to let browser download the certificate.
Then accessed the demo by
https://localhost:8443/index.html?ws_uri=wss://<KMS Host>/kurento

I could only see the local video stream but not the remote. No errors found in browser or KMS.

Browser Logs


This appears to be Chrome
kurento-utils.js:32 Chrome: using SDP PlanB
index.js:70 Use freeice
index.js:70 chrome: {"audio":true,"video":{"optional":[{"minWidth":640},{"maxWidth":640},{"minFramerate":15},{"maxFramerate":15}]}}
index.js:70 constraints: {"mandatory":{"OfferToReceiveAudio":true,"OfferToReceiveVideo":true},"optional":[{"DtlsSrtpKeyAgreement":true}]}
index.js:70 Created SDP offer
index.js:70 Local description set v=0
o=- 2326095588732609576 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS p730th5QzQdM3tmgk0YhkmAbrr8ksXS7EDO1
m=audio 55016 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 126
c=IN IP4 172.22.236.60
a=rtcp:55017 IN IP4 172.22.236.60
a=candidate:2449547695 1 udp 2122260223 172.22.236.60 55016 typ host generation 0
a=candidate:2449547695 2 udp 2122260222 172.22.236.60 55017 typ host generation 0
a=ice-ufrag:xc4p9H0824k/6IeJ
a=ice-pwd:PuiXKsGtYqkq7ldSVsKuv56h
a=fingerprint:sha-256 49:44:DF:CE:0D:BD:80:64:1E:D4:90:92:EC:A7:E8:85:90:93:98:41:CE:01:3C:8A:61:89:2D:3F:DD:C3:48:A9
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
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:126 telephone-event/8000
a=maxptime:60
a=ssrc:4005278717 cname:smlojys/AXCcrcZm
a=ssrc:4005278717 msid:p730th5QzQdM3tmgk0YhkmAbrr8ksXS7EDO1 72d9ebb6-b660-4b2c-bbb7-7f669412bd2b
a=ssrc:4005278717 mslabel:p730th5QzQdM3tmgk0YhkmAbrr8ksXS7EDO1
a=ssrc:4005278717 label:72d9ebb6-b660-4b2c-bbb7-7f669412bd2b
m=video 55018 UDP/TLS/RTP/SAVPF 100 101 116 117 96
c=IN IP4 172.22.236.60
a=rtcp:55019 IN IP4 172.22.236.60
a=candidate:2449547695 1 udp 2122260223 172.22.236.60 55018 typ host generation 0
a=candidate:2449547695 2 udp 2122260222 172.22.236.60 55019 typ host generation 0
a=ice-ufrag:xc4p9H0824k/6IeJ
a=ice-pwd:PuiXKsGtYqkq7ldSVsKuv56h
a=fingerprint:sha-256 49:44:DF:CE:0D:BD:80:64:1E:D4:90:92:EC:A7:E8:85:90:93:98:41:CE:01:3C:8A:61:89:2D:3F:DD:C3:48:A9
a=setup:actpass
a=mid:video
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=sendrecv
a=rtcp-mux
a=rtpmap:100 VP8/90000
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtpmap:101 VP9/90000
a=rtcp-fb:101 ccm fir
a=rtcp-fb:101 nack
a=rtcp-fb:101 nack pli
a=rtcp-fb:101 goog-remb
a=rtcp-fb:101 transport-cc
a=rtpmap:116 red/90000
a=rtpmap:117 ulpfec/90000
a=rtpmap:96 rtx/90000
a=fmtp:96 apt=100
a=ssrc-group:FID 2924433760 2659419187
a=ssrc:2924433760 cname:smlojys/AXCcrcZm
a=ssrc:2924433760 msid:p730th5QzQdM3tmgk0YhkmAbrr8ksXS7EDO1 675dc07c-e678-47d5-be71-dd2f44d237b0
a=ssrc:2924433760 mslabel:p730th5QzQdM3tmgk0YhkmAbrr8ksXS7EDO1
a=ssrc:2924433760 label:675dc07c-e678-47d5-be71-dd2f44d237b0
a=ssrc:2659419187 cname:smlojys/AXCcrcZm
a=ssrc:2659419187 msid:p730th5QzQdM3tmgk0YhkmAbrr8ksXS7EDO1 675dc07c-e678-47d5-be71-dd2f44d237b0
a=ssrc:2659419187 mslabel:p730th5QzQdM3tmgk0YhkmAbrr8ksXS7EDO1
a=ssrc:2659419187 label:675dc07c-e678-47d5-be71-dd2f44d237b0

index.js:70 Local candidate: RTCIceCandidate {candidate: "candidate:2449547695 1 udp 2122260223 172.22.236.6…5016 typ host generation 0 ufrag xc4p9H0824k/6IeJ", sdpMid: "audio", sdpMLineIndex: 0}
index.js:70 Local candidate: RTCIceCandidate {candidate: "candidate:2449547695 2 udp 2122260222 172.22.236.6…5017 typ host generation 0 ufrag xc4p9H0824k/6IeJ", sdpMid: "audio", sdpMLineIndex: 0}
index.js:70 Local candidate: RTCIceCandidate {candidate: "candidate:2449547695 1 udp 2122260223 172.22.236.6…5018 typ host generation 0 ufrag xc4p9H0824k/6IeJ", sdpMid: "video", sdpMLineIndex: 1}
index.js:70 Local candidate: RTCIceCandidate {candidate: "candidate:2449547695 2 udp 2122260222 172.22.236.6…5019 typ host generation 0 ufrag xc4p9H0824k/6IeJ", sdpMid: "video", sdpMLineIndex: 1}
index.js:70 Local candidate: RTCIceCandidate {candidate: "candidate:3699563871 1 tcp 1518280447 172.22.236.6…cptype active generation 0 ufrag xc4p9H0824k/6IeJ", sdpMid: "audio", sdpMLineIndex: 0}
index.js:70 Local candidate: RTCIceCandidate {candidate: "candidate:3699563871 2 tcp 1518280446 172.22.236.6…cptype active generation 0 ufrag xc4p9H0824k/6IeJ", sdpMid: "audio", sdpMLineIndex: 0}
index.js:70 Local candidate: RTCIceCandidate {candidate: "candidate:3699563871 1 tcp 1518280447 172.22.236.6…cptype active generation 0 ufrag xc4p9H0824k/6IeJ", sdpMid: "video", sdpMLineIndex: 1}
index.js:70 Local candidate: RTCIceCandidate {candidate: "candidate:3699563871 2 tcp 1518280446 172.22.236.6…cptype active generation 0 ufrag xc4p9H0824k/6IeJ", sdpMid: "video", sdpMLineIndex: 1}
index.js:70 SDP answer received, setting remote description
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:1 1 UDP 2013266431 fe80::20d:3aff:fea0:a608 38348 typ host", sdpMLineIndex: 0, sdpMid: "audio"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:1 1 UDP 2013266431 fe80::20d:3aff:fea0:a608 38348 typ host", sdpMLineIndex: 1, sdpMid: "video"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:2 1 TCP 1019217151 fe80::20d:3aff:fea0:a608 9 typ host tcptype active", sdpMLineIndex: 0, sdpMid: "audio"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:2 1 TCP 1019217151 fe80::20d:3aff:fea0:a608 9 typ host tcptype active", sdpMLineIndex: 1, sdpMid: "video"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:3 1 TCP 1015022847 fe80::20d:3aff:fea0:a608 58295 typ host tcptype passive", sdpMLineIndex: 0, sdpMid: "audio"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:3 1 TCP 1015022847 fe80::20d:3aff:fea0:a608 58295 typ host tcptype passive", sdpMLineIndex: 1, sdpMid: "video"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:4 1 UDP 2013266431 100.79.118.107 59466 typ host", sdpMLineIndex: 0, sdpMid: "audio"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:4 1 UDP 2013266431 100.79.118.107 59466 typ host", sdpMLineIndex: 1, sdpMid: "video"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:5 1 TCP 1019216383 100.79.118.107 9 typ host tcptype active", sdpMLineIndex: 0, sdpMid: "audio"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:5 1 TCP 1019216383 100.79.118.107 9 typ host tcptype active", sdpMLineIndex: 1, sdpMid: "video"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:6 1 TCP 1015022079 100.79.118.107 58365 typ host tcptype passive", sdpMLineIndex: 0, sdpMid: "audio"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:6 1 TCP 1015022079 100.79.118.107 58365 typ host tcptype passive", sdpMLineIndex: 1, sdpMid: "video"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:1 2 UDP 2013266430 fe80::20d:3aff:fea0:a608 59455 typ host", sdpMLineIndex: 0, sdpMid: "audio"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:1 2 UDP 2013266430 fe80::20d:3aff:fea0:a608 59455 typ host", sdpMLineIndex: 1, sdpMid: "video"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:2 2 TCP 1019217150 fe80::20d:3aff:fea0:a608 9 typ host tcptype active", sdpMLineIndex: 0, sdpMid: "audio"}
index.js:70 ICE candidate received
index.js:70 Remote URL: blob:https%3A//localhost%3A8443/619a05a1-3c54-41ac-90c9-ed201cccbbf5
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:2 2 TCP 1019217150 fe80::20d:3aff:fea0:a608 9 typ host tcptype active", sdpMLineIndex: 1, sdpMid: "video"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:3 2 TCP 1015022846 fe80::20d:3aff:fea0:a608 33202 typ host tcptype passive", sdpMLineIndex: 0, sdpMid: "audio"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:3 2 TCP 1015022846 fe80::20d:3aff:fea0:a608 33202 typ host tcptype passive", sdpMLineIndex: 1, sdpMid: "video"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:4 2 UDP 2013266430 100.79.118.107 53220 typ host", sdpMLineIndex: 0, sdpMid: "audio"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:4 2 UDP 2013266430 100.79.118.107 53220 typ host", sdpMLineIndex: 1, sdpMid: "video"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:5 2 TCP 1019216382 100.79.118.107 9 typ host tcptype active", sdpMLineIndex: 0, sdpMid: "audio"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:5 2 TCP 1019216382 100.79.118.107 9 typ host tcptype active", sdpMLineIndex: 1, sdpMid: "video"}
index.js:70 ICE candidate received
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:6 2 TCP 1015022078 100.79.118.107 55017 typ host tcptype passive", sdpMLineIndex: 0, sdpMid: "audio"}
index.js:70 ICE candidate received
index.js:70 Loopback established
index.js:70 Remote candidate: Object {__module__: "kurento", __type__: "IceCandidate", candidate: "candidate:6 2 TCP 1015022078 100.79.118.107 55017 typ host tcptype passive", sdpMLineIndex: 1, sdpMid: "video"}
index.js:70 ICE candidate received

I tried other tutorials also but faced same issue.

@jcaden
Copy link
Member

jcaden commented May 31, 2016

The problem is that you have not configured a STUN/TURN server. Please check documentation in order to know more about STUN and TURN servers.

@jcaden jcaden closed this as completed May 31, 2016
@bhushanvadgave
Copy link
Author

bhushanvadgave commented May 31, 2016

As mentioned in the documention

If Kurento Media Server is located behind a NAT you need to use a STUN or TURN in order to achieve NAT traversal.

My KMS is running in a VM on cloud accessible over internet. Do I still need STUN/TURN server?

@jcaden
Copy link
Member

jcaden commented May 31, 2016

You are right, your server is in a public IP address, but your computer is not. Then it is necessary to configure STUN or TURN (depending on the type of NAT) in the client. This should be done by applications already. @igracia can you have a look at this? I can't see reflexive candidates from the browser in the attached log.

You should also check that there is UDP access from your computer to the kms instance. There can be firewalls blocking the access.

@jcaden jcaden reopened this May 31, 2016
@bhushanvadgave
Copy link
Author

bhushanvadgave commented Jun 1, 2016

I also tried running the same tutorial on a Ubuntu machine in which both KMS and http-server was running.
I started JS kurento-hello-world tutorial by running
http-server -p 8443 -S -C keys/server.crt -K keys/server.key

KMS was NOT SSL enabled in this case.
Accessed the demo by
https://localhost:8443/index.html

Still I couldn't see the remote loopback video. No errors in logs.

@jcaden
Copy link
Member

jcaden commented Jun 3, 2016

@bhushanvadgave can you share kms log here?

@igracia
Copy link
Contributor

igracia commented Jun 3, 2016

@bhushanvadgave If you access your page through HTTPS, and your KMS is using plain WS, you'll get a mixed content alert in your browser. There's no way you'll be able to signal KMS if you can't connect to it. You should get an error in your JS console, in your browser.

@igracia
Copy link
Contributor

igracia commented Jun 13, 2016

@bhushanvadgave Did you make any progress?

@bhushanvadgave
Copy link
Author

bhushanvadgave commented Jun 14, 2016

Yes @igracia, I set up a Coturn server by following this documentation and it worked with internet (no-proxy). But currently I have scenario where my KMS, Coturn server and NodeJS client are deployed in cloud VMs but JS client is in corporate network (behind proxy). Do I need to set up another TURN server in corporate network??

@igracia
Copy link
Contributor

igracia commented Jun 14, 2016

@bhushanvadgave You'll probably need to provide TURN configuration for your clients too. Use this code in your JS client code

var iceServers = [
    {
      "url": "turn:xxx.xxx.xxx.xxx:xxx",
      "username": "the_username",
      "credential": "the_password"
    }
  ];

var options = {
      localVideo: video,
      onicecandidate: onIceCandidate,
      configuration: {
        iceServers: iceServers
      }
    };

If that's ok with you, I'll proceed and close the issue, as it's already solved. I'll wait for your answer.

@jcaden
Copy link
Member

jcaden commented Aug 19, 2016

As we don't have response from @bhushanvadgave we proceed to close the issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants