Amazon EC2 UDP connect failed

Started by
8 comments, last by polyfrag 11 years, 9 months ago
[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]

Advertisement
There has been a lot of power outages, and I know that amazon's cloud services have been severely affected.. http://hardware.slashdot.org/story/12/06/30/162250/more-uptime-problems-for-amazon-cloud
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 ;-)

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

To test sockets in general, and UDP sockets specifically, use the "netcat" program.
enum Bool { True, False, FileNotFound };
please test if you have UDP ports opened in your 'security group'

I open sourced my C++/iOS OpenGL 2D RPG engine :-)



See my blog: (Tutorials and GameDev)


[size=2]http://howtomakeitin....wordpress.com/


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.
Even this sample program doesn't work

http://www.tenouk.com/Winsock/Winsock2example9.html

test.exe -p UDP -n ec2-50-19-202-144.compute-1.amazonaws.com -e 9930
[color=#000000][font=verdana, arial, sans-serif]

Even netcat for windows doesn't work when I do the same command:[/font]

nc.exe -u ec2-50-19-202-144.compute-1.amazonaws.com 9930

http://joncraton.org...cat-for-windows

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.
enum Bool { True, False, FileNotFound };
[color=#000000][font=verdana, arial, sans-serif]

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

This topic is closed to new replies.

Advertisement