端口号占用

在虚拟机docker容器中启动tomcat报Error response from daemon: driver failed programming external connectivity on endpoint tomcat (56eca236c90a43fb3a69de67ea3e86d8eab2193db2590d905d18c0acec996557): Error starting userland proxy: listen tcp 0.0.0.0:8080: bind: address already in use 这类错误解决方法如下:(亲测有效)

1、重启docker服务

systemctl restart docker

2、开启tomcat

docker start tomcat

3、在命令行直接查看占用端口的进程

netstat -ntulp | grep 8080

4、杀死进程

kill -9 xxxxx  (显示出的PID)

5、启动tomcat、操作和2一样

你可能感兴趣的:(端口号占用)