如果提示端口已经被占用:
probably another instance of uWSGI is running on the same address (:8002). bind(): Address already in use [core/socket.c line 764]
这时可以把相关的进程 kill 掉:
按照端口进行查询:
lsof -i :8002
可以查出:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME uwsgi 2208 tu 4u IPv4 0x53492abadb5c9659 0t0 TCP *:teradataordbms (LISTEN) uwsgi 2209 tu 4u IPv4 0x53492abadb5c9659 0t0 TCP *:teradataordbms (LISTEN)
这时根据 PID 可以用下面的命令 kill 掉相关程序:
sudo kill -9 2208 2209
按照程序名称查询:
ps aux | grep uwsgi