title: How to allow Socket IO requests on Amazon EC2 instance?
body: <p>I have a web app running on a Amazon EC2 Instance on port 8080, the webapp while starting, starts a Socket io server listening on port 9092.  </p>
  
  <p>in the client file connecting to the Socket io server i have this:  </p>
  
  <pre><code>io.connect('http://&lt;IPADDRESS&gt;:9092');  
  </code></pre>
  
  <p>Unfortunately, this request is getting blocked as shown <a href="https://i.stack.imgur.com/XjOnY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XjOnY.png" alt="socket.io requests blocked"></a>:  </p>
  
  <p>I thought the problem was about inbound rules of my EC2 instance, i therefore allowed traffic for the purpose as shown:
  <a href="https://i.stack.imgur.com/ilz3x.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ilz3x.png" alt="Ec2 instance inbound rules"></a>  </p>
  
  <p>But the requests are still blocked... </p>
  
  <p><strong>NOTE:</strong> When my app is hosted locally, everything works fine.</p>
  
  <p>So why is amazon behaving this way and what am i supposed to do to come across this issue?  </p>
  
  <p><strong>UPDATE:</strong>     </p>
  
  <p><code>netstat -a -n | grep 9092</code> outputs this on instance:</p>
  
  <p><a href="https://i.stack.imgur.com/c4UHm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/c4UHm.png" alt="netstat output on port 9092"></a>  </p>
  
  <p>Also have a look on what firefox shows me about a request attempt timings: </p>
  
  <p><a href="https://i.stack.imgur.com/48VJZ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/48VJZ.png" alt="socketio request timings"></a></p>