How to fix Error: listen EADDRINUSE while using nodejs
If I run a server with the port 80,and I try to use?xmlHTTPrequest?i get this error:? Why is it problem for nodejs,if I want to do a request,while I run a server on the port 80? For the webbrowsers it is not a problem: I can surf on the internet,while the server is running. The server is: net.createServer(function (socket) { socket.name = socket.remoteAddress + ":" + socket.remotePort; console.log(‘connection request from: ‘ + socket.remoteAddress); socket.destroy(); }).listen(options.port);
And the request:
So,in your case,there must be running a server on port 80 already. If you have another webserver running on this port you have to put node.js behind that server and proxy it through it. You should check for the?
解决方案: What really helped for me was: killall -9 node But this will kill a system process. With ps ax you can check if it worked. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |