Janus WHIP, ICE not completed

359 views
Skip to first unread message

Sayan Bhattacharya

unread,
May 24, 2021, 8:49:04 AM5/24/21
to meetecho-janus
We are having trouble with our WHIP implementation. When streaming from OBS-WebRTC using WHIP to Janus, the initial connection appears to be established as OBS-WebRTC shows a green box and the ‘start streaming’ button changes from ‘connecting’ to ‘stop streaming’, but the kbps in the bottom right corner of OBS stays at 0 and after a few seconds it shows two error messages. So it doesn’t seem like the stream is actually being sent.

We suspect the most likely issue is related to libnice / prflx as mentioned in Lorenzo’s blog post (https://www.meetecho.com/blog/whip-janus/) but we are not sure how to solve it. 

The OBS-WebRTC error messages and log are attached. 

Current WHIP implementation:-

1. The sdp from OBS-WebRTC is received through a POST api.
2. -> Create a new Janus session 
   -> Attach VideoRoom plugin 
   -> Publish to Videoroom 
   -> Configure and send the SDP offer to Janus
All the steps are achieved through Janus HTTP API and long polling.
3. Get the SDP answer from Janus and return it to OBS-WebRTC with a 202 status.

Errors:-
The OBS-WebRTC starts streaming for some time then prompts connection failure. Though it starts streaming the stream is probably not being sent as the data transfer speed never changes from 0 kbps.

Logs:-
In the logs "Ice not completed yet for this channel as Ne[en0:192.168.1.x/24:Unknown:id=1] has more than 1 connection." We suspect the issue must be something regarding the ICE fail. Another interesting observation is there are no ICE candidates in the SDP offer of OBS-WebRTC.

"A socket operation was attempted to an unreachable network." 
Another probably important discovery from the logs will be the above line. 

Thanks for any help. 
Screenshot 2021-05-24 at 12.52.22.png

Alessandro Toppi

unread,
May 25, 2021, 11:29:33 AM5/25/21
to meetecho-janus
I have no experience with OBS-WebRTC, however I can say that having no candidates in the offer from the OBS publisher is not an issue in WHIP.
WHIP client can send an offer w/o candidates and WHIP server replies with an SDP answer with all reachable public candidates.

Sayan Bhattacharya

unread,
May 26, 2021, 10:32:20 AM5/26/21
to meetecho-janus

Thanks for the info. 
Still not able to figure what's causing the issue then. Had a look with the Janus Admin API seems like Janus is stuck with ICE state "gathering" and DTLS state is stuck on "created". Any idea why this is the case?

janus_admin.png

Alessandro Toppi

unread,
May 27, 2021, 5:45:10 AM5/27/21
to meetecho-janus
The local ICE agent never reached "connecting" state.
Minimize the interfaces that Janus will consider to gather candidates and try to exclude STUN and TURN servers in janus jcfg.

Sayan Bhattacharya

unread,
May 28, 2021, 4:25:34 AM5/28/21
to meetecho-janus
I removed the stun configurations of the Janus jcfg. Now I am getting ICE "disconnected" state. I am using the Canyanio Docker image of Janus, https://gist.github.com/Thunder80/36c7463285890c61b878543d5108dbab do I need to open any other ports?

Alessandro Toppi

unread,
May 28, 2021, 6:47:26 AM5/28/21
to meetecho-janus
10000-10200 udp range is being exposed by the container (without mapping any host port). Check that same range is being specified in janus.jcfg.
Then, are you sure that the host machine can be reached by the clients through UDP? TCP is just for signalling, and that seems to work. 

Reply all
Reply to author
Forward
0 new messages