coTURN 无法在 Mozilla Firefox 中进行握手

coTURN unable to do a handshake in Mozilla Firefox

我有一个使用 WebRTC 的 Web 和独立应用程序。 我在 Amazon EC2 上有自己的 coturn 服务器。我根据 article 配置所有内容(也许这是一个错误?)。我用这个 stun/turn 服务器测试我的应用程序,一切都适用于 Chrome、Edge、Safari,但不适用于 Mozilla Firefox(已生成报价和答案)。我在控制台中收到以下错误:

ICE failed, your TURN server appears to be broken, see about:webrtc for more details

我假设我配置错误,所以这就是它不起作用的原因。 我使用的 EC2 机器:

coturn配置(/etc/turnserver.conf文件):

listening-ip=0.0.0.0
external-ip={publicIP}:{privateIP}
external-port=3478
fingerprint
realm={publicIP}
lt-cred-mech
user={username}:{password}
log-file=/var/tmp/turn.log
verbose

Stun/Turn代码中的服务器配置:

RTCConfiguration.Create([|
      RTCIceServer.Create([|
          "stun:{publicIP}:3478"
          "turn:{publicIP}:3478"
        |], {userName}, {password}, RTCIceCredentialType.Password)
    |])

并且传输策略设置为 all

而整个 turn.log 仅针对来自 Mozilla 的此请求:

0: log file opened: /var/tmp/turn_2020-04-03.log
0: pid file created: /var/run/turnserver.pid
0: IO method (main listener thread): epoll (with changelist)
0: WARNING: I cannot support STUN CHANGE_REQUEST functionality because only one IP address is provided
0: Wait for relay ports initialization...
0:   relay 0.0.0.0 initialization...
0:   relay 0.0.0.0 initialization done
0: Relay ports initialization done
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=1 created
0: IPv4. SCTP listener opened on : 0.0.0.0:3478
0: IPv4. TCP listener opened on : 0.0.0.0:3478
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=0 created
0: IPv4. TCP listener opened on : 0.0.0.0:3478
0: IPv4. UDP listener opened on: 0.0.0.0:3478
0: Total General servers: 2
0: IO method (admin thread): epoll (with changelist)
0: IO method (auth thread): epoll (with changelist)
0: IO method (auth thread): epoll (with changelist)
0: SQLite DB connection success: /var/lib/turn/turndb
20: handle_udp_packet: New UDP endpoint: local addr 0.0.0.0:3478, remote addr {remoteIP}:59148
20: session 001000000000000001: realm <{publicIP}> user <>: incoming packet BINDING processed, success
20: handle_udp_packet: New UDP endpoint: local addr 0.0.0.0:3478, remote addr {remoteIP}:49200
20: session 001000000000000002: realm <{publicIP}> user <>: incoming packet message processed, error 401: Unauthorized
21: IPv4. Local relay addr: {privateIP}:15158
21: session 001000000000000002: new, realm=<{publicIP}>, username=<{username}>, lifetime=600
21: session 001000000000000002: realm <{publicIP}> user <{username}>: incoming packet ALLOCATE processed, success
48: handle_udp_packet: New UDP endpoint: local addr 0.0.0.0:3478, remote addr {remoteIP}:62186
48: session 001000000000000003: realm <{publicIP}> user <{username}>: incoming packet message processed, error 438: Wrong nonce
48: session 001000000000000003: realm <{publicIP}> user <{username}>: incoming packet REFRESH processed, error 437: Invalid allocation
48: session 001000000000000003: realm <{publicIP}> user <{username}>: incoming packet message processed, error 437: Invalid allocation
61: handle_udp_packet: New UDP endpoint: local addr 0.0.0.0:3478, remote addr {remoteIP}:49582
61: session 001000000000000004: realm <{publicIP}> user <{username}>: incoming packet message processed, error 438: Wrong nonce
61: session 001000000000000004: realm <{publicIP}> user <{username}>: incoming packet REFRESH processed, error 437: Invalid allocation
61: session 001000000000000004: realm <{publicIP}> user <{username}>: incoming packet message processed, error 437: Invalid allocation
66: session 001000000000000004: realm <{publicIP}> user <{username}>: incoming packet CREATE_PERMISSION processed, success
66: session 001000000000000004: realm <{publicIP}> user <{username}>: incoming packet message processed, error 400: Bad Request

和来自 about:webrtc 的日志:

/builds/worker/workspace/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:173 function nr_socket_multi_tcp_create_stun_server_socket skipping UDP STUN server(addr:IP4:{localIP}:3478/UDP)

/builds/worker/workspace/build/src/media/mtransport/third_party/nICEr/src/net/nr_socket_multi_tcp.c:173 function nr_socket_multi_tcp_create_stun_server_socket skipping UDP STUN server(addr:IP4:{localIP}:3478/UDP)

/builds/worker/workspace/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(PC:21372137213721372 (id=214741111111 url=http://someurl)): failed to create passive TCP host candidate: 3

STUN-CLIENT(srflx(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)): Timed out

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/CAND(srflx(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)): failed to initialize, 2 remaining

STUN-CLIENT(relay(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)::TURN): Timed out

TURN(relay(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)): mode 20, nr_turn_client_error_cb

TURN(relay(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)) failed

TURN(relay(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)): cancelling

ICE-CANDIDATE(relay(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)): nr_turn_allocated_cb called with state 4

ICE-CANDIDATE(relay(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)): nr_turn_allocated_cb failed

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/CAND(srflx(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)): failed to initialize, 1 remaining

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/CAND(relay(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)): failed to initialize, 0 remaining

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl)): All candidates initialized

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl)): peer (PC:21372137213721372 (id=214741111111 url=http://someurl):default) has no stream matching stream PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl)): peer (PC:21372137213721372 (id=214741111111 url=http://someurl):default) no such component for candidate candidate:foundation 2 udp 2130706431 10.0.22.10 64477 typ host generation 0

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl)): peer (PC:21372137213721372 (id=214741111111 url=http://someurl):default) no such component for candidate candidate:foundation 2 udp 2130706431 160.21.130.15 64478 typ host generation 0

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl)): peer (PC:21372137213721372 (id=214741111111 url=http://someurl):default) no such component for candidate candidate:foundation 2 udp 1694498815 10.20.44.17 59873 typ srflx raddr 0.0.0.0 rport 64479 generation 0

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl)): peer (PC:21372137213721372 (id=214741111111 url=http://someurl):default) no such component for candidate candidate:foundation 2 udp 16777215 {publicIP} 14332 typ relay raddr 0.0.0.0 rport 64480 generation 0

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(AUgV): setting pair to state FROZEN: AUgV|IP4:192.168.0.50:54084/UDP|IP4:10.0.22.10:64477/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 2130706431 10.0.22.10 64477 typ host generation 0)

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/CAND-PAIR(AUgV): Pairing candidate IP4:192.168.0.50:54084/UDP (7e7f00ff):IP4:10.0.22.10:64477/UDP (7effffff) priority=9115005270299246590 (7e7f00fffdfffffe)

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(LRw8): setting pair to state FROZEN: LRw8|IP4:192.168.0.50:54084/UDP|IP4:160.21.130.15:64478/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 2130706431 160.21.130.15 64478 typ host generation 0)

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/CAND-PAIR(LRw8): Pairing candidate IP4:192.168.0.50:54084/UDP (7e7f00ff):IP4:160.21.130.15:64478/UDP (7effffff) priority=9115005270299246590 (7e7f00fffdfffffe)

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(uAK4): setting pair to state FROZEN: uAK4|IP4:192.168.0.50:54084/UDP|IP4:10.20.44.17:59873/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 1694498815 10.20.44.17 59873 typ srflx raddr 0.0.0.0 rport 64479 generation 0)

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/CAND-PAIR(uAK4): Pairing candidate IP4:192.168.0.50:54084/UDP (7e7f00ff):IP4:10.20.44.17:59873/UDP (64ffffff) priority=7277816997780259327 (64fffffffcfe01ff)

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(ZzTX): setting pair to state FROZEN: ZzTX|IP4:192.168.0.50:54084/UDP|IP4:{publicIP}:14332/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 16777215 {publicIP} 14332 typ relay raddr 0.0.0.0 rport 64480 generation 0)

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/CAND-PAIR(ZzTX): Pairing candidate IP4:192.168.0.50:54084/UDP (7e7f00ff):IP4:{publicIP}:14332/UDP (ffffff) priority=72057593987465727 (fffffffcfe01ff)

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(AUgV): setting pair to state WAITING: AUgV|IP4:192.168.0.50:54084/UDP|IP4:10.0.22.10:64477/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 2130706431 10.0.22.10 64477 typ host generation 0)

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/ICE-STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac): Starting check timer for stream.

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(AUgV): setting pair to state IN_PROGRESS: AUgV|IP4:192.168.0.50:54084/UDP|IP4:10.0.22.10:64477/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 2130706431 10.0.22.10 64477 typ host generation 0)

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl)): peer (PC:21372137213721372 (id=214741111111 url=http://someurl):default) is now checking

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl)): peer (PC:21372137213721372 (id=214741111111 url=http://someurl):default) no streams with pre-answer requests

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(LRw8): setting pair to state WAITING: LRw8|IP4:192.168.0.50:54084/UDP|IP4:160.21.130.15:64478/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 2130706431 160.21.130.15 64478 typ host generation 0)

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(LRw8): setting pair to state IN_PROGRESS: LRw8|IP4:192.168.0.50:54084/UDP|IP4:160.21.130.15:64478/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 2130706431 160.21.130.15 64478 typ host generation 0)

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(uAK4): setting pair to state WAITING: uAK4|IP4:192.168.0.50:54084/UDP|IP4:10.20.44.17:59873/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 1694498815 10.20.44.17 59873 typ srflx raddr 0.0.0.0 rport 64479 generation 0)

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(uAK4): setting pair to state IN_PROGRESS: uAK4|IP4:192.168.0.50:54084/UDP|IP4:10.20.44.17:59873/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 1694498815 10.20.44.17 59873 typ srflx raddr 0.0.0.0 rport 64479 generation 0)

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(ZzTX): setting pair to state WAITING: ZzTX|IP4:192.168.0.50:54084/UDP|IP4:{publicIP}:14332/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 16777215 {publicIP} 14332 typ relay raddr 0.0.0.0 rport 64480 generation 0)

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(ZzTX): setting pair to state IN_PROGRESS: ZzTX|IP4:192.168.0.50:54084/UDP|IP4:{publicIP}:14332/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 16777215 {publicIP} 14332 typ relay raddr 0.0.0.0 rport 64480 generation 0)

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default): no FROZEN/WAITING pairs for PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl)): peer (PC:21372137213721372 (id=214741111111 url=http://someurl):default) Trickle grace period is over; marking every component with only failed pairs as failed.

STUN-CLIENT(AUgV|IP4:192.168.0.50:54084/UDP|IP4:10.0.22.10:64477/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 2130706431 10.0.22.10 64477 typ host generation 0)): Timed out

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(AUgV): setting pair to state FAILED: AUgV|IP4:192.168.0.50:54084/UDP|IP4:10.0.22.10:64477/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 2130706431 10.0.22.10 64477 typ host generation 0)

STUN-CLIENT(LRw8|IP4:192.168.0.50:54084/UDP|IP4:160.21.130.15:64478/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 2130706431 160.21.130.15 64478 typ host generation 0)): Timed out

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(LRw8): setting pair to state FAILED: LRw8|IP4:192.168.0.50:54084/UDP|IP4:160.21.130.15:64478/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 2130706431 160.21.130.15 64478 typ host generation 0)

STUN-CLIENT(uAK4|IP4:192.168.0.50:54084/UDP|IP4:10.20.44.17:59873/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 1694498815 10.20.44.17 59873 typ srflx raddr 0.0.0.0 rport 64479 generation 0)): Timed out

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(uAK4): setting pair to state FAILED: uAK4|IP4:192.168.0.50:54084/UDP|IP4:10.20.44.17:59873/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 1694498815 10.20.44.17 59873 typ srflx raddr 0.0.0.0 rport 64479 generation 0)

STUN-CLIENT(ZzTX|IP4:192.168.0.50:54084/UDP|IP4:{publicIP}:14332/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 16777215 {publicIP} 14332 typ relay raddr 0.0.0.0 rport 64480 generation 0)): Timed out

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/CAND-PAIR(ZzTX): setting pair to state FAILED: ZzTX|IP4:192.168.0.50:54084/UDP|IP4:{publicIP}:14332/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 16777215 {publicIP} 14332 typ relay raddr 0.0.0.0 rport 64480 generation 0)

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac)/COMP(1): All pairs are failed, and grace period has elapsed. Marking component as failed.

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac): state dump

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/ICE-STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac): Local component 1 - dumping candidates

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/ICE-STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac)/CAND(EJ0l): host(IP4:192.168.0.50:54084/UDP)

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/ICE-STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac)/CAND(5pC7): srflx(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/ICE-STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac)/CAND(5pC7): srflx(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/ICE-STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac)/CAND(0hfs): relay(IP4:192.168.0.50:54084/UDP|IP4:{localIP}:3478/UDP)

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/ICE-STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac)/CAND(HrQP): host(IP4:192.168.0.50:50811/TCP) active

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default)/STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac): state dump

CAND-PAIR(AUgV): pair AUgV|IP4:192.168.0.50:54084/UDP|IP4:10.0.22.10:64477/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 2130706431 10.0.22.10 64477 typ host generation 0): state=FAILED, priority=0x7e7f00fffdfffffe

CAND-PAIR(LRw8): pair LRw8|IP4:192.168.0.50:54084/UDP|IP4:160.21.130.15:64478/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 2130706431 160.21.130.15 64478 typ host generation 0): state=FAILED, priority=0x7e7f00fffdfffffe

CAND-PAIR(uAK4): pair uAK4|IP4:192.168.0.50:54084/UDP|IP4:10.20.44.17:59873/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 1694498815 10.20.44.17 59873 typ srflx raddr 0.0.0.0 rport 64479 generation 0): state=FAILED, priority=0x64fffffffcfe01ff

CAND-PAIR(ZzTX): pair ZzTX|IP4:192.168.0.50:54084/UDP|IP4:{publicIP}:14332/UDP(host(IP4:192.168.0.50:54084/UDP)|candidate:foundation 1 udp 16777215 {publicIP} 14332 typ relay raddr 0.0.0.0 rport 64480 generation 0): state=FAILED, priority=0xfffffffcfe01ff

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/ICE-STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac): Remote component 1 in state 3 - dumping candidates

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/ICE-STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac)/CAND(9Ozf): candidate:foundation 1 udp 2130706431 10.0.22.10 64477 typ host generation 0

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/ICE-STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac)/CAND(N1wD): candidate:foundation 1 udp 2130706431 160.21.130.15 64478 typ host generation 0

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/ICE-STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac)/CAND(YlFO): candidate:foundation 1 udp 1694498815 10.20.44.17 59873 typ srflx raddr 0.0.0.0 rport 64479 generation 0

ICE(PC:21372137213721372 (id=214741111111 url=http://someurl))/ICE-STREAM(PC:21372137213721372 (id=214741111111 url=http://someurl) transport-id=transport_0 - 72a938a6:f1234561cb2blablabla0dc711160ac)/CAND(8mKo): candidate:foundation 1 udp 16777215 {publicIP} 14332 typ relay raddr 0.0.0.0 rport 64480 generation 0

ICE-PEER(PC:21372137213721372 (id=214741111111 url=http://someurl):default): all checks completed success=0 fail=1

任何提示我可能做错的地方都将不胜感激!

您应该仔细检查在 AWS 中为 EC2 实例定义的内部路由和一些关于入站流量的全局路由。 如果 stun/turn 服务器在内部网络之外不可用,Mozilla Firefox 将是唯一无法执行 "handshake" 的服务器。 ChromeEDGESafari 将在这种情况下工作并建立 P2P (srflx) 连接。

在我的情况下,所有 AWS 实例的入站流量都有一些额外的定义,这些实例阻止了到 stun/turn 服务器的流量。我意识到,当我尝试从一台计算机(连接到 VPN)到另一台(未连接到 VPN)测试 WebRTC 时,它在执行 "handshake".

时失败了