2016-04-14 77 views
0

我下載了ice4j,並試圖在互聯網上的兩臺機器上分配一個例子(https://github.com/jitsi/ice4j/blob/master/src/test/java/test/IceDistributed.java)。 如果我在局域網中的兩臺不同的機器上運行這個例子,這個例子可以工作,但不知何故它不能在互聯網上工作。互聯網上的ice4j連接

下面是日誌

=================== feed the following to the remote agent =================== 
v=0 
o=ice4j.org 0 0 IN null null 
s=- 
t=0 0 
a=ice-options:trickle 
a=ice-ufrag:65v2u1agade6hl 
a=ice-pwd:5vlei70a43movu2t77fkhpqfa3 
m=audio 49249 RTP/AVP 0 
c=IN 125.19.34.60 IP4 
a=mid:audio 
a=candidate:1 1 udp 2130706431 10.64.16.51 2020 typ host 
a=candidate:2 1 udp 2130706431 fe80:0:0:0:50e7:235d:e94a:9977 2020 typ host 
a=candidate:4 1 udp 2113937151 fe80:0:0:0:c9d0:ed0d:557e:68af 2020 typ host 
a=candidate:6 1 udp 2113937151 fe80:0:0:0:c811:49cc:8301:b637 2020 typ host 
a=candidate:3 1 udp 2113932031 192.168.88.1 2020 typ host 
a=candidate:5 1 udp 2113932031 192.168.31.1 2020 typ host 
a=candidate:7 1 udp 1677724415 125.19.34.60 49249 typ srflx raddr 10.64.16.51 rport 2020 
a=candidate:1 2 udp 2130706430 10.64.16.51 2021 typ host 
a=candidate:2 2 udp 2130706430 fe80:0:0:0:50e7:235d:e94a:9977 2021 typ host 
a=candidate:4 2 udp 2113937150 fe80:0:0:0:c9d0:ed0d:557e:68af 2021 typ host 
a=candidate:6 2 udp 2113937150 fe80:0:0:0:c811:49cc:8301:b637 2021 typ host 
a=candidate:3 2 udp 2113932030 192.168.88.1 2021 typ host 
a=candidate:5 2 udp 2113932030 192.168.31.1 2021 typ host 
a=candidate:7 2 udp 1677724414 125.19.34.60 49259 typ srflx raddr 10.64.16.51 rport 2021 
a=rtcp:49259 
m=video 49261 RTP/AVP 0 
c=IN 125.19.34.60 IP4 
a=mid:video 
a=candidate:1 1 udp 2130706431 10.64.16.51 2022 typ host 
a=candidate:2 1 udp 2130706431 fe80:0:0:0:50e7:235d:e94a:9977 2022 typ host 
a=candidate:4 1 udp 2113937151 fe80:0:0:0:c9d0:ed0d:557e:68af 2022 typ host 
a=candidate:6 1 udp 2113937151 fe80:0:0:0:c811:49cc:8301:b637 2022 typ host 
a=candidate:3 1 udp 2113932031 192.168.88.1 2022 typ host 
a=candidate:5 1 udp 2113932031 192.168.31.1 2022 typ host 
a=candidate:7 1 udp 1677724415 125.19.34.60 49261 typ srflx raddr 10.64.16.51 rport 2022 
a=candidate:1 2 udp 2130706430 10.64.16.51 2023 typ host 
a=candidate:2 2 udp 2130706430 fe80:0:0:0:50e7:235d:e94a:9977 2023 typ host 
a=candidate:4 2 udp 2113937150 fe80:0:0:0:c9d0:ed0d:557e:68af 2023 typ host 
a=candidate:6 2 udp 2113937150 fe80:0:0:0:c811:49cc:8301:b637 2023 typ host 
a=candidate:3 2 udp 2113932030 192.168.88.1 2023 typ host 
a=candidate:5 2 udp 2113932030 192.168.31.1 2023 typ host 
a=candidate:7 2 udp 1677724414 125.19.34.60 49267 typ srflx raddr 10.64.16.51 rport 2023 
a=rtcp:49267 

============================================================================== 

Paste remote SDP here. Enter an empty line to proceed: 
(we don't mind the [java] prefix in SDP intput) 
v=0 
o=ice4j.org 0 0 IN null null 
s=- 
t=0 0 
a=ice-options:trickle 
a=ice-ufrag:3u54r1agac2sf4 
a=ice-pwd:6u1paracg9t86itirv30mk6fvg 
m=audio 2020 RTP/AVP 0 
c=IN 111.93.62.26 IP4 
a=mid:audio 
a=candidate:1 1 udp 2130706431 192.168.10.151 2020 typ host 
a=candidate:2 1 udp 2130706431 fe80:0:0:0:7521:ed11:4f2b:c6fb 2020 typ host 
a=candidate:3 1 udp 1677724415 111.93.62.26 2020 typ srflx raddr 192.168.10.151 
rport 2020 
a=candidate:1 2 udp 2130706430 192.168.10.151 2021 typ host 
a=candidate:2 2 udp 2130706430 fe80:0:0:0:7521:ed11:4f2b:c6fb 2021 typ host 
a=candidate:3 2 udp 1677724414 111.93.62.26 2021 typ srflx raddr 192.168.10.151 
rport 2021 
m=video 2022 RTP/AVP 0 
c=IN 111.93.62.26 IP4 
a=mid:video 
a=candidate:1 1 udp 2130706431 192.168.10.151 2022 typ host 
a=candidate:2 1 udp 2130706431 fe80:0:0:0:7521:ed11:4f2b:c6fb 2022 typ host 
a=candidate:3 1 udp 1677724415 111.93.62.26 2022 typ srflx raddr 192.168.10.151 
rport 2022 
a=candidate:1 2 udp 2130706430 192.168.10.151 2023 typ host 
a=candidate:2 2 udp 2130706430 fe80:0:0:0:7521:ed11:4f2b:c6fb 2023 typ host 
a=candidate:3 2 udp 1677724414 111.93.62.26 2023 typ srflx raddr 192.168.10.151 
rport 2023 

Apr 14, 2016 6:33:32 PM org.ice4j.ice.Component addRemoteCandidate 
INFO: Add remote candidate for audio.RTP: 192.168.10.151:2020/udp/host 
Apr 14, 2016 6:33:32 PM org.ice4j.ice.Component addRemoteCandidate 
INFO: Add remote candidate for audio.RTP: [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2020/udp/host 
Apr 14, 2016 6:33:32 PM org.ice4j.ice.Component addRemoteCandidate 
INFO: Add remote candidate for audio.RTP: 111.93.62.26:2020/udp/srflx 
Apr 14, 2016 6:33:32 PM org.ice4j.ice.Component addRemoteCandidate 
INFO: Add remote candidate for audio.RTCP: 192.168.10.151:2021/udp/host 
Apr 14, 2016 6:33:32 PM org.ice4j.ice.Component addRemoteCandidate 
INFO: Add remote candidate for audio.RTCP: [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2021/udp/host 
Apr 14, 2016 6:33:32 PM org.ice4j.ice.Component addRemoteCandidate 
INFO: Add remote candidate for audio.RTCP: 111.93.62.26:2021/udp/srflx 
Apr 14, 2016 6:33:35 PM org.ice4j.ice.Component addRemoteCandidate 
INFO: Add remote candidate for video.RTP: 192.168.10.151:2022/udp/host 
Apr 14, 2016 6:33:35 PM org.ice4j.ice.Component addRemoteCandidate 
INFO: Add remote candidate for video.RTP: [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2022/udp/host 
Apr 14, 2016 6:33:35 PM org.ice4j.ice.Component addRemoteCandidate 
INFO: Add remote candidate for video.RTP: 111.93.62.26:2022/udp/srflx 
Apr 14, 2016 6:33:35 PM org.ice4j.ice.Component addRemoteCandidate 
INFO: Add remote candidate for video.RTCP: 192.168.10.151:2023/udp/host 
Apr 14, 2016 6:33:35 PM org.ice4j.ice.Component addRemoteCandidate 
INFO: Add remote candidate for video.RTCP: [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2023/udp/host 
Apr 14, 2016 6:33:35 PM org.ice4j.ice.Component addRemoteCandidate 
INFO: Add remote candidate for video.RTCP: 111.93.62.26:2023/udp/srflx 
Apr 14, 2016 6:33:35 PM org.ice4j.ice.Agent startConnectivityEstablishment 
INFO: Start ICE connectivity establishment 
Apr 14, 2016 6:33:35 PM org.ice4j.ice.Agent initCheckLists 
INFO: Init checklist for stream audio 
Apr 14, 2016 6:33:35 PM org.ice4j.ice.Agent initCheckLists 
INFO: Init checklist for stream video 
Apr 14, 2016 6:33:35 PM org.ice4j.ice.Agent setState 
INFO: ICE state changed from Waiting to Running 
Apr 14, 2016 6:33:35 PM com.ice4j.test.IceDemoPropertyChangeListener propertyChange 
INFO: Agent entered the Running state. 
Apr 14, 2016 6:33:35 PM org.ice4j.ice.ConnectivityCheckClient startChecks 
INFO: Start connectivity checks! 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 10.64.16.51:2020/udp/host -> 192.168.10.151:2020/udp/host (audio.RTP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: [fe80:0:0:0:50e7:235d:e94a:9977]:2020/udp/host -> [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2020/udp/host (audio.RTP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: [fe80:0:0:0:c9d0:ed0d:557e:68af]:2020/udp/host -> [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2020/udp/host (audio.RTP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: [fe80:0:0:0:c811:49cc:8301:b637]:2020/udp/host -> [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2020/udp/host (audio.RTP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.88.1:2020/udp/host -> 192.168.10.151:2020/udp/host (audio.RTP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.31.1:2020/udp/host -> 192.168.10.151:2020/udp/host (audio.RTP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 10.64.16.51:2020/udp/host -> 111.93.62.26:2020/udp/srflx (audio.RTP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.88.1:2020/udp/host -> 111.93.62.26:2020/udp/srflx (audio.RTP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.31.1:2020/udp/host -> 111.93.62.26:2020/udp/srflx (audio.RTP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 10.64.16.51:2021/udp/host -> 192.168.10.151:2021/udp/host (audio.RTCP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: [fe80:0:0:0:50e7:235d:e94a:9977]:2021/udp/host -> [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2021/udp/host (audio.RTCP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: [fe80:0:0:0:c9d0:ed0d:557e:68af]:2021/udp/host -> [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2021/udp/host (audio.RTCP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: [fe80:0:0:0:c811:49cc:8301:b637]:2021/udp/host -> [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2021/udp/host (audio.RTCP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.88.1:2021/udp/host -> 192.168.10.151:2021/udp/host (audio.RTCP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.31.1:2021/udp/host -> 192.168.10.151:2021/udp/host (audio.RTCP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 10.64.16.51:2021/udp/host -> 111.93.62.26:2021/udp/srflx (audio.RTCP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.88.1:2021/udp/host -> 111.93.62.26:2021/udp/srflx (audio.RTCP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.31.1:2021/udp/host -> 111.93.62.26:2021/udp/srflx (audio.RTCP), failing. 
Apr 14, 2016 6:33:36 PM org.ice4j.ice.ConnectivityCheckClient updateCheckListAndTimerStates 
INFO: CheckList will failed in a few seconds if nosucceeded checks come 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 10.64.16.51:2022/udp/host -> 192.168.10.151:2022/udp/host (video.RTP), failing. 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: [fe80:0:0:0:50e7:235d:e94a:9977]:2022/udp/host -> [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2022/udp/host (video.RTP), failing. 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: [fe80:0:0:0:c9d0:ed0d:557e:68af]:2022/udp/host -> [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2022/udp/host (video.RTP), failing. 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: [fe80:0:0:0:c811:49cc:8301:b637]:2022/udp/host -> [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2022/udp/host (video.RTP), failing. 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.88.1:2022/udp/host -> 192.168.10.151:2022/udp/host (video.RTP), failing. 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.31.1:2022/udp/host -> 192.168.10.151:2022/udp/host (video.RTP), failing. 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 10.64.16.51:2022/udp/host -> 111.93.62.26:2022/udp/srflx (video.RTP), failing. 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.88.1:2022/udp/host -> 111.93.62.26:2022/udp/srflx (video.RTP), failing. 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.31.1:2022/udp/host -> 111.93.62.26:2022/udp/srflx (video.RTP), failing. 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 10.64.16.51:2023/udp/host -> 192.168.10.151:2023/udp/host (video.RTCP), failing. 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: [fe80:0:0:0:50e7:235d:e94a:9977]:2023/udp/host -> [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2023/udp/host (video.RTCP), failing. 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: [fe80:0:0:0:c9d0:ed0d:557e:68af]:2023/udp/host -> [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2023/udp/host (video.RTCP), failing. 
Apr 14, 2016 6:33:37 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: [fe80:0:0:0:c811:49cc:8301:b637]:2023/udp/host -> [fe80:0:0:0:7521:ed11:4f2b:c6fb]:2023/udp/host (video.RTCP), failing. 
Apr 14, 2016 6:33:38 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.88.1:2023/udp/host -> 192.168.10.151:2023/udp/host (video.RTCP), failing. 
Apr 14, 2016 6:33:38 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.31.1:2023/udp/host -> 192.168.10.151:2023/udp/host (video.RTCP), failing. 
Apr 14, 2016 6:33:38 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 10.64.16.51:2023/udp/host -> 111.93.62.26:2023/udp/srflx (video.RTCP), failing. 
Apr 14, 2016 6:33:38 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.88.1:2023/udp/host -> 111.93.62.26:2023/udp/srflx (video.RTCP), failing. 
Apr 14, 2016 6:33:38 PM org.ice4j.ice.ConnectivityCheckClient processTimeout 
INFO: timeout for pair: 192.168.31.1:2023/udp/host -> 111.93.62.26:2023/udp/srflx (video.RTCP), failing. 
Apr 14, 2016 6:33:38 PM org.ice4j.ice.ConnectivityCheckClient updateCheckListAndTimerStates 
INFO: CheckList will failed in a few seconds if nosucceeded checks come 
Apr 14, 2016 6:33:41 PM org.ice4j.ice.ConnectivityCheckClient$1 run 
INFO: CheckList for stream audio FAILED 
Apr 14, 2016 6:33:43 PM org.ice4j.ice.ConnectivityCheckClient$1 run 
INFO: CheckList for stream video FAILED 
Apr 14, 2016 6:33:43 PM org.ice4j.ice.Agent checkListStatesUpdated 
INFO: ICE state is FAILED 
Apr 14, 2016 6:33:43 PM org.ice4j.ice.Agent setState 
INFO: ICE state changed from Running to Failed 
Apr 14, 2016 6:33:43 PM com.ice4j.test.IceDemoPropertyChangeListener propertyChange 
INFO: Agent entered the Failed state. 
Apr 14, 2016 6:33:43 PM com.ice4j.test.IceDemoPropertyChangeListener propertyChange 
INFO: Total ICE processing time: 491243 

我無法理解,因爲如果我看到日誌,在某種程度上它顯示的公共IP地址的原因和其結合港口,但不知何故連接不成功與SDP信息。 任何幫助將不勝感激...

回答

0

該問題與代理託管在另一臺機器上。當我從代碼打開服務器時,它工作正常。無論如何,NAT背後的所有主機都無法100%地與眩暈一起工作,並且這也發生在我身上,也是因爲互聯網上另一個網絡的NAT背後的主機之一。啓用轉彎工程。