You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hack/test-port-forwarding.pl: add reporting "failed to listen tcp"
Add reporting for the "failed to listen tcp" error.
Additionally, it should print information about the processes listening on the failed ports.
e.g.
```console
$ socat TCP-LISTEN:2020,bind=127.0.0.1,fork /dev/null&
$ socat TCP-LISTEN:4040,bind=127.0.0.1,fork /dev/null&
$ hack/test-port-forwarding.pl default
✅ Not forwarding TCP 127.0.0.2:3000
✅ Forwarding TCP from 127.0.0.3:3001 to 127.0.0.1:2001
✅ Forwarding TCP from 0.0.0.0:3002 to 127.0.0.1:2002
✅ Not forwarding TCP 0.0.0.0:3010
✅ Not forwarding TCP 127.0.0.1:3011
❌ Forwarding TCP from 127.0.0.2:3020 to 127.0.0.1:2020
Guest received: ''
✅ Forwarding TCP from 127.0.0.1:3021 to 127.0.0.1:2021
✅ Forwarding TCP from 0.0.0.0:3022 to 127.0.0.1:2022
✅ Forwarding TCP from [::]:3023 to 127.0.0.1:2023
✅ Forwarding TCP from [::1]:3024 to 127.0.0.1:2024
✅ Forwarding TCP from 127.0.0.1:3030 to 192.168.12.19:2030
✅ Forwarding TCP from 0.0.0.0:3031 to 192.168.12.19:2031
✅ Forwarding TCP from [::]:3032 to 192.168.12.19:2032
✅ Forwarding TCP from [::1]:3033 to 192.168.12.19:2033
✅ Forwarding TCP from 127.0.0.1:300 to 127.0.0.1:300
✅ Forwarding TCP from 127.0.0.1:310 to 0.0.0.0:310
✅ Forwarding TCP from 192.168.5.15:4000 to 192.168.12.19:4000
✅ Forwarding TCP from [::1]:4010 to [::]:4010
✅ Forwarding TCP from 127.0.0.1:4020 to 192.168.12.19:4020
✅ Forwarding TCP from 127.0.0.2:4021 to 192.168.12.19:4021
✅ Forwarding TCP from 192.168.5.15:4022 to 192.168.12.19:4022
✅ Forwarding TCP from 0.0.0.0:4023 to 192.168.12.19:4023
✅ Forwarding TCP from [::]:4024 to 192.168.12.19:4024
✅ Forwarding TCP from [::1]:4025 to 192.168.12.19:4025
✅ Forwarding TCP from 127.0.0.1:4030 to 192.168.12.19:4030
✅ Forwarding TCP from 127.0.0.2:4031 to 192.168.12.19:4031
✅ Forwarding TCP from 192.168.5.15:4032 to 192.168.12.19:4032
✅ Forwarding TCP from 0.0.0.0:4033 to 192.168.12.19:4033
✅ Forwarding TCP from [::]:4034 to 192.168.12.19:4034
✅ Forwarding TCP from [::1]:4035 to 192.168.12.19:4035
❌ Forwarding TCP from 0.0.0.0:4040 to 127.0.0.1:4040
Guest received: ''
✅ Forwarding TCP from [::]:4041 to 127.0.0.1:4041
✅ Not forwarding TCP 127.0.0.1:4043
✅ Not forwarding TCP 192.168.5.15:4044
✅ Forwarding TCP from 127.0.0.1:5000 to /Users/norio/.lima/default/sock/port5000.sock
⚠️ failed to listen tcp: listen tcp 127.0.0.1:2020: bind: address already in use
⚠️ failed to listen tcp: listen tcp 127.0.0.1:4040: bind: address already in use
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
socat1 76346 norio 5u IPv4 0x4a9052b6dc39e98b 0t0 TCP localhost:2020 (LISTEN)
socat1 76381 norio 5u IPv4 0x35a18a4bd36fb075 0t0 TCP localhost:4040 (LISTEN)
```
Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
0 commit comments