node.js express socket.io port 3000 in use

后端 未结 8 448
南笙
南笙 2021-02-02 16:33

I\'ve been following this(http://socket.io/get-started/chat/) tutorial on how to make a simple chat application using socket.io.

I tried to however use Express to create

8条回答
  •  清歌不尽
    2021-02-02 17:15

    I had (forgotten that I had) previously installed ntop, which by default also uses port 3000, and was therefore getting the same error as described here.

    As others have mentioned, use netstat or lsof to find the offending service (and prefix the command with sudo, to get the correct process name):

    sudo lsof -P | grep ':3000'
    

    - or -

    sudo netstat -anp tcp | grep 3000
    

    On Ubuntu, the service is disabled with (simply):

    service ntop stop
    

提交回复
热议问题