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
When Rocket starts a server where the address is localhost, it binds to IPv6 by default, rather than running on both IPv6 and IPv4.
This can cause a confusing developer experience where some tools (like Firefox) will check both IPv4 and IPv6 when you access localhost and will connect, but others (such as netcat, NodeJS's built-in http module, etc) won't find Rocket and will throw a "connection refused" error.
I expected Rocket to work more out-of-box, like http-server.
netstat -tulpn output:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 18215/node // http-server
tcp6 0 0 ::1:8000 :::* LISTEN 16929/hello_world // Rocket
<snip>
git clone https://github.com/SergioBenitez/Rocket
cd Rocket
git checkout v0.3.3
cd examples/hello_world
cargo run
// from other terminal
netcat localhost 8000
// will immediately exit with exit code 1 (failed to connect)
IMHO I think that Rocket should bind to both IPv4 and IPv6.
The text was updated successfully, but these errors were encountered:
Bug Reports
0.3.3
When Rocket starts a server where the address is
localhost
, it binds toIPv6
by default, rather than running on bothIPv6
andIPv4
.This can cause a confusing developer experience where some tools (like Firefox) will check both
IPv4
andIPv6
when you accesslocalhost
and will connect, but others (such asnetcat
, NodeJS's built-inhttp
module, etc) won't find Rocket and will throw a "connection refused" error.I expected Rocket to work more out-of-box, like
http-server
.netstat -tulpn
output:Run the Rocket quickstart
The text was updated successfully, but these errors were encountered: