Maven项目在Maven Build启动的时候出现:Address already in use: JVM_Bind<null>:8080
ERROR如下:
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat6-maven-plugin:2.2:run (default-cli) on project taotao-manager-web: Could not start Tomcat: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind <null>:8080
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :taotao-manager-web
[ERROR] mvn <goals> -rf :taotao-manager-web
截图如下:
看了网上很多教程:比如说Kill掉端口号之类的,但是不能根本解决问题。
于是我开始思考,既然端口号被占用,那是不是没有关闭tomcat,导致的冲突。
后来发现,还真的是啊!
正确做法:
点击上面图中,第一行Debug旁边的红色停止键,再次重新启动,问题就解决了。
如果红色停止键无法点击,则可能是需要先点击红色停止键旁边的X,再点红色停止键