Problem with the library Janus and janus-go and pion/webrtc

817 views
Skip to first unread message

PandP Benoit

unread,
Mar 4, 2021, 5:03:47 AM3/4/21
to meetecho-janus
Hello everyone, I opened a ticket in the examples in  pion/example-webrtc-applications  , I get stuck because I have errors on the janus server "[ERR] ice.c:janus_ice_outgoing_traffic_handle:4559] 4211376214532085] ... only sent -1 bytes? (was 800)".

My ticket to have more info and more log : https://github.com/pion/example-webrtc-applications/issues/91

It's probably badly configured, but I didn't find a solution to my problem on google, nor in the doc. 

Basically, I'm going to have my Go and my janus on the same server, so logically, I don't need ICE, but I don't know where to disable it. 


Mirko Brankovic

unread,
Mar 4, 2021, 6:20:18 AM3/4/21
to meetecho-janus
Janus is, most of the time WebRTC endpoint like most of the clients and in order to negotiate RTP endpoints you will need ICE protocol for that, there is no other way (except rtp_forward and plain RTP endpoint in AUdiobridge example).
So the IP in c=IN and port after m=audio 9 which is usually  port 9 (blackhole port) meaning all udp traffic will be ignored by the endpoint that advertised it.
So you need ICE candidates to tell the other side where their RTP needs to land and where to expect it from you.

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/meetecho-janus/380838e3-1e03-40b7-8609-80d81697eb85n%40googlegroups.com.


--
Regards,
Mirko

PandP Benoit

unread,
Mar 4, 2021, 6:27:37 AM3/4/21
to meetecho-janus
I understand all that, but then how to avoid the connection being cut off after one minute with an avalanche of ICE errors? 

In the Janus configuration file, there are no parameters, 
in the tickets of the webrtc library, someone solves problems with borringSSL, but I doubt that here it can help me. 

Mirko Brankovic

unread,
Mar 4, 2021, 8:03:18 AM3/4/21
to meetecho-janus
BorringSSL can give you freedom to set DTLS timeout to shorter periods than 1s (i think).
Giving more time to dtls negotiation or lowering mtu, since I know FS can do some NAT autodetection.

But bottom line you need to figure out if ICE candidates from both sides are reachable to each other FS <> Janus



--
Regards,
Mirko

PandP Benoit

unread,
Mar 4, 2021, 8:09:41 AM3/4/21
to meetecho-janus
The weird thing is that the connection is established, and when I make a call, I get audio in both directions. 
I have the same problem with the ./test_gstreamer_1.sh, without FS, after a minute, I get the same problem. 

 I'm going to do my tests later on the janus config. 

PandP Benoit

unread,
Mar 5, 2021, 3:37:58 AM3/5/21
to meetecho-janus
to make it simple, is it possible to correct the problem below ? or at least, what can cause this problem ?

Make a call > got audio and video and then, after lot of error : 

[Fri Mar  5 09:27:17 2021] [1247062941519830] DTLS already set up, disabling retransmission timer!
[Fri Mar  5 09:27:17 2021] Video SSRC changed, 0 --> 807987615
[Fri Mar  5 09:27:17 2021] [1247062941519830] Retransmissions will have payload type 101
[Fri Mar  5 09:27:18 2021] In link quality=0, media link quality=0
[....]
[Fri Mar  5 09:28:09 2021] [ERR] [ice.c:janus_ice_outgoing_traffic_handle:4559] [1247062941519830] ... only sent -1 bytes? (was 84)
[same error 414 times]
[Fri Mar  5 09:28:14 2021] [ERR] [ice.c:janus_ice_outgoing_traffic_handle:4559] [1247062941519830] ... only sent -1 bytes? (was 84)
[Fri Mar  5 09:28:14 2021] [ERR] [ice.c:janus_ice_check_failed:1829] [1247062941519830] ICE failed for component 1 in stream 1...
[Fri Mar  5 09:28:14 2021] [1247062941519830] Hanging up PeerConnection because of a ICE failed
[Fri Mar  5 09:28:14 2021] janus_dtls_bio_agent_write: 0x7f71dc014940, 39
[Fri Mar  5 09:28:14 2021] [ERR] [dtls-bio.c:janus_dtls_bio_agent_write:157] [1247062941519830] Error sending DTLS message on component 1 of stream 1 (-1)

and then close the connexion. 

Lorenzo Miniero

unread,
Mar 5, 2021, 3:54:49 AM3/5/21
to meetecho-janus
You can't disable ICE: WebRTC uses it at its foundation.
No idea on why you're getting the failures, you should check which pair was selected and maybe have a look at the traffic with wireshark.

L.

PandP Benoit

unread,
Mar 5, 2021, 4:14:37 AM3/5/21
to meetecho-janus
Ok, thanks for the info and the answer, anyway, I opened a ticket in the lib pion/webrtc, if it works with them, they will close the ticket, if not, maybe it's a problem of the library or the lib janus-go.

Is there a default stun/turn server in janus ?
I didn't see anything like that in the configuration, but it might be more hiding. 

Lorenzo Miniero

unread,
Mar 5, 2021, 4:23:30 AM3/5/21
to meetecho-janus
You won't need STUN or TURN in Janus itself, especially if it's all local.

L.

PandP Benoit

unread,
Mar 9, 2021, 3:39:09 AM3/9/21
to meetecho-janus
Yes I suspected that the stun was not necessary, but I wonder why Janus gets out of ICE problems after 55 seconds. 
So, I'll try to see if it's a Go (janus-go) library problem, or maybe a pion/webrtc library problem (but this is another level for debugging, I can't do it alone x) ).

Alessandro Toppi

unread,
Mar 12, 2021, 6:00:11 AM3/12/21
to meetecho-janus
Any chance you are using libnice master? Stick to v0.1.18 because the latest one has been plagued with a similar issue.

PandP Benoit

unread,
Mar 12, 2021, 9:55:49 AM3/12/21
to meetecho-janus
yes of course I took the last version, which is installed with pyhtons tools, I suspected that there could be a problem. I will try to use an older version, and test

PandP Benoit

unread,
Mar 12, 2021, 11:35:13 AM3/12/21
to meetecho-janus
I just did some tests, I have exactly the same phenomenon. Disconnection after one minute. 
To test (because I am not convinced of what I did):

I deleted the lib /usr/lib/x86_64-linux-gnu/libnice.so, then I installed libnice-0.1.16 and did my tests. 

Maybe I had to re-install or re-configure janus? 

PandP Benoit

unread,
Mar 18, 2021, 10:02:40 AM3/18/21
to meetecho-janus
ok, I did my tests and my research, indeed, apparently, there is a problem with the master branch (CF:   #2541)
I try to make a new install with libnice 0.1.18 and then, i get too much error. like : 
 GLib-GObject-CRITICAL **: 14:50:25.902: g_object_new_is_valid_property: object class 'NiceAgent' has no property named 'nomination-mode'

And crash 

I'll try with older version of janus, I just want to use the sip gateway. 

PandP Benoit

unread,
Mar 18, 2021, 10:55:22 AM3/18/21
to meetecho-janus
Fine, the problem is solved with janus-gateway v0.10.10 
and libnice v0.1.18

But when i end the call, it's crash with : ./janus: symbol lookup error: ./janus: undefined symbol: nice_agent_close_async


So it's moving forward. It might be necessary to specify in the README to use the specific versions and not the master branch (for janus-gateway and for libnice (it is to specify to take the master branch))

PandP Benoit

unread,
Mar 18, 2021, 11:26:09 AM3/18/21
to meetecho-janus
Last problem fixed with janus-gateway v0.10.9

Thanks All ! 
Reply all
Reply to author
Forward
0 new messages