admin管理员组文章数量:1336593
I am developing webrtc application using node.js.When I run the mand 'node server.js' getting following error.
running on https://localhost:444
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EACCES 0.0.0.0:444
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at Server._listen2 (net.js:1246:19)
at listen (net.js:1295:10)`enter code here`
at Server.listen (net.js:1391:5)
at Object.<anonymous> (C:\Websites\WebRTC\server.js:16:63)
at Module._pile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
And my server.js is
var fs = require('fs'),
express = require('express'),
https = require('https'),
http = require('http');
var app = express();
app.use(express.static(__dirname));
http.createServer(app).listen(444);
console.log('running on https://localhost:444');
Thanks.
I am developing webrtc application using node.js.When I run the mand 'node server.js' getting following error.
running on https://localhost:444
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EACCES 0.0.0.0:444
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at Server._listen2 (net.js:1246:19)
at listen (net.js:1295:10)`enter code here`
at Server.listen (net.js:1391:5)
at Object.<anonymous> (C:\Websites\WebRTC\server.js:16:63)
at Module._pile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
And my server.js is
var fs = require('fs'),
express = require('express'),
https = require('https'),
http = require('http');
var app = express();
app.use(express.static(__dirname));
http.createServer(app).listen(444);
console.log('running on https://localhost:444');
Thanks.
Share Improve this question asked Mar 11, 2017 at 6:36 Amit SawantAmit Sawant 211 silver badge3 bronze badges 8- it's windows 10 – Amit Sawant Commented Mar 11, 2017 at 6:42
- 1 it's probably a permissions issue in windows as well - try running the mand prompt as an admin account – Jaromanda X Commented Mar 11, 2017 at 6:47
- I tried the same but still the same error.Also host my solution on windows server 2012 R2 IIS-8 but no change!. – Amit Sawant Commented Mar 11, 2017 at 9:12
- nothing wrong with your code - tried it, it works fine – Jaromanda X Commented Mar 11, 2017 at 9:13
-
try
netstat -anb
to see if anything is listening on port 444 already – Jaromanda X Commented Mar 11, 2017 at 9:18
1 Answer
Reset to default 8Listening on port below 1024 requires root access https://unix.stackexchange./questions/16564/why-are-the-first-1024-ports-restricted-to-the-root-user-only
Just run the app by prepending mand with sudo
sudo node server.js
本文标签: javascriptError listen EACCES 0000444 nodejs while listening on port 444443Stack Overflow
版权声明:本文标题:javascript - Error: listen EACCES 0.0.0.0:444 node.js while listening on port 444443 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742409830a2469562.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论