WebFaction
Community site: login faq

I'm playing around with Node.js and socket.io and my application doesn't seem to like to be hosted on a particular port which I had opened up on my dedicated IP address for this purpose (we'll call it port 12345).

If I use port 12345 for even one of the sample socket.io applications, it gives me this in the console:

info  - socket.io started
warn  - error raised: Error: listen EACCES

If I use other ports (even adding or subtracting one to the desired port - such as 12344 or 12346) it seems to work with my socket.io application (no error), except those ports aren't accessible to any remote connections. Is there a way I can tell what is running on a specific port and stop/remove/ask support about it, or do I need to get another port opened up?

asked 10 Mar '13, 16:09

pope
313
accept rate: 0%

edited 10 Mar '13, 16:11


To see what application and its PID I use this command,

netstat -antuwp | egrep "(^[^t])|(^tcp.*LISTEN)" | grep --color=auto -n XXXX

Where XXXX is the port number you are looking for, it will have output which look like this,

3:tcp        0      0 0.0.0.0:10305               0.0.0.0:*                   LISTEN      18957/python

You could than kill the app if it is still running with like this,

kill -9 18957

If you need remote access on this port you must contact us with a support ticket so we can open the port in the firewall.

permanent link

answered 10 Mar '13, 18:00

johns
5.3k312
accept rate: 23%

Thanks, it turned out to be a typo in my application code. I was using weird port numbers because of it and this helped me see that right away.

(10 Mar '13, 20:49) pope

if the node.js socket is 21095 and you are getting EADDRINUSE error: type this

fuser -k 21095/tcp (kills process using that socket)

Then run your ./bin/node tcp_server.js and the prompt should be sitting there listening

permanent link

answered 07 Mar '15, 03:13

d3nd0g69
113
accept rate: 0%

edited 07 Mar '15, 03:15

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×67
×19
×8

question asked: 10 Mar '13, 16:09

question was seen: 3,432 times

last updated: 07 Mar '15, 03:15

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM