Проблема Coturn WebRTC на виртуальной машине AZURE (Ubuntu Server 16.04 LTS)
Я использую webRTC для установления связи между браузерами и другими браузерами в реальном времени. Чтобы это соединение всегда было надежным, я хочу настроить свой собственный сервер STUN/TURN. Я решил использовать coturn на Azure VM (Ubuntu Server). Я следовал этой документации, чтобы настроить coturn в Azure https://www.microsoft.com/developerblog/2018/01/29/orchestrating-turn-servers-cloud-deployment/.
Согласно [Trickele ICE] [1] [1]: https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ мой сервер STUN работает, и я получаю положительные результаты.
Всякий раз, когда я пытаюсь использовать свой сервер STUN/TURN для установления соединения с веб-камерой, это не работает.
Статистика сеанса протокола webRTC:
Local SDP
v=0
o=mozilla...THIS_IS_SDPARTA-58.0.2 8794114299540424628 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 8B:A5:5A:36:D7:42:B0:DE:D8:FB:3B:AC:7A:41:AE:D1:F2:86:71:66:CB:99:79:54:08:9B:B2:97:DC:54:D7:E6
a=group:BUNDLE sdparta_0 sdparta_1
a=ice-options:trickle
a=msid-semantic:WMS *
m=audio 52254 UDP/TLS/RTP/SAVPF 109 9 0 8 101
c=IN IP4 192.168.9.1
a=candidate:0 1 UDP 2122252543 192.168.9.1 52254 typ host
a=candidate:1 1 UDP 2122187007 192.168.67.1 52255 typ host
a=candidate:2 1 UDP 2122121471 192.168.1.151 52256 typ host
a=candidate:3 1 TCP 2105524479 192.168.9.1 9 typ host tcptype active
a=candidate:4 1 TCP 2105458943 192.168.67.1 9 typ host tcptype active
a=candidate:5 1 TCP 2105393407 192.168.1.151 9 typ host tcptype active
a=candidate:0 2 UDP 2122252542 192.168.9.1 52257 typ host
a=candidate:1 2 UDP 2122187006 192.168.67.1 52258 typ host
a=candidate:2 2 UDP 2122121470 192.168.1.151 52259 typ host
a=candidate:3 2 TCP 2105524478 192.168.9.1 9 typ host tcptype active
a=candidate:4 2 TCP 2105458942 192.168.67.1 9 typ host tcptype active
a=candidate:5 2 TCP 2105393406 192.168.1.151 9 typ host tcptype active
a=sendrecv
a=end-of-candidates
a=extmap:1/sendonly urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid
a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1
a=fmtp:101 0-15
a=ice-pwd:b8b3237da4b403dd6e1e50c3a182f227
a=ice-ufrag:4efa27f0
a=mid:sdparta_0
a=msid:{9866f92b-4ef3-44d8-88bf-40e0064ad000} {24f74a5f-6173-4d87-b2fd-90f05de1c3c4}
a=rtcp:52257 IN IP4 192.168.9.1
a=rtcp-mux
a=rtpmap:109 opus/48000/2
a=rtpmap:9 G722/8000/1
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=setup:actpass
a=ssrc:753158800 cname:{38718aae-997b-4110-aeeb-a8126f52f4f3}
m=video 52260 UDP/TLS/RTP/SAVPF 120 121 126 97
c=IN IP4 192.168.9.1
a=candidate:0 1 UDP 2122252543 192.168.9.1 52260 typ host
a=candidate:1 1 UDP 2122187007 192.168.67.1 52261 typ host
a=candidate:2 1 UDP 2122121471 192.168.1.151 52262 typ host
a=candidate:3 1 TCP 2105524479 192.168.9.1 9 typ host tcptype active
a=candidate:4 1 TCP 2105458943 192.168.67.1 9 typ host tcptype active
a=candidate:5 1 TCP 2105393407 192.168.1.151 9 typ host tcptype active
a=candidate:0 2 UDP 2122252542 192.168.9.1 58499 typ host
a=candidate:1 2 UDP 2122187006 192.168.67.1 58500 typ host
a=candidate:2 2 UDP 2122121470 192.168.1.151 58501 typ host
a=candidate:3 2 TCP 2105524478 192.168.9.1 9 typ host tcptype active
a=candidate:4 2 TCP 2105458942 192.168.67.1 9 typ host tcptype active
a=candidate:5 2 TCP 2105393406 192.168.1.151 9 typ host tcptype active
a=sendrecv
a=end-of-candidates
a=extmap:1 htttp://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1
a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1
a=fmtp:120 max-fs=12288;max-fr=60
a=fmtp:121 max-fs=12288;max-fr=60
a=ice-pwd:b8b3237da4b403dd6e1e50c3a182f227
a=ice-ufrag:4efa27f0
a=mid:sdparta_1
a=msid:{9866f92b-4ef3-44d8-88bf-40e0064ad000} {59810283-0f69-47fa-964d-7ba8966daaff}
a=rtcp:58499 IN IP4 192.168.9.1
a=rtcp-fb:120 nack
a=rtcp-fb:120 nack pli
a=rtcp-fb:120 ccm fir
a=rtcp-fb:120 goog-remb
a=rtcp-fb:121 nack
a=rtcp-fb:121 nack pli
a=rtcp-fb:121 ccm fir
a=rtcp-fb:121 goog-remb
a=rtcp-fb:126 nack
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 ccm fir
a=rtcp-fb:126 goog-remb
a=rtcp-fb:97 nack
a=rtcp-fb:97 nack pli
a=rtcp-fb:97 ccm fir
a=rtcp-fb:97 goog-remb
a=rtcp-mux
a=rtpmap:120 VP8/90000
a=rtpmap:121 VP9/90000
a=rtpmap:126 H264/90000
a=rtpmap:97 H264/90000
a=setup:actpass
a=ssrc:3734878749 cname:{38718aae-997b-4110-aeeb-a8126f52f4f3}
Remote SDP
v=0
o=mozilla...THIS_IS_SDPARTA-58.0.1 2958360105461551245 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 29:21:2A:C5:42:11:8E:E9:2D:A2:8E:48:FA:AA:EB:C8:61:33:ED:B3:24:71:BC:20:27:68:1F:48:FB:EC:64:64
a=group:BUNDLE sdparta_0 sdparta_1
a=ice-options:trickle
a=msid-semantic:WMS *
m=audio 9 UDP/TLS/RTP/SAVPF 109 101
c=IN IP4 0.0.0.0
a=candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host
a=candidate:1 1 TCP 2105524479 192.168.1.155 9 typ host tcptype active
a=sendrecv
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid
a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1
a=fmtp:101 0-15
a=ice-pwd:83ca8dee4d50f43c443762e84fdb52c4
a=ice-ufrag:1a999d61
a=mid:sdparta_0
a=msid:{b9e14e75-b26e-4d1c-a5be-b359c6f0b91b} {b0b43916-ee73-474e-acbf-f57d639c99ae}
a=rtcp-mux
a=rtpmap:109 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=setup:active
a=ssrc:3242481895 cname:{d0c1b500-19b7-483a-be5b-46da70b91ab2}
m=video 9 UDP/TLS/RTP/SAVPF 120
c=IN IP4 0.0.0.0
a=sendrecv
a=extmap:1 htttp://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=fmtp:120 max-fs=12288;max-fr=60
a=ice-pwd:83ca8dee4d50f43c443762e84fdb52c4
a=ice-ufrag:1a999d61
a=mid:sdparta_1
a=msid:{b9e14e75-b26e-4d1c-a5be-b359c6f0b91b} {e297d5a1-76cc-46f8-8ea2-acb932a3056a}
a=rtcp-fb:120 nack
a=rtcp-fb:120 nack pli
a=rtcp-fb:120 ccm fir
a=rtcp-fb:120 goog-remb
a=rtcp-mux
a=rtpmap:120 VP8/90000
a=setup:active
a=ssrc:1237891263 cname:{d0c1b500-19b7-483a-be5b-46da70b91ab2}
Протокол соединения webRTC:
(ice/WARNING) z:/build/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:617 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): Skipping TURN server because of link local mis-match
(ice/WARNING) z:/build/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:617 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): Skipping TURN server because of link local mis-match
(ice/WARNING) z:/build/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:617 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): Skipping TURN server because of link local mis-match
(ice/WARNING) z:/build/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:617 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): Skipping TURN server because of link local mis-match
(ice/WARNING) z:/build/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:617 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): Skipping TURN server because of link local mis-match
(ice/WARNING) z:/build/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:617 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): Skipping TURN server because of link local mis-match
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(ice/WARNING) z:/build/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:617 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): Skipping TURN server because of link local mis-match
(ice/WARNING) z:/build/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:617 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): Skipping TURN server because of link local mis-match
(ice/WARNING) z:/build/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:617 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): failed to create passive TCP host candidate: 3
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): Skipping TURN server because of link local mis-match
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(ice/WARNING) z:/build/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:617 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): Skipping TURN server because of link local mis-match
(ice/WARNING) z:/build/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:617 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): Skipping TURN server because of link local mis-match
(ice/WARNING) z:/build/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:617 function nr_socket_multi_tcp_listen failed with error 3
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): failed to create passive TCP host candidate: 3
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): Skipping TURN server because of link local mis-match
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(generic/ERR) Error from TCPSocketChild: type: ConnectionRefusedError, name: Network
(ice/WARNING) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): peer (PC:222222222222222 (id=1111111111url=(link to myhompage)):default) has no stream matching stream 0-1519224369457000 (id=1111111111url=(link to myhompage)) aLevel=1
(ice/NOTICE) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): peer (PC:222222222222222 (id=1111111111url=(link to myhompage)):default) no streams with non-empty check lists
(ice/NOTICE) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): peer (PC:222222222222222 (id=1111111111url=(link to myhompage)):default) no streams with pre-answer requests
(ice/NOTICE) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): peer (PC:222222222222222 (id=1111111111url=(link to myhompage)):default) no checks to start
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(mR+z): setting pair to state FROZEN: mR+z|IP4:192.168.9.1:52254/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.9.1:52254/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage)))/CAND-PAIR(mR+z): Pairing candidate IP4:192.168.9.1:52254/UDP (7e7f00ff):IP4:192.168.1.155:58107/UDP (7e7f00ff) priority=9115005270282338815 (7e7f00fffcfe01ff)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/ICE-STREAM(0-1519224369457000 (id=1111111111url=(link to myhompage)) aLevel=0): Starting check timer for stream.
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(mR+z): setting pair to state WAITING: mR+z|IP4:192.168.9.1:52254/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.9.1:52254/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(mR+z): setting pair to state IN_PROGRESS: mR+z|IP4:192.168.9.1:52254/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.9.1:52254/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/NOTICE) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): peer (PC:222222222222222 (id=1111111111url=(link to myhompage)):default) is now checking
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(TCv6): setting pair to state FROZEN: TCv6|IP4:192.168.67.1:52255/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.67.1:52255/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage)))/CAND-PAIR(TCv6): Pairing candidate IP4:192.168.67.1:52255/UDP (7e7e00ff):IP4:192.168.1.155:58107/UDP (7e7f00ff) priority=9114723795305628158 (7e7e00fffcfe01fe)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(9PJr): setting pair to state FROZEN: 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage)))/CAND-PAIR(9PJr): Pairing candidate IP4:192.168.1.151:52256/UDP (7e7d00ff):IP4:192.168.1.155:58107/UDP (7e7f00ff) priority=9114442320328917502 (7e7d00fffcfe01fe)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(TCv6): setting pair to state WAITING: TCv6|IP4:192.168.67.1:52255/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.67.1:52255/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(TCv6): setting pair to state IN_PROGRESS: TCv6|IP4:192.168.67.1:52255/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.67.1:52255/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(9PJr): setting pair to state WAITING: 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(9PJr): setting pair to state IN_PROGRESS: 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/WARNING) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default): no pairs for 0-1519224369457000 (id=1111111111url=(link to myhompage)) aLevel=0
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(9PJr): triggered check on 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(9PJr): setting pair to state FROZEN: 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage)))/CAND-PAIR(9PJr): Pairing candidate IP4:192.168.1.151:52256/UDP (7e7d00ff):IP4:192.168.1.155:58107/UDP (7e7f00ff) priority=9114442320328917502 (7e7d00fffcfe01fe)
(ice/INFO) CAND-PAIR(9PJr): Adding pair to check list and trigger check queue: 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(9PJr): setting pair to state WAITING: 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(9PJr): setting pair to state CANCELLED: 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/ICE-STREAM(0-1519224369457000 (id=1111111111url=(link to myhompage)) aLevel=0): Starting check timer for stream.
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(9PJr): setting pair to state IN_PROGRESS: 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/WARNING) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default): no pairs for 0-1519224369457000 (id=1111111111url=(link to myhompage)) aLevel=0
(stun/INFO) STUN-CLIENT(9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)): Received response; processing
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(9PJr): setting pair to state SUCCEEDED: 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/STREAM(0-1519224369457000 (id=1111111111url=(link to myhompage)) aLevel=0)/COMP(1)/CAND-PAIR(9PJr): nominated pair is 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/STREAM(0-1519224369457000 (id=1111111111url=(link to myhompage)) aLevel=0)/COMP(1)/CAND-PAIR(9PJr): cancelling all pairs but 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/ICE-STREAM(0-1519224369457000 (id=1111111111url=(link to myhompage)) aLevel=0): all active components have nominated candidate pairs
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default): all checks completed success=1 fail=0
(stun/INFO) STUN-CLIENT(9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)): Received response; processing
(ice/INFO) ICE-PEER(PC:222222222222222 (id=1111111111url=(link to myhompage)):default)/CAND-PAIR(9PJr): setting pair to state SUCCEEDED: 9PJr|IP4:192.168.1.151:52256/UDP|IP4:192.168.1.155:58107/UDP(host(IP4:192.168.1.151:52256/UDP)|candidate:0 1 UDP 2122252543 192.168.1.155 58107 typ host)
(ice/ERR) ICE(PC:222222222222222 (id=1111111111url=(link to myhompage))): peer (PC:222222222222222 (id=1111111111url=(link to myhompage)):default), stream(0-1519224369457000 (id=1111111111url=(link to myhompage)) aLevel=0) tried to trickle ICE in inappropriate state 4
+++++++ END ++++++++
Если бы кто-нибудь мог мне помочь, это было бы очень ценно. Благодарю.
1 ответ
Я подозреваю, что некоторые из ваших настроек не установлены прямо на вашем сервере CoTurn. Я дам вам мою конфигурацию, которая работает для меня. Я также использую Ubuntu Server 16.04 LTS (Digital Ocean). Сначала удалите сервер CoTurn (лучше возьмите свежую капельку) и переустановите его:
sudo apt-get update
sudo apt-get install coturn
Далее редактируем sudo vi /etc/turnserver.conf
и измените его на следующие параметры (удалите все остальные параметры):
fingerprint
lt-cred-mech
realm=ip-of-your-server-accessible-from-outside
listening-ip=ip-of-your-server-accessible-from-outside
user=test:test
Далее редактируем sudo vi /etc/default/coturn
и измените его на следующие параметры (удалите все остальные параметры):
TURNSERVER_ENABLED=1
Ваш брандмауэр в Ubuntu может предотвращать входящие соединения. Сконфигурируйте свой сервер, чтобы разрешить входящие соединения STUN / TURN через порт 3478. В случае, если вы используете UFW, команда:
sudo ufw allow 3478
Перезагрузите сервер Ubuntu. После перезагрузки убедитесь, что ваш сервер работает:
turnserver -o
После очередной перезагрузки вашего Ubuntu сервер перестанет работать. Чтобы преодолеть это, вы можете захотеть, чтобы turnserver был системным сервисом.
В вашем приложении вы должны добавить что-то вроде:
peerConnectionConfig = {
'iceServers': [
{ 'urls': 'stun:ip-of-your-server:3478' },
{ 'urls': 'turn:ip-of-your-server:3478', 'username': 'test', 'credential': 'test' }
]
};
peerConnection = new RTCPeerConnection(peerConnectionConfig);
Запустите ваше приложение WebRTC в Firefox на двух вкладках, где они устанавливают соединение в одной локальной сети. Поскольку ваше приложение теперь не будет использовать STUN или TURN, мы можем быть уверены, что приложение не является проблемой
Теперь сделайте тот же тест, но заставьте Firefox использовать сервер TURN или replay
, Откройте новую вкладку и введите about:config
, Ищи media.peerconnection.ice.relay_only
и установите его true
, На данный момент Firefox использует только реле TURN. Если ваше приложение WebRTC работает сейчас, вы можете быть уверены, что ваш сервер TURN работает отлично.