Failing to establish WebRTC stream over Tailscale interface

I am trying to debug an issue with PiKVM, which streams video from an HDMI capture card to a web browser. It uses Janus 0.14.3 to establish a WebRTC stream between the server and client.

I am able to connect to the WebRTC stream over the LAN, but when I introduce a Tailscale VPN connection, the stream fails. Yet, the two devices can communicate over any TCP or UDP port over this VPN without issue, so I expect the stream to work via direct connection.

Instead I get server-side log messages like:

Creating ICE agent (ICE Full mode, controlling)
[WARN] ICE failed for component 1 in stream 1, but let's give it some time... (trickle received, answer received, alert not set)
[ERR] [ice.c:janus_ice_check_failed:2022] ICE failed for component 1 in stream 1...

I am not sure why the ICE negotiation is not simply making the direct connection over the VPN interface.

My janus.jcfg configuration looks like:

general: {
	debug_level = 4
}
nat: {
	nice_debug = false
	ignore_mdns = true
}
media: {
	ipv6 = true
	ipv6_linklocal = true
	min_nack_queue = 2000
	rtp_port_range = "20000-40000"
	no_media_timer = 0
	slowlink_threshold = 10
	twcc_period = 100
	dtls_timeout = 1000
	nack_optimizations = true
}

I have tried disabling IPv6, and setting general.interface to my Tailscale interface’s IP address; neither of those things worked.

You should use the Admin API to see which candidates were exchanged, as those would be the attempts both parties would make checks from/to.

1 Like