admin管理员组文章数量:1419633
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._pile (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!
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._pile (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!
Share Improve this question asked Aug 8, 2017 at 11:02 Nyi NyiNyi Nyi 9767 silver badges13 bronze badges 3- Is something already listening on 7090? – OrangeDog Commented Aug 8, 2017 at 11:04
- Netsh http add urlacl – Lux Commented Aug 8, 2017 at 11:04
- My guess is that you're running some sort of antivirus or firewall that is blocking your Node app from listening on port 7090. – robertklep Commented Aug 8, 2017 at 11:10
4 Answers
Reset to default 1this means that something else (probably your app) is already running on that port. Maybe you run it in background or as another user and can't restore it right now. You can look up who is using the port by using netstat on windows server: https://technet.microsoft./en-us/library/ff961504(v=ws.11).aspx
lsof -i:7090
Find the PID then
kill -9 PID
Issue fixed! That port is already listening by IISNode unexpectedly. I just deleted it and now ok to run on port 7090.
While I was trying to run node app on server I got the same issue, but fortunately after did little search I found the solution And I used node mand as a superuser, It was so simple, I know the questioner got the answer but hope this will help to some other folks.
sudo node your_app_name.js
本文标签: javascriptwhat is 39Error listen EACCES 0000709039Stack Overflow
版权声明:本文标题:javascript - what is 'Error: listen EACCES 0.0.0.0:7090'? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745315879a2653151.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论