linux通过进程PID查询占用端口
解决方法:
执行:netstat -antup|grep 20532
结果:
[root@xxx ~]# netstat -antup|grep 20532
tcp6 0 0 :::8084 :::* LISTEN 20532/java
tcp6 0 0 192.188.0.121:41619 192.188.0.261:3306 ESTABLISHED 20532/java
tcp6 0 0 192.188.0.121:47124 192.188.0.261:6379 ESTABLISHED 20532/java
可见20532的进程占用了:8084端口