Search code examples
javascriptnode.jsportwindows-server-2012-r2

what is 'Error: listen EACCES 0.0.0.0:7090'?


I'm doing to run nodejs server on windows server 2012. App port is 7090. This is part of the server.js file:

var port    = process.env.PORT || 7090;
app.listen(port, function() {
  console.log('Listening on port ' + port);
});

When I run it with node server.js ,I get this error:

Error: listen EACCES 0.0.0.0:7090
    at Object.exports._errnoException (util.js:1008:11)
    at exports._exceptionWithHostPort (util.js:1031:20)
    at Server._listen2 (net.js:1240:19)
    at listen (net.js:1289:10)
    at Server.listen (net.js:1385:5)
    at EventEmitter.listen (D:\STH\node_modules\express\lib\application.js:617:24)
    at Object.<anonymous> (D:\STH\app.js:26:5)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)

​It works when I change port to any other numbers except 7090.

Error: listen EACCES 0.0.0.0:7090 I know already, that the Error EACCES means that i don't have access rights to the port 7090 according to this question, but i don't know how to fix this. Any help much appreciated!


Solution

  • Issue fixed! That port is already listening by IISNode unexpectedly. I just deleted it and now ok to run on port 7090.