I followed the steps in the following article to create a service that uses TCP and UDP ports:
in fact, I just cloned the example repository and deployed it:
However, it doesn’t seem to work. When I attempt to throw some packets at it, netcat
just times out:
[penberg@turing iku-turso]$ echo hello world | nc penberg-echo-test.fly.dev 5000
Ncat: TIMEOUT.
I can ssh to the machine and see that there app is there listening:
root@fbe46807:/# lsof|grep 5000
udp-echo 525 root 3u IPv4 4426 0t0 UDP fly-global-services:5000
udp-echo 525 root 7u IPv6 4430 0t0 TCP *:5000 (LISTEN)
udp-echo 525 526 udp-echo root 3u IPv4 4426 0t0 UDP fly-global-services:5000
udp-echo 525 526 udp-echo root 7u IPv6 4430 0t0 TCP *:5000 (LISTEN)
udp-echo 525 527 udp-echo root 3u IPv4 4426 0t0 UDP fly-global-services:5000
udp-echo 525 527 udp-echo root 7u IPv6 4430 0t0 TCP *:5000 (LISTEN)
udp-echo 525 528 udp-echo root 3u IPv4 4426 0t0 UDP fly-global-services:5000
udp-echo 525 528 udp-echo root 7u IPv6 4430 0t0 TCP *:5000 (LISTEN)
udp-echo 525 529 udp-echo root 3u IPv4 4426 0t0 UDP fly-global-services:5000
udp-echo 525 529 udp-echo root 7u IPv6 4430 0t0 TCP *:5000 (LISTEN)
and I can verify that the echo app is indeed working:
root@fbe46807:/# nc 127.0.0.1 5000
hello
hello
^C
root@fbe46807:/#
Is the example project out-of-date? Is the fly.toml
configuration file missing something?