So I've built a Node.Js (version 0.4.7) application using Express (version 2.3.3) and (version 0.6.17) for websockets. Everything works fine on my local machine with the same setup, but when I set it up on my server the socket on the client side is unable to communicate with the server. More specifically I get this error as it tries to use each transport method unsuccessfully:

GET undefined (undefined)

Everything else works, and I'm sure I setup the custom apps correctly and am using the assigned port 47556. I'm at a loss for what to do and heard that it may have something to do with nginx, but I'm not sure.

Any help would be massively appreciated since I've been at this for hours.

asked 04 May '11, 21:55

gisborne's gravatar image

accept rate: 0%

edited 04 May '11, 21:56


Websockets require a keepalive connection which is not possible through Nginx as it only supports HTTP 1.0 connections to the backend.

So, to use Websockets you need to bypass nginx which can only be done if you have a dedicated IP and get the port where your app is listening is opened by us for incoming connections.

You can apply for a dedicated IP here(it costs $5/month):

Hope that helps!

permanent link

answered 04 May '11, 22:04

neeravk's gravatar image

accept rate: 41%

Great, so my intuition was close. If I get the dedicated IP, will things just work or do I need to configure nginx?

(04 May '11, 22:12) gisborne gisborne's gravatar image

You would just need to get any port(depending upon availability) opened on the dedicated IP and bind your server to that on the IP.

You won't need to configure Nginx.

(04 May '11, 22:18) neeravk neeravk's gravatar image

Update: As of now, you don't need a dedicated IP to get ports opened. You can just request it in a support ticket and we can open it on a shared IP specifically added to servers for opening ports.

(16 May '12, 02:39) neeravk neeravk's gravatar image

What kind of traffic is allowed on the opened port? It used to be allowed only the above mentioned HTTP 1.0, and now?

(16 May '12, 06:16) unstar unstar's gravatar image

Any kind of TCP and UDP traffic is allowed.

(16 May '12, 06:43) iliasr ♦♦ iliasr's gravatar image

Awesome! :)

(16 May '12, 07:19) unstar unstar's gravatar image

Just an update: you now no longer need a dedicated IP for this -- our servers now have secondary shared IP addresses for this purpose, so just open a support ticket and let us know the name of the Custom Application (listening on port) for which we should open the port in the firewall.

(13 Oct '13, 01:48) ryans ♦♦ ryans's gravatar image
showing 5 of 7 show 2 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 04 May '11, 21:55

question was seen: 4,527 times

last updated: 13 Oct '13, 01:48

Features & prices    Sign up    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
© Copyright 2003-2015 Swarma Limited - WebFaction is a service of Swarma Limited