Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node won't listen on Windows 2012R2 #10957

Closed
DaveInMaine opened this issue Jan 23, 2017 · 4 comments
Closed

Node won't listen on Windows 2012R2 #10957

DaveInMaine opened this issue Jan 23, 2017 · 4 comments
Labels
net Issues and PRs related to the net subsystem. question Issues that look for answers. windows Issues and PRs related to the Windows platform.

Comments

@DaveInMaine
Copy link

Version: v6.9.4
Platform: Windows Server 2012 R2
Subsystem: Http

For some reason, http module will not listen on port 80 (or https module on 443), even though the ports are available, and can be used by other software without any trouble. I've posted details on
serverfault, but so far no replies. Error message is "events.js:160 Error: listen EACCES xx.xx.xx.xx:80". I have tried all the usual things to identify ports in use, even stopped IIS and everything else on the server, but node http will never allow connect/listen on port 80 of any of the 5 available IP addresses. Any other free port will connect fine - 79, 81, 444 etc. Similarly, https will never listen on port 443.

I also see an issue here that I thought might be somehow related: "Strange behavior specific to Windows 2012r2 with a single processor #4358", since that is the precise configuration that I have the trouble on. Other Windows machines work as expected - free ports listen as expected, ports in use cannot listen. It is only the 2012R2 server (single CPU) that shows the problem where port 80 will never listen. It makes no sense to me, but maybe the problem I am seeing is somehow related to this #4358, where certain events didn't fire as expected on Win 2012?

@mscdex mscdex added net Issues and PRs related to the net subsystem. windows Issues and PRs related to the Windows platform. labels Jan 23, 2017
@mscdex
Copy link
Contributor

mscdex commented Jan 23, 2017

If you are getting EACCES, are you sure your Windows user account has sufficient privileges to listen on lower ports like that?

@mscdex mscdex added the question Issues that look for answers. label Jan 23, 2017
@DaveInMaine
Copy link
Author

I also tried running node "as Administrator", so it should have all the privileges it needs. And it will listen on ports 79 or 81 just fine.

@bnoordhuis
Copy link
Member

Your problem is almost certainly caused by something like a virus scanner or Windows Service Hardening prohibiting node to bind to the port. The EACCES error comes directly from the operating system, libuv/node only passes it on.

@DaveInMaine
Copy link
Author

No virus scanner, Windows firewall off. I thought the Service Hardening was actually only for registered services, but will look into that more. It is something along those lines.

EACCES error comes directly from the operating system

Good, that helps. I have since confirmed it is an OS level issue, and not node, by duplicating the problem in a php script using socket_create/socket_bind. Php also can bind anywhere but port 80/443. So, at least now I have a direction to look in. Thanks for the help. Sorry to bother you with the false alarm, but after seeing that #4358 issue, I thought it might be worth a shot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Issues and PRs related to the net subsystem. question Issues that look for answers. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

3 participants