Tomcat 启动端口冲突异常

项目发布时,控制台输入了下面的异常、

严重: StandardServer.await: create[8005]: 
java.net.BindException: Address already in use: JVM_Bind
        at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.(ServerSocket.java:185)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
at org.apache.catalina.startup.Catalina.await(Catalina.java:630)
at org.apache.catalina.startup.Catalina.start(Catalina.java:590)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catal ina.startup.Bootstrap.main(Bootstrap.java:413)

分析,这是因为当前tomcat的端口已经有一个进程在使用.如果不改Tomcat 的配置文件server.xml可以去手动终止该进程.
1. cmd
2. netstat -ano 
Tomcat 启动端口冲突异常_第1张图片

3.终止进程号是5288 (/F强制停止)
taskkill /F /PID 5288


注:也可以更改端口


你可能感兴趣的:(异常记录)