<div dir="ltr">Hi,<div><br></div><div>apparently when libnice is configured to gather TCP candidates the TCP servers allocated for the purpose are never closed. If I enable ICE-TCP support in Janus (<a href="https://github.com/meetecho/janus-gateway/">https://github.com/meetecho/janus-gateway/</a>), when I create a session I can see the TCP servers listening, but they never go away even after the agent has been destroyed.</div><div><br></div><div>To reproduce, just launch Janus, verify it's currently only listening on the signalling ports:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.9px;padding:0px;margin:0px;border-radius:3px;border:0px;display:inline;max-width:initial;overflow:initial;line-height:inherit;word-wrap:normal;background:transparent">sudo netstat -tulpn | grep janus | grep tcp
tcp        0      0 <a href="http://0.0.0.0:8188">0.0.0.0:8188</a>            0.0.0.0:*               LISTEN      14451/./janus       
tcp        0      0 <a href="http://0.0.0.0:7088">0.0.0.0:7088</a>            0.0.0.0:*               LISTEN      14451/./janus       
tcp        0      0 <a href="http://0.0.0.0:8088">0.0.0.0:8088</a>            0.0.0.0:*               LISTEN      14451/./janus</code></pre></div></blockquote></div><div><br></div><div>Start the echo test, which will gather a TCP candidate as well (just one because the echotest answers, and so knows bundle+rtcpmux are supported; four servers are leaked instead when it's Janus offering, as you have RTP+RTCP audio and RTP+RTCP video):</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.9px;padding:0px;margin:0px;border-radius:3px;border:0px;display:inline;max-width:initial;overflow:initial;line-height:inherit;word-wrap:normal;background:transparent">sudo netstat -tulpn | grep janus | grep tcp
tcp        0      0 <a href="http://0.0.0.0:8188">0.0.0.0:8188</a>            0.0.0.0:*               LISTEN      14451/./janus       
tcp        0      0 <a href="http://0.0.0.0:7088">0.0.0.0:7088</a>            0.0.0.0:*               LISTEN      14451/./janus       
tcp        0      0 <a href="http://192.168.0.12:33523">192.168.0.12:33523</a>      0.0.0.0:*               LISTEN      14451/./janus       
tcp        0      0 <a href="http://0.0.0.0:8088">0.0.0.0:8088</a>            0.0.0.0:*               LISTEN      14451/./janus</code></pre></div></blockquote></div><div><br></div><div>Close the echotest demo, wait for the WebRTC resources to be freed in Janus, and check again to see the server is still there listening, despite the fact the agent (and so all of its streams and components) is gone:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.9px;padding:0px;margin:0px;border-radius:3px;border:0px;display:inline;max-width:initial;overflow:initial;line-height:inherit;word-wrap:normal;background:transparent">sudo netstat -tulpn | grep janus | grep tcp
tcp        0      0 <a href="http://0.0.0.0:8188">0.0.0.0:8188</a>            0.0.0.0:*               LISTEN      14451/./janus       
tcp        0      0 <a href="http://0.0.0.0:7088">0.0.0.0:7088</a>            0.0.0.0:*               LISTEN      14451/./janus       
tcp        0      0 <a href="http://192.168.0.12:33523">192.168.0.12:33523</a>      0.0.0.0:*               LISTEN      14451/./janus       
tcp        0      0 <a href="http://0.0.0.0:8088">0.0.0.0:8088</a>            0.0.0.0:*               LISTEN      14451/./janus</code></pre></div></blockquote></div><div><br></div><div>What could be the cause? Any further info I can provide to debug this?</div><div><br></div><div>This is definitely happening to me on my Fedora 22 (libnice 0.1.13 from repo), but it's happening to some other users as well (not sure about the libnice version there, but definitely one with ICE-TCP support).</div><div><br></div><div>Thanks,</div><div>Lorenzo</div></div>