How to fix Error: listen EADDRINUSE while using nodejs?

前端 未结 30 3804
执念已碎
执念已碎 2020-11-22 06:44

If I run a server with the port 80, and I try to use xmlHTTPrequest i get this error: Error: listen EADDRINUSE

Why is it problem for nodejs, if I want t

30条回答
  •  日久生厌
    2020-11-22 07:12

    This error comes when you have any process running on a port on which you want to run your application.

    how to get which process running on that port=> command: sudo netstat -ap | grep :3000

    output : you will get the process information which is using that port

    tcp 0 0 IPaddress:3000 : LISTEN 26869/node

    Now you can kill that process sudo kill -9 26869

提交回复
热议问题