run node.js webbapp on 80 port on windows
Solution 1
On windows machine you 80 port probably busy with IIS Server. Try to stop iis first and after run node.js webapp with port 80.
Solution 2
IIS on 80 port is definitely issue. And instead of turning it of you can try IIS node. http://www.hanselman.com/blog/InstallingAndRunningNodejsApplicationsWithinIISOnWindowsAreYouMad.aspx Probably you don't need port 80 in local development at all, but if you go in production on Windows machine IIS Node is good choice to load balance.
Solution 3
I had this issue also on my Windows 10 PC.
I followed the command on this link (net stop http
): https://stackoverflow.com/a/16243333 in a Command Prompt that I opened up as administrator and got this output:
C:\Users\<user>\Documents\project>net stop http
The following services are dependent on the HTTP Service service. Stopping the HTTP Service service will also stop these services.
World Wide Web Publishing Service
SSDP Discovery
Print Spooler
Function Discovery Provider Host
Do you want to continue this operation? (Y/N) [N]: y
The World Wide Web Publishing Service service is stopping.
The World Wide Web Publishing Service service was stopped successfully.
The SSDP Discovery service is stopping.
The SSDP Discovery service was stopped successfully.
The Print Spooler service is stopping.
The Print Spooler service was stopped successfully.
The Function Discovery Provider Host service is stopping.
The Function Discovery Provider Host service was stopped successfully.
The HTTP Service service was stopped successfully.
C:\Users\<user>\Documents\project>
I then did npm start
again on another command prompt where I'm not running it as Administrator, and got this Error Dialogue
I clicked ok to close it and just typed localhost
on my browser and my app launched!
What is weird is that I went back to the TaskManager -> Services tab, and I restarted all four services that were stopped. In the screen shot below you can see one of the services that was stopped before (look at the Description column), but now restarted:
But now when I run npm start
my node app does get launched still.
So it does seem a little weird for me, that before I stopped those services I couldn't launch my app. After stopping them I now can launch my app. But I can still launch my app even after restarting those services.
Solution 4
Sigh - i just found out that SKYPE.EXE was lurking on my ports 80 and 443. Use netstat -anb
to see what might be blocking node.exe from accepting sockets on those ports...
Related videos on Youtube
silent_coder
Updated on October 19, 2020Comments
-
silent_coder over 3 years
I need to make my local node.js webapp listen 80 port. Now if run my app on port 80 I get this erro
events.js:72 throw er; // Unhandled 'error' event ^ Error: listen EACCES at errnoException (net.js:901:11) at Server._listen2 (net.js:1020:19) at listen (net.js:1061:10) at Server.listen (net.js:1127:5) at Object.<anonymous> (\scripts\server.js:23:4) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10)
And if run app on 4321 port this error do not reproduced, so it's port depending.
What should I do to be able run my app on port 80 on Windows 7
-
Ninja Coding over 6 yearscan you provide, how exactly you did stop IIS Server?