lanikai / alohartc

WebRTC native stack tailored for ARM/Linux embedded systems
https://alohartc.com
Apache License 2.0
19 stars 6 forks source link

Failed to send connectivity check: missing address #25

Closed thinkski closed 5 years ago

thinkski commented 5 years ago

Asked Nicole to try connecting to my RPi from her parent's house in Florida. She is on Mac OS X, first tried in Chrome, once more in Chrome, then Safari, yielding the same result, a failure to send a connectivity check -- missing address. It did, however, work from her iPhone, which was connected to wifi, the last connection attempt below:

chris@apple:~ $ ./demo
Demo is running. Open http://apple:8000 in a browser.
2018/12/20 15:03:20.912684 agent.go:47: Listening on udp/192.168.1.148:50927
2018/12/20 15:03:20.913648 main.go:79: Local ICE candidate:MBTPNDBL 1 udp 2130706431 192.168.1.148 50927 typ host
2018/12/20 15:03:20.999574 main.go:68: Remote ICE candidate:3594748867 1 udp 2113937151 192.168.1.72 57004 typ host generation 0 ufrag 5LSK network-cost 50
2018/12/20 15:03:20.999798 main.go:68: Remote ICE candidate:859873830 1 udp 2113939711 2600:1700:2f90:3af0:f907:a8fc:732a:2fa3 57005 typ host generation 0 ufrag 5LSK network-cost 50
2018/12/20 15:03:20.999962 main.go:68: Remote ICE candidate:842163049 1 udp 1677729535 45.27.233.15 57004 typ srflx raddr 192.168.1.72 rport 57004 generation 0 ufrag 5LSK network-cost 50
2018/12/20 15:03:21.027107 main.go:79: Local ICE candidate:EH5O4XDS 1 udp 1862270975 98.234.110.238 50927 typ srflx raddr 0.0.0.0 rport 0
2018/12/20 15:03:21.027723 main.go:82: End of local ICE candidates
2018/12/20 15:03:21.114004 agent.go:181: Failed to send connectivity check: write udp4 192.168.1.148:50927: missing address
chris@apple:~ $ ./demo
Demo is running. Open http://apple:8000 in a browser.
2018/12/20 15:03:34.245377 agent.go:47: Listening on udp/192.168.1.148:48442
2018/12/20 15:03:34.246447 main.go:79: Local ICE candidate:MBTPNDBL 1 udp 2130706431 192.168.1.148 48442 typ host
2018/12/20 15:03:34.333203 main.go:68: Remote ICE candidate:3594748867 1 udp 2113937151 192.168.1.72 50464 typ host generation 0 ufrag 4d+q network-cost 50
2018/12/20 15:03:34.333558 main.go:68: Remote ICE candidate:859873830 1 udp 2113939711 2600:1700:2f90:3af0:f907:a8fc:732a:2fa3 50465 typ host generation 0 ufrag 4d+q network-cost 50
2018/12/20 15:03:34.333861 main.go:68: Remote ICE candidate:842163049 1 udp 1677729535 45.27.233.15 50464 typ srflx raddr 192.168.1.72 rport 50464 generation 0 ufrag 4d+q network-cost 50
2018/12/20 15:03:34.353432 main.go:79: Local ICE candidate:EH5O4XDS 1 udp 1862270975 98.234.110.238 48442 typ srflx raddr 0.0.0.0 rport 0
2018/12/20 15:03:34.353937 main.go:82: End of local ICE candidates
2018/12/20 15:03:34.446548 agent.go:181: Failed to send connectivity check: write udp4 192.168.1.148:48442: missing address
chris@apple:~ $ ./demo
Demo is running. Open http://apple:8000 in a browser.
^C
chris@apple:~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:62:35:e2
          inet addr:192.168.1.119  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::1130:fe73:a054:cb61/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:88423 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42697 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:30585892 (29.1 MiB)  TX bytes:21199220 (20.2 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:68 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5760 (5.6 KiB)  TX bytes:5760 (5.6 KiB)

wlan0     Link encap:Ethernet  HWaddr b8:27:eb:37:60:b7
          inet addr:192.168.1.148  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::561:2e93:47bf:2d7f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:57521 errors:0 dropped:0 overruns:0 frame:0
          TX packets:144628 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9371283 (8.9 MiB)  TX bytes:180553595 (172.1 MiB)

chris@apple:~ $ ./demo
Demo is running. Open http://apple:8000 in a browser.
2018/12/20 15:04:16.083843 agent.go:47: Listening on udp/192.168.1.148:51738
2018/12/20 15:04:16.084667 main.go:79: Local ICE candidate:MBTPNDBL 1 udp 2130706431 192.168.1.148 51738 typ host
2018/12/20 15:04:16.161799 main.go:68: Remote ICE candidate:3594748867 1 udp 2113937151 192.168.1.72 62580 typ host generation 0 ufrag p79F network-cost 50
2018/12/20 15:04:16.162033 main.go:68: Remote ICE candidate:859873830 1 udp 2113939711 2600:1700:2f90:3af0:f907:a8fc:732a:2fa3 62581 typ host generation 0 ufrag p79F network-cost 50
2018/12/20 15:04:16.162166 main.go:68: Remote ICE candidate:842163049 1 udp 1677729535 45.27.233.15 62580 typ srflx raddr 192.168.1.72 rport 62580 generation 0 ufrag p79F network-cost 50
2018/12/20 15:04:16.193173 main.go:79: Local ICE candidate:EH5O4XDS 1 udp 1862270975 98.234.110.238 51738 typ srflx raddr 0.0.0.0 rport 0
2018/12/20 15:04:16.193637 main.go:82: End of local ICE candidates
2018/12/20 15:04:16.284942 agent.go:181: Failed to send connectivity check: write udp4 192.168.1.148:51738: missing address
chris@apple:~ $ ./demo
Demo is running. Open http://apple:8000 in a browser.
2018/12/20 15:04:41.553304 agent.go:47: Listening on udp/192.168.1.148:50013
2018/12/20 15:04:41.554999 main.go:79: Local ICE candidate:MBTPNDBL 1 udp 2130706431 192.168.1.148 50013 typ host
2018/12/20 15:04:41.670615 main.go:79: Local ICE candidate:EH5O4XDS 1 udp 1862270975 98.234.110.238 50013 typ srflx raddr 0.0.0.0 rport 0
2018/12/20 15:04:41.671033 main.go:82: End of local ICE candidates
2018/12/20 15:04:41.874410 main.go:68: Remote ICE candidate:0 1 UDP 2122187007 192.168.1.72 62144 typ host
2018/12/20 15:04:41.999161 main.go:68: Remote ICE candidate:2 1 UDP 2122252543 2600:1700:2f90:3af0:f907:a8fc:732a:2fa3 62145 typ host
2018/12/20 15:04:41.999653 main.go:68: Remote ICE candidate:4 1 TCP 2105458943 192.168.1.72 9 typ host tcptype active
2018/12/20 15:04:41.999841 main.go:68: Remote ICE candidate:5 1 TCP 2105524479 2600:1700:2f90:3af0:f907:a8fc:732a:2fa3 9 typ host tcptype active
2018/12/20 15:04:42.000079 main.go:68: Remote ICE candidate:0 2 UDP 2122187006 192.168.1.72 64458 typ host
2018/12/20 15:04:42.000229 main.go:68: Remote ICE candidate:2 2 UDP 2122252542 2600:1700:2f90:3af0:f907:a8fc:732a:2fa3 64459 typ host
2018/12/20 15:04:42.000466 main.go:68: Remote ICE candidate:4 2 TCP 2105458942 192.168.1.72 9 typ host tcptype active
2018/12/20 15:04:42.000693 main.go:68: Remote ICE candidate:5 2 TCP 2105524478 2600:1700:2f90:3af0:f907:a8fc:732a:2fa3 9 typ host tcptype active
2018/12/20 15:04:42.000905 main.go:68: Remote ICE candidate:1 1 UDP 1685987327 45.27.233.15 62144 typ srflx raddr 192.168.1.72 rport 62144
2018/12/20 15:04:42.001284 main.go:68: Remote ICE candidate:1 2 UDP 1685987326 45.27.233.15 64458 typ srflx raddr 192.168.1.72 rport 64458
2018/12/20 15:04:42.054973 agent.go:181: Failed to send connectivity check: write udp4 192.168.1.148:50013: missing address
chris@apple:~ $ ./demo
Demo is running. Open http://apple:8000 in a browser.
2018/12/20 15:07:45.318231 agent.go:47: Listening on udp/192.168.1.148:36691
2018/12/20 15:07:45.319295 main.go:79: Local ICE candidate:MBTPNDBL 1 udp 2130706431 192.168.1.148 36691 typ host
2018/12/20 15:07:45.374376 main.go:68: Remote ICE candidate:842163049 1 udp 1677729535 45.27.233.15 65305 typ srflx raddr 0.0.0.0 rport 0 generation 0 ufrag eF1y network-cost 50
2018/12/20 15:07:45.421536 main.go:65: End of remote ICE candidates
2018/12/20 15:07:45.453504 main.go:79: Local ICE candidate:EH5O4XDS 1 udp 1862270975 98.234.110.238 36691 typ srflx raddr 0.0.0.0 rport 0
2018/12/20 15:07:45.453767 main.go:82: End of local ICE candidates
CLIENT_RANDOM 957c009f6691367526f075d1681932dd8306193b1fb87174b6fd1edd8607eb31 5b2c8162994002d62577d9681c8e9e42af64884828d90375a0b149f2d77c5caa70a6c038e8d71e680d3da1a9af52463d
2018/12/20 15:07:45.860982 handshake_client.go:557: master secret: 5b2c8162994002d62577d9681c8e9e42af64884828d90375a0b149f2d77c5caa70a6c038e8d71e680d3da1a9af52463d
2018/12/20 15:07:45.861130 handshake_client.go:558: client random: 957c009f6691367526f075d1681932dd8306193b1fb87174b6fd1edd8607eb31
2018/12/20 15:07:45.861233 handshake_client.go:559: server random: 5c1c20c12d4c2a0a68990016d8546bd90bc50bb68afb8b6958b6425abcf79a6f
2018/12/20 15:07:45.861330 handshake_client.go:560: server key: e8595be50ca2f00c8005165ae0a15aac
2018/12/20 15:07:45.861434 handshake_client.go:561: server salt: 84140fcac63c24efc073832c3d6f
2018/12/20 15:07:45.960154 handshake_client.go:713: got new session ticket 10
2018/12/20 15:07:46.366080 peer_connection.go:236: [0 0 0 1 39 100 0 40 172 43 64 40 2 221 0 241 34 106 0 0 0 1 40 238 2 92 176]
2018/12/20 15:09:11.793404 main.go:52: websocket: close 1006 (abnormal closure): unexpected EOF
2018/12/20 15:10:11.638038 base.go:72: read udp4 192.168.1.148:36691: i/o timeout

@jwgcarlson Could this be related to the IPv6 addresses? Would you have time to look into this while she is out there so we can test again?

thinkski commented 5 years ago

Now getting the same on my laptop (macOS Mojave 10.14.2, Chrome 71.0.3578.98 as well as Safari 12.0.2 (14606.3.4)). Suspecting upgrade to 10.14.2 on Mojave causes IPv6 candidates to be sent.

thinkski commented 5 years ago

So looks like the IPv6 candidate is causing the connectivity check to fail, which is logged as fatal, but I don't think it should be -- making it non-fatal fixes the immediate issue (d237133). Created a new issue for adding IPv6 support (https://github.com/thinkski/webrtc/issues/26).

thinkski commented 5 years ago

Looks like IPv6 wasn't an issue because of macOS but rather AT&T Uverse, which both Chris' and Nicole's parents use.