使用命令lsoflsof -i tcp:[port]lsof -i tcp:18081java 5237 TCP *:18081 (LISTEN)发现5273占用18081kill 5237再查一下lsof -i tcp:18081正常什么都没有就杀掉了。