I created a simple backend server using the Rust "Nickel" framework by following the guide here: https://nickel-org.github.io/getting-started.html
i can run cargo run
locally and has reached the local endpoint http://127.0.0.1:6767
via factor to get this answer:
{
message: "Hello! Sincerely, Jimbob's Rusty Nickel"
}
It’s great, and I’d like to deploy it live. I am using a micro aws ec2 instance with ubuntu 18.04 LTS. After installing the load and running the application with cargo run
I get the usual successful start-up output "waiting for requests":
Listening on http://127.0.0.1:6767
Ctrl-C to shutdown server
I have my server ports open with these settings:
incoming:
80 tcp 0.0.0.0/0, ::/0
22 tcp 0.0.0.0/0
3000 tcp 0.0.0.0/0
443 tcp 0.0.0.0/0, ::/0
0-65535 tcp 0.0.0.0/0
6767 tcp 0.0.0.0/0
outbound:
All All 0.0.0.0/0
6767 tcp 0.0.0.0/0
When I try to call the live endpoint using ec2 public DNS (IPv4) with port 6767 or public IPv4 with port 6767, i get this error response:
Could not get any response
There was an error connecting to http://3.83.65.51:6767.
Why this might have happened:
The server couldn't send a response:
Ensure that the backend is working properly
Self-signed SSL certificates are being blocked:
Fix this by turning off 'SSL certificate verification' in Settings > General
Proxy configured incorrectly
Ensure that proxy is configured correctly in Settings > Proxy
Request timeout:
Change request timeout in Settings > General