grep
grep

Reputation: 4016

node.js server port not working

So I am creating a simple server test on my Centos 5.x box and I am having troubles getting node.js to respond on my port:

var http = require("http");

http.createServer(function(request, response) {
  response.writeHead(200, {"Content-Type": "text/plain"});
  response.write("Hello World");
  response.end();
}).listen(8888);

This is the standard copy/pasta test. I had it working last night, and it has since stopped working. I am running this out of /home/user/nodejs and do not get any compilation errors. There are no other node processes running either. Any ideas as to what could have happened between then and now? Any known quirky nodejs problems that may be associated with this?

edits:

RHEL / Centos 5.8 / node v0.6.15

Upvotes: 0

Views: 3581

Answers (2)

Kishore Padmanaban
Kishore Padmanaban

Reputation: 117

I have disabled the firewall and it is working.

Upvotes: 0

Mike Huang
Mike Huang

Reputation: 257

Have you tried to close the firewall?

Upvotes: 3

Related Questions