Rust hyper server in production inaccessible

I have the following hyper hello server deployed to a AWS linux instance:
https://github.com/hyperium/hyper/blob/master/examples/hello.rs

I also have the following Python 2 script for comparison:

import SimpleHTTPServer
import SocketServer

PORT = 3000

Handler = SimpleHTTPServer.SimpleHTTPRequestHandler

httpd = SocketServer.TCPServer(("", PORT), Handler)

print "serving at port", PORT
httpd.serve_forever()

The python server is accessible from the internet whereas the Rust hyper server refuses to connect.
There's no problem with the firewall. Ports are accessible on the system.

What am I missing here?

The Rust server is binding to 127.0.0.1, which is only available through the loopback interface, not over the Internet. You probably want to bind to 0.0.0.0 instead, which will be accessible through any network interface.

Silly me, focusing on learning so many things that I forgot about this basic convention. Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.