问题描述:
在使用IDEA进行maven项目开发时,使用内置Tomcat进行启动项目,但经常会出现端口占用情况
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:start (default-cli) on project dmj-spider-web: Cannot invoke Tomcat manager:[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] After correcting the problems, you can resume the build with the command
原因分析:
这是Tomcat端口占用的表现,所以我们只需要在终端执行端口关闭命令即可
解决方案:
在终端输入命令(注意端口号,我是8088):lsof -i:8088
之后输入: kill -9 903 这里的903就是Tomcat在使用的pid
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/13678.html