user3169790
user3169790

Reputation: 175

Socket.io server not working

I've got a Socket.io server that is not working (it shows the following error on Firebug and of course it doesn't any of its functions):

GET http://www.example.com:1618/socket.io/1/?t=1401400488401 400 Bad Request 35ms

Also, when I try to run the server, it outputs that:

events.js:72
    throw er; // Unhandled 'error' event
          ^
Error: listen EADDRINUSE
 at errnoException (net.js:904:11)
 at Server._listen2 (net.js:1042:14)
 at listen (net.js:1064:10)
 at net.js:1146:9
 at asyncCallback (dns.js:68:16)
 at Object.onanswer [as oncomplete] (dns.js:121:9)

I am running it on Ubuntu 14.04

Upvotes: 0

Views: 266

Answers (1)

Ben
Ben

Reputation: 5074

EADDRINUSE means that there is another process that is listening to the port you're using for socket.io. Try changing the port number for socket.io when listen() is called.

On ubuntu, you might need to run it with sudo:

sudo nodejs your_server.js

Upvotes: 1

Related Questions