0

I'm running a server-side application on a remote server, using a particular port - call this port 9000. Using a separate laptop, I've been able to telnet to a simple Java hello world TCP server and to access a HTTP server through my browser. These listened to port 9000 and were made using the standard Java libraries and com.sun.net.httpserver. However, when I use Node.js to create an application (i.e. server.listen(9000, 0.0.0.0)), I cannot connect to that application.

Is there something additional I should do to create a successfully listening HTTP server using Node.js? Any additional dependencies? As per above, assume there are no firewall issues between my laptop and my server.

For a larger context, the program I'm trying to run is etherpad-lite, which uses Node.js to create a server.

Matt
  • 303
  • 1
  • 2
  • 16
  • If the server is remote, why are you trying to connect on `0.0.0.0`? – Dancrumb Jul 29 '14 at 17:29
  • That is the server-side listening code I'm running, not client-side. On the client, I connect via the browser (e.g., "http://myservername:9000/"). – Matt Jul 29 '14 at 17:34

1 Answers1

0

Don't include the IP address of 0.0.0.0.

This is telling the server to only listen to requests to that 'hostname'.

Just use

server.listen(9000);
Dancrumb
  • 26,597
  • 10
  • 74
  • 130
  • Found the solution to my problem; apparently it was some firewall or permissions issue (I thought I got rid of all of those). Whether I listen using `server.listen(9000);` or `server.listen(9000,0.0.0.0);` doesn't seem to make a difference. – Matt Aug 20 '14 at 12:50
  • Nice. That's worth adding as an answer – Dancrumb Aug 20 '14 at 13:23