在Eclipse下run maven tomcat7:deploy出現connection reset by peer錯誤

Vincent787 2014-08-31 12:25:17
Maven version: 3.2.2
Tomcat version: 7
Java: 1.7 update 65
Eclipse是Eclipse Luna

我在Eclipse里建立一個Maven Project, Project Facets是 Dynamic Web Module是3.1, Java是1.7,JavaScript是1.0。然後我嘗試run maven tomcat7:deploy的時候出現以下錯誤

[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SpringMavenJ2EE 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.2:deploy (default-cli) @ SpringMavenJ2EE >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SpringMavenJ2EE ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ SpringMavenJ2EE ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SpringMavenJ2EE ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ SpringMavenJ2EE ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ SpringMavenJ2EE ---
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) @ SpringMavenJ2EE ---
[INFO] Packaging webapp
[INFO] Assembling webapp [SpringMavenJ2EE] in [D:\J2EEBackup\SpringMavenJ2EE\target\SpringMavenJ2EE-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [D:\J2EEBackup\SpringMavenJ2EE\src\main\webapp]
[INFO] Webapp assembled in [96 msecs]
[INFO] Building war: D:\J2EEBackup\SpringMavenJ2EE\target\SpringMavenJ2EE-0.0.1-SNAPSHOT.war
[INFO] WEB-INF\web.xml already added, skipping
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.2:deploy (default-cli) @ SpringMavenJ2EE <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ SpringMavenJ2EE ---
[INFO] Deploying war to http://localhost:8080/SpringMavenJ2EE-0.0.1-SNAPSHOT
Uploading: http://localhost:8080/manager/text/deploy?path=%2FSpringMavenJ2EE-0.0.1-SNAPSHOT

[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2FSpringMavenJ2EE-0.0.1-SNAPSHOT

[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2FSpringMavenJ2EE-0.0.1-SNAPSHOT

[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2FSpringMavenJ2EE-0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.358 s
[INFO] Finished at: 2014-08-30T23:42:29-05:00
[INFO] Final Memory: 15M/168M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project SpringMavenJ2EE: Cannot invoke Tomcat manager: Connection reset by peer: socket write error -> [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


由此可見,WAR文件已經生成,如果我手動配置到Tomcat的話一點問題都沒有,就不知道為什麼在Eclipse里或者用command line是掐住了

Google了好多答案,但無果...看看這裡有無大神求教
...全文
4313 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
auerjds 2017-03-22
  • 打赏
  • 举报
回复
不明白为什么,但是5楼解决了问题,可能就是tomcat7管理发布项目的路径是http://localhost:8080/manager/text
huya-wanghg 2017-03-18
  • 打赏
  • 举报
回复
#5正解 谢谢
z282762779 2016-06-13
  • 打赏
  • 举报
回复
访问tomcat的权限不够
幸苦的程序元 2016-04-08
  • 打赏
  • 举报
回复
解决了没,我搞了好久还是没弄出来,请会的大神赐教
qq_25507597 2015-01-22
  • 打赏
  • 举报
回复
解决了没有啊...
qq_25507597 2015-01-22
  • 打赏
  • 举报
回复
看看这个吧,也许有帮助 http://stackoverflow.com/questions/26356477/tomcat-7-connection-reset-by-peer-or-software-caused-connection-abort 我是把配置文件中的plugin下边的<url>http://localhost:8080/manager/html</url>换成了<url>http://localhost:8080/manager/text</url>问题解决了
tangjiean 2014-12-13
  • 打赏
  • 举报
回复
这个问题解决了没
adongsha 2014-12-08
  • 打赏
  • 举报
回复
我也遇到,最后怎么解决的请教下
junlianyao 2014-12-06
  • 打赏
  • 举报
回复
我也遇到同样的问题,环境跟你一样!

10,607

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 其他
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧