Socket error: Address already in use

后端 未结 3 1864
醉梦人生
醉梦人生 2021-02-02 03:55

I have a CherryPy script that I frequently run to start a server. Today I was having to start and stop it a few times to fix some bugs in a config file, and I guess the socket

3条回答
  •  心在旅途
    2021-02-02 04:07

    You could find the process and kill it by doing:

    ps aux | grep python
    

    , finding the process ID, and stopping it manually by doing:

    sudo kill -9 PID
    

    replacing PID with your PID.

    I often have to do this while testing with Flask/CherryPy. Would be interested to see if there's an easier way (for e.g. to prevent it in the first place)

提交回复
热议问题