Working over the Internet

390 views
Skip to first unread message

Inso

unread,
Oct 19, 2014, 1:55:48 PM10/19/14
to kur...@googlegroups.com
Hi everyone.

I'm a new Kurento user and i'm experiencing some trouble trying to use the tutorial 1 : Hello world over the internet.

My configuration :
I got the Kurento project (for java) working on spring-boot, running on a W8.1, @IP:192.168.0.16
The KMS is running on a VM ubuntu serv 14.04 LTS @IP:192.168.0.17

i got an other laptop on W7 and a chrome browser updated.

Here is my my kurento.conf.json :

{
   "mediaServer" : {
      "net : {
           "websocket": {
              "port": 8888,
              "path" : "kurento",
              "threads": 10
            }
      }
  },
  "modules": {
     "kurento": {
        "sdpEndpoint" : {
           "sdpPattern" : "sdp_pattern.txt"
         },
         "httpEndpoint" : {
            "announcedAdress"  : "<IP_PUBLIC>"
         },
         "webRtcEndpoint" : {
          },
          "PlumberEndpoint" : {
             "announcedAdress"  : "<IP_PUBLIC>"
           }
        }
  }
}

i forwarded my 80 port to my local 192.168.0.16:6666 (the port i used to run the project on spring-boot), and forwarded my 8888 to 192.168.0.17:8888.

In the HelloWorldApp.java, i use this (so my rooter forward it to the KMS on the good port) :
final static String DEFAULT_KMS_WS_URI = "ws://<IP_PUBLIC>:8888/kurento";



If i reach my http://<IP_PUBLIC> with the browser of a computer located in my private network, everything works just fine. I got my own video in the local stream and the remote video is working like a charm too.
The problem appear when i try to reach my http://<IP_PUBLIC> with a computer outside my network (through the internet).
In this case, i can reach the application, i click on the "start" button and my local stream appear. Meanwhile, the remote stream start to load (with the loading widget turning) but nothing appear.
In the console, everything looks fine :

Loading complete ...
Starting video call ...
Created SDP offer
Local description set
ICE negotiation completed
Invoking SDP offer callback function <IP_PUBLIC>
Received, setting remote description

But nothing appear.

I tried to change my kurento.conf.json after found some instructions in this group in order to use a public turn server :

  "WebRtcEndpoint" : {
      "stunServerAddress" : "77.72.174.167",
      "stunServerPort" : 3478
      //"turnURL" : "kurento:kurento@<public-ip>:3478"
      // "pemCertificate" : "file"
    } 

but with this configuration, my console send me this error message : "Internal server error".

I have no idea what i can do know if i want to use kurento over the web from there.
If you need anything else in order to be able to help me resolving this problem, i would be happy to share it.

I hope you could help me fixing this, as I realy need to solve this.

Thank you so much for the attention you could spend with this case.

Best regards.



            

Inso

unread,
Oct 21, 2014, 8:41:59 AM10/21/14
to kur...@googlegroups.com
Absolutly no suggestion about my problem ?

My assumption is that everything works fine but the problem is that the UDP packages are blocked by my fire wall. That would be the reason why i have 0 error message in the KMS log or in the GUI console. The connection would work fine and the video stream is send but blocked by the rooter.

Am i right about this asumption or does it looks like a stupid possibility ?

If yes, do you have any solution about that ?

Thanks.

Best Regards.

Ivan Gracia

unread,
Oct 21, 2014, 9:02:14 AM10/21/14
to Kurento Public
Hi Inso,

That could be the case, yes. Do you have access to the router? Which ports are open?

Regards,

Ivan Gracia



--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Inso

unread,
Oct 21, 2014, 9:37:28 AM10/21/14
to kur...@googlegroups.com
Yes, it's my personnal network so i have the full access on the router.
First, the ports forwarded were the 80 to the Java Server and the 8888 to the KMS:8888.

Just for the test, i tried to forward every ports from 1023 to 65535 for the  UDP (cause i read in the doc that the udp port used for the webRTC connexion is choosed by the OS) to the KMS, but the same case happend (no error but the remote stream only just wait for the video Stream with the loading widget turning).

Shall i try something else on the router ? Do i need to change something in the conf (add a turn serv or something else ...) ? Did you ever tried to use the tutorial over a NAT. If yes, what is needed to make it work ?

Thank you so much for your attention, it would help me so much.

Inso

Inso

unread,
Oct 21, 2014, 1:41:24 PM10/21/14
to kur...@googlegroups.com
Just a point that come to my mind :

When i used the following parameters in the kurento.conf.json, i didnt forwarded the port 3478 of my router (note that all those lines are uncommented in my conf) :

"WebRtcEndpoint" : {
"stunServerAddress" : "77.72.174.167",
"stunServerPort" : 3478

"turnURL" : "kurento:kurento@<public-ip>:3478"

"pemCertificate" : "file"
}

With this configuration, my console send me this error message : "Internal server error".

1 - I believed I was using a remote turn server (i didnt installed any turn server). But i think the turnURL and pemCertificate should be commented and only use the stunServerAdress to use a remote stunServer. Am i right ?

2 - Moreover, I guess that if i wanted to use the turnURL, i should've installed the turn server as explained in your FAQ and forward ports "3478 & 49152 - 65535 UDP" to the @IP where the turn server is installed . Is that right too ?

3 - With the (supposed) wrong configuration above, is it normal that the console wrote : "Internat server error".

I know that my reflexion is quite ridiculous as i'm RLY new in all of those technologies, i'm trying to be the more explicite that i can, if my reasoning is too confusing, just tell me, i will try to reformule it more clearly.

Thanks

Inso

Ivan Gracia

unread,
Oct 21, 2014, 4:46:09 PM10/21/14
to kur...@googlegroups.com
I missed the part where the turnURL is uncommented, sorry! Indeed, you should either put a valid IP there, or just leave it commented out. I don't think you need a TURN server, so you can live just with the STUN config.

Open TCP ports 8888 and 3478 (apart from the ones you need to access your app), and all the UDP ports. That should work!
--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Ivan Gracia



Inso

unread,
Oct 21, 2014, 7:22:44 PM10/21/14
to kur...@googlegroups.com
Thanks for the answer.

Unfortunately, i changed my kurento.conf.json as you told me to do :

"WebRtcEndpoint" : {
      "stunServerAddress" : "77.72.174.167",
      "stunServerPort" : 3478
    }

But i got an "Internal Server Error" on the console when trying to click the "start" button.
My port 8888 and 3478 are forwarded on my KMS serv on the same ports (for the TCP). Moreover, i forwarded all my UDP from 1023 to 65535 to the KMS.

But here, my log file in /var/log/kurento-media-server/media-server.log is not clean this time. I got this error message :
(gst-plugin-scanner:3086): Clutter-CRITICAL **: Unable to initialize Clutter: Unable to open display. You have to set the DISPLAY environment variable, or use the --display command line argument

Any idea ?

Ivan Gracia

unread,
Oct 22, 2014, 3:46:17 AM10/22/14
to Kurento Public
You can ignore that error, it shouldn't affect you. It's from gstreamer telling you that it couldn't load a certain plugin. There's not much we can do about that.

About your setup, what tutorial flavour are you using, java or JS? It would help us if you could send us, in separated files, the full logs from KMS and, in case you are using the Java demo, the logs printed by Spring-Boot.

Ivan Gracia



Inso

unread,
Oct 22, 2014, 5:37:44 AM10/22/14
to kur...@googlegroups.com
I double checked this morning before answering, and i saw that by rebooting my router, the dhcp allowed an other IP to my KMS bridge. I changed the forwarding and it works ! So for that thank you so much ! Your help was REALY appreciated (and i needed it to work the faster the better !). I'm so gratefull !

Just an other little point, the quality is realy low during the first seconds of the call (between 10-30 secs). I know it's due to the algorithme who take the less BW possible and grown as much as possible. I would know if it is possible to up the initial BW taken in order to improve this or if any other option are possible to get a better quality during the first seconds (because actually, i always got a massive freeze during the 20 first second. That freeze last at least 5-6 secondes.

Last of all, is it possible to use a private stun server, or am i forced to use a public one (like "77.72.174.167").

Thank you so much for all the time you spend on my case !

Inso
media-server.log

Ivan Gracia

unread,
Oct 23, 2014, 5:18:04 AM10/23/14
to Kurento Public
Please find answers inline.

Cheers,
Ivan Gracia



On 22 October 2014 11:37, Inso <ouillo...@gmail.com> wrote:
I double checked this morning before answering, and i saw that by rebooting my router, the dhcp allowed an other IP to my KMS bridge. I changed the forwarding and it works ! So for that thank you so much ! Your help was REALY appreciated (and i needed it to work the faster the better !). I'm so gratefull !

Glad to hear! I'd suggest you set a fixed ip on your server, so you don't get this problem again.
 

Just an other little point, the quality is realy low during the first seconds of the call (between 10-30 secs). I know it's due to the algorithme who take the less BW possible and grown as much as possible. I would know if it is possible to up the initial BW taken in order to improve this or if any other option are possible to get a better quality during the first seconds (because actually, i always got a massive freeze during the 20 first second. That freeze last at least 5-6 secondes.

About setting an initial bandwidth in the RTCPerrConnection, there is an issue open in the WebRTC project. Looks like, for now, it's only possible to set the initial bandwidth in Chrome. Have a look at that thread, and keep an eye for what they cal the mid-term solution!
 

Last of all, is it possible to use a private stun server, or am i forced to use a public one (like "77.72.174.167").

Sure you can use your own STUN server. Actually, coturn is both a TURN and STUN server. You can find instructions on how to install coturn and configure Kurento here. You'll need to have a public IP for it though, since I suppose it wont help you with your NAT if you have both servers in the same network.
 

Thank you so much for all the time you spend on my case !

You are most welcome!

nav...@egnaroinc.com

unread,
May 8, 2018, 2:02:50 PM5/8/18
to kurento
Hi, I am facing similar kind of problem. I have a network that has public ip. I run two machines in the network, one for turn and java app and another for kurento-media-server. I ve forwarded turn port and kurento port in my router. I am not able to use the application over internet. 

Micael Gallego

unread,
May 8, 2018, 5:04:31 PM5/8/18
to kur...@googlegroups.com
What is your problem?

Remember that ideally, coturn should use all public UDP ports from. If you only forward a TCP port, the communications will have more latency and lower quality.

Best regards

Micael Gallego
Kurento / OpenVidu Project Lead

To unsubscribe from this group and stop receiving emails from it, send an email to kurento+unsubscribe@googlegroups.com.
To post to this group, send email to kur...@googlegroups.com.
Visit this group at https://groups.google.com/group/kurento.
To view this discussion on the web visit https://groups.google.com/d/msgid/kurento/ba8120e8-a4ce-4929-bf6c-ad82e71bc702%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages