WHIP; ICE stuck at gathering

260 views
Skip to first unread message

Tobias Hnyk

unread,
Jun 12, 2022, 5:57:24 AM6/12/22
to meetecho-janus
Hello,

I am currently working on my thesis and am trying to get Janus, in combination with the simple whip client and server, to work in aws. Just a simple demo with no load balancers or other fancy stuff. 
The Janus demo (specifically the video room set up with a reverse proxy) is working as intended for me and other people as well. 

A local test of the Janus demo and whip client/server worked fine.

I added the simple whip server to the same machine the Janus backend is running on. They can connect and the Janus logs show a new session upon starting the whip server.

Starting the whip client, whip server logs show publishing to whip endpoint (whip server endpoints information), Janus logs a new handle is created and also: 
Creating ICE agent (ICE Full mode, controlled)

Now to the not working part:
The whip client stops after logging: [WHIP] ICE gathering completed
The admin api for the handle shows that the webrtc ice state is "gathering" and dtls state is "created".

From what I make of that, it means, that the client cannot connect to Janus to send the gathered ice candidates.

What I do not get is why. The client runs on the same device I tested the connection to the video room with. Which would limit the error source to the whip connection process with aws. I have been looking at this for some days and couldn't figure it out.

What I did to try and fix it:
This seems somewhat similar to: Janus WHIP, ICE not completed (never provided a solution), so I tested various combinations of STUN and TURN servers with the whip client, whip server and Janus. None of that with the Janus videoroom working in the browser (same device as whip client) changed anything. 
The udp range in janus.jcfg is set to the same values allowed in the aws security specification and even testing with all inbound traffic enabled changed nothing.

I am new to webRTC and Janus. Maybe someone here knows what is wrong or how I can figure out more. For further, more detailed logs that might help don't hesitate to ask. 

Best regards,
Tobi

Alessandro Toppi

unread,
Jun 13, 2022, 7:30:56 AM6/13/22
to meetecho-janus
What other data does the admin api contain ? Can you see the remote (client) candidates ?

Tobias Hnyk

unread,
Jun 13, 2022, 12:04:39 PM6/13/22
to meetecho-janus
Hey, thanks for the fast answer and please excuse the two messages I accidentally created instead of this one with the reply the author function. Here is basically the same text:

Here is the data of the admin api handle and there are no remote client candidates.

However the Janus server interface tcpdump shows packets beeing sent and recieved by the whip client device interface.

(whip client public IPv4).33676 > 10.0.15.155.443

For reference here are the nginx reverse proxy config and aws security config.

Lorenzo Miniero

unread,
Jun 14, 2022, 3:22:19 AM6/14/22
to meetecho-janus
443 is signalling, not media.

Your problem is that the remote SDP doesn't contain any media, and so no candidate either, meaning it's a session that died before it started. You're likely not configuring the pipeline to send audio/video correctly in the WHIP client. Use the examples from the WHIP client README, where test devices are used, to make sure the setup is correct.

L.

Alessandro Toppi

unread,
Jun 14, 2022, 6:20:59 AM6/14/22
to meetecho-janus
Also from your admin API

"local-candidates": [
    "1 1 udp 2013266431 (AWS elastic IPv4 of signaling server) 44996 typ host",
    "2 1 udp 1677722111 (AWS elastic IPv4 of signaling server) 44996 typ srflx raddr 10.0.15.155 rport 44996",
    "3 1 udp 503316991 (turn IPv4) 58668 typ relay raddr 10.0.15.155 rport 44996"
],

it seems that you have enabled STUN an TURN in janus.
The latter is rarely needed (don't get confused, this is TURN on server side, not on client side), while the former can also be avoided by setting the option nat_1_1_mapping in janus.jcfg to the public IP of your AWS instance.
This will greatly improve setup times.

Tobias Hnyk

unread,
Jun 14, 2022, 12:30:41 PM6/14/22
to meetecho-janus
Right, my bad. Media would be the specified UDP port range.

Alright, I revisited the whip articles, checked my configurations again and turns out I had full trickle enabled.
No candidates in the SDP should have been a dead giveaway.

It works perfectly now.
Thanks a lot for the help you provide here :)

Reply all
Reply to author
Forward
0 new messages