basic_port_allocator.cc(965)] Discarding candidate because it doesn't match filter.

199 views
Skip to first unread message

Alexander Hudich

unread,
Oct 24, 2021, 8:09:23 AM10/24/21
to discuss-webrtc
Hi,

I am trying to figure out the problem i stumbled upon recently. 
We make video streaming software and recently implemented WebRTC over TCP feature for low latency streaming for one of our customers. But they came back to us telling that this feature doesn't work anymore. So I'm looking into it. 

We running some websocket signalling process and a TURN server.  Then we signalling to a web browser parameters of TURN service, preparing sdp without udp:

....
m=video 9 TCP/TLS/RTP/SAVPF 126

a=rtcp:9 IN IP4 0.0.0.0

....

and then we create peer candidates using such call:

this.createPeerConnection({ iceServers: [ { urls: [turn:${addr}:${port}?transport=tcp], username: user, credential: pass, }, ], });


So as a result we have established connection and see running video in Safari and failed attempt of connection in the Chrome browser. 

Investigating it I see that Chrome discard tcp candidates like this:

[7387:50691:1019/185704.950439:INFO:basic_port_allocator.cc(954)] Port[8058600:video_t1:1:0:local:Net[any:0.0.0.x/0:Wildcard:id=0]]: Port ready.

[7387:50691:1019/185704.950460:INFO:p2p_transport_channel.cc(945)] Port[8058600:video_t1:1:0:local:Net[any:0.0.0.x/0:Wildcard:id=0]]: SetOption(1, 262144) failed: 0

[7387:50691:1019/185704.950479:INFO:p2p_transport_channel.cc(945)] Port[8058600:video_t1:1:0:local:Net[any:0.0.0.x/0:Wildcard:id=0]]: SetOption(2, 65536) failed: 0

[7387:50691:1019/185704.950516:INFO:p2p_transport_channel.cc(945)] Port[8058600:video_t1:1:0:local:Net[any:0.0.0.x/0:Wildcard:id=0]]: SetOption(5, 0) failed: 0

|C--I|-|0|0|9079290933572287998|-]: UpdateState(), ms since last received response=92548871, ms since last received data=92548871, rtt=6000, pings_since_last_response=50706566575876374d384a62

[7387:50691:1019/185704.950587:VERBOSE1:basic_ice_controller.cc(541)] Sorting 1 available connections

[7387:50691:1019/185704.950626:VERBOSE1:basic_ice_controller.cc(544)] Conn[ff049000:video_t1:Net[any:0.0.0.x/0:Wildcard:id=0]:7PwvTASQ:1:0:local:udp:7c0264f6-6cd7-41d1-9e3c-4e29215de54c.local:53284->zjWZlbAe:1:2113937151:local:udp:95.216.1

65.x:34121|C--I|-|0|0|9079290933572287998|-]

[7387:50691:1019/185704.950663:INFO:basic_port_allocator.cc(965)] Discarding candidate because it doesn't match filter.

[7387:50691:1019/185704.950684:INFO:basic_port_allocator.cc(1065)] Port[8058600:video_t1:1:0:local:Net[any:0.0.0.x/0:Wildcard:id=0]]: Port completed gathering candidates.


but Safari just not having that filter for Any (0.0.0.0) addresses keeps those candidates:

{"type":"candidate","stream_id":"local1","label":0,"id":"video_t1","candidate":{"candidate":"candidate:3071670637 1 tcp 1518280447 52488dcd-cd58-483f-8962-c36be75e2a70.local 9 typ host tcptype active generation 0 ufrag cM5h network-id 1 network-cost 50","sdpMLineIndex":0,"sdpMid":"video_t1","usernameFragment":null}} 1634675408.8540118

Also I checked WebRTC samples using this two browsers and the result you can see in the attached image. 
Screenshot 2021-10-19 at 15.57.03.jpg

So the question is "Could this behaviour of the Chrome browser be considered as a bug?". Or maybe there is another reason for such result?

Thanks.

Alexander Hudich

unread,
Oct 27, 2021, 6:24:19 AM10/27/21
to discuss-webrtc
Also I've managed to find a Windows PC with a Chrome  browser that gathers all ports addresses instead of using 0.0.0.0

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(372)] Start getting ports with turn_port_prune_policy 0

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(857)] Network manager has started

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(768)] Allocate ports on 4 networks

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(1361)] Net[{2BFABE2C-940E-4C04-BC1B-AF6160EE928E}:169.254.0.x/16:Ethernet:id=1]: Allocation Phase=Udp

[11428:20332:1019/191611.286:INFO:port.cc(178)] Port[167800::1:0:local:Net[{2BFABE2C-940E-4C04-BC1B-AF6160EE928E}:169.254.0.x/16:Ethernet:id=1]]: Port created with network cost 0

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(881)] Adding allocated port for video_t1

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(903)] Port[167800:video_t1:1:0:local:Net[{2BFABE2C-940E-4C04-BC1B-AF6160EE928E}:169.254.0.x/16:Ethernet:id=1]]: Added port to allocator

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(1361)] Net[{B6BA115D-58FD-45FF-AF3D-8E52B0F1F68B}:192.168.234.x/24:Ethernet:id=2]: Allocation Phase=Udp

[11428:20332:1019/191611.286:INFO:port.cc(178)] Port[16b400::1:0:local:Net[{B6BA115D-58FD-45FF-AF3D-8E52B0F1F68B}:192.168.234.x/24:Ethernet:id=2]]: Port created with network cost 0

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(881)] Adding allocated port for video_t1         

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(903)] Port[16b400:video_t1:1:0:local:Net[{B6BA115D-58FD-45FF-AF3D-8E52B0F1F68B}:192.168.234.x/24:Ethernet:id=2]]: Added port to allocator

[21048:19788:1019/191611.286:INFO:CONSOLE(16)] "Player::signaling state stable [object Event]", source: https://front-ci.erlyvideo.ru/dist/webrtc-player/master/21.10.2-0-g0cd9b33/main.js (16)

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(1361)] Net[{D712722F-C424-4DD7-9390-FCBDC36C2CF1}:192.168.31.x/24:Ethernet:id=3]: Allocation Phase=Udp

[11428:20332:1019/191611.286:INFO:port.cc(178)] Port[16ae00::1:0:local:Net[{D712722F-C424-4DD7-9390-FCBDC36C2CF1}:192.168.31.x/24:Ethernet:id=3]]: Port created with network cost 0

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(881)] Adding allocated port for video_t1

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(903)] Port[16ae00:video_t1:1:0:local:Net[{D712722F-C424-4DD7-9390-FCBDC36C2CF1}:192.168.31.x/24:Ethernet:id=3]]: Added port to allocator

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(1361)] Net[{DDBCA35B-AA5E-419D-9647-C679298F9018}:192.168.68.x/24:Ethernet:id=4]: Allocation Phase=Udp

[11428:20332:1019/191611.286:INFO:port.cc(178)] Port[16ba00::1:0:local:Net[{DDBCA35B-AA5E-419D-9647-C679298F9018}:192.168.68.x/24:Ethernet:id=4]]: Port created with network cost 0

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(881)] Adding allocated port for video_t1

[11428:20332:1019/191611.286:INFO:basic_port_allocator.cc(903)] Port[16ba00:video_t1:1:0:local:Net[{DDBCA35B-AA5E-419D-9647-C679298F9018}:192.168.68.x/24:Ethernet:id=4]]: Added port to allocator


So on this PC Chrome was able to prepare and use tcp candidate without filtration:

[11428:20332:1019/191611.388:INFO:basic_port_allocator.cc(921)] Port[87d200:video_t1:1:0:local:Net[{2BFABE2C-940E-4C04-BC1B-AF6160EE928E}:169.254.0.x/16:Ethernet:id=1]]: Gathered candidate: Cand[:1068536267:1:tcp:1518280447:169.254.216.x:9:local::0:UwG7:GeNQF3gNtRYuCgzN53UpX5NL:1:0:0]


But I've not found why this PC behave that way. All my Mac's and Windows and Linux Chrome instances worked only with 0.0.0.0 ports addresses.
Reply all
Reply to author
Forward
0 new messages