My websocket server is running on port 9000 on an ec2 instance.
It's working perfectly when accessed through a browser.
But I am unable to do telnet to it.
I did telnet ec2.x.y.z.com 9000 and the response is :
telnet: connect to address 54.251.xx.yyz: Connection timed out
From the posted comments, it seems to me that you have a firewall that is preventing you from accessing the server. If so, you should not able to be access the server using the browser not only using telnet.