• Advertisement
Sign in to follow this  

Amazon EC2 UDP connect failed

This topic is 2030 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[color=#000000][font=verdana, arial, sans-serif]

I have an Amazon EC2 (Amazon Linux) server with port 9930 open[/font][color=#000000][font=verdana, arial, sans-serif]


I have a simple test program:[/font][color=#000000][font=verdana, arial, sans-serif]


http://pathogen.myftp.org/test.cpp[/font][color=#000000][font=verdana, arial, sans-serif]


When I run it and try to telnet port 9930 it says[/font][color=#000000][font=verdana, arial, sans-serif]


Could not open connection to host, on port 9930: Connect failed[/font][color=#000000][font=verdana, arial, sans-serif]


Why?[/font]

Share this post


Link to post
Share on other sites
Advertisement
You have opened a socket using UDP. Telnet is a TCP-based utility. Basically, you're calling a phone number in China and asking why they aren't speaking French ;-)

Share this post


Link to post
Share on other sites

please test if you have UDP ports opened in your 'security group'

Yep, UDP port open.



To test sockets in general, and UDP sockets specifically, use the "netcat" program.


This works:

nc -u

ec2-50-19-202-144.compute-1.amazonaws.com

9930

But my game still doesn't... mmm. Edited by polyfrag

Share this post


Link to post
Share on other sites
What does wireshark say on the machine you run "nc.exe" on?
Are you sure the Amazon provisioning is set up to allow UDP in on the public IP? If it works with netcat on the server, but not with netcat on your client, then that's the most likely problem.
Could also be local firewalls on the client, on your router, or on the server itself.

Share this post


Link to post
Share on other sites
[color=#000000][font=verdana, arial, sans-serif]

OOOooh, I forgot to click Apply Rule for the UDP ports. Works now. Thank you.[/font]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement