Maven部署web应用war包到Tomcat 出现 I/O exception (java.net.SocketException) caught when processing request:

报错信息如下:
Uploading: http://localhost:8090/manager/text/deploy?path=%2Ftest&update=true

[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: http://localhost:8090/manager/text/deploy?path=%2Ftest&update=true

[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: http://localhost:8090/manager/text/deploy?path=%2Ftest&update=true

[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: http://localhost:8090/manager/text/deploy?path=%2Ftest&update=true

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.959 s
[INFO] Finished at: 2017-10-17T16:48:59+08:00
[INFO] Final Memory: 15M/271M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:redeploy (default-cli) on project test: 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


查询网络后得知是Tomcat权限问题,然后我查看Tomcat用户权限配置:

  
  
  
  
  
  
明显不是默认的配置,可能是我之前有做测试修改过。

后来我把默认的一些角色加进去然后测试。。。。还是有报错,没有解决问题。

随后我思考到底是什么原因呢,猛然意识到我的Tomcat在eclipse中的配置默认部署位置是

这样的话manager这个项目在这个目录是不存在的

so 改为Tomcat安装目录再次运行就没有问题了


你可能感兴趣的:(maven,Tomcat,eclipse)