Same situation as this question, HttpListener not receiving remote requests, even with the firewall down and all prefixes registered, namely:
- the HttpListener is only receiving requests from the same machine
- the application is running on a Windows EC2 instance (same spec as the other question)
- the ports being used are registered and opened in the firewall (I also temporarily took down the firewall to ensure that wasn’t the issue)
- The prefix I’m using is http://*:8080/
Differences from the other question:
- The security groups of the EC2 are correctly configured
- It was accepting outside requests, until (as far as I know) today and I’m not aware of any system changes (but I’m open to all ideas, whatsoever)
Additional info:
- The EC2 instance and system is passing all status checks
- I restarted the instance; no change
- The http status code sent back (not from my server application, from the system) to a remote client is a 503 (service unavailable)
- I’ve checked and rechecked that the url is correct (I have an elastic IP address and am using the public DNS of the instance in the url)
- I ran netstat to make sure the port was not being used by other processes
Any ideas for things to check or try are completely welcome; I’ve pretty much run out of ideas…
Couple of thoughts, some you’ve likely already checked:
Make sure you can still hit the listener locally on the machine – just to factor out something wrong with the code iteself
Make sure there is nothing else running on that port on that machine
Check the event viewer – any errors in there that may apply? Other events? A recent Windows Update – anything?
Try another port – to rule out port conflicts, try a different one
Make sure you are bound to the prefix: http://*:{your-port-#-here}/ – also, when you make your call HttpListener can be very specific, if you include a trailing slash in the prefix you register make sure you include that in your call, etc.
When you try to hit the machine – what address are you using: an EC2 Elastic IP address, the EC2 public dns, some DNS name you have routed to that machine? I have seen EC2 machines change public IP/DNS after a reboot before, maybe yours has changed?
That’s all I can think of for now. Good luck.