Tomcat 7:由对等方或软件重置连接导致连接中止 [英] Tomcat 7: Connection reset by peer or Software caused connection abort

查看:491
本文介绍了Tomcat 7:由对等方或软件重置连接导致连接中止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试部署Java应用程序时遇到问题。

I have a problem when I'm trying to deploy Java-application.

Cannot invoke Tomcat manager: Connection reset by peer: socket write error

Cannot invoke Tomcat manager: Software caused connection abort: socket write error

pom.xml 中我有:

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.2</version>
    <configuration>
        <url>http://localhost:8085/manager/html</url>
        <server>tomcat7</server>
        <path>/java_web</path>
        <username>admin</username>
        <password>admin</password>
    </configuration>
</plugin>

tomcat-users.xml 中我有:

 <tomcat-users>
     <role rolename="admin"/>
     <role rolename="manager-script"/>
     <role rolename="manager-gui"/>
     <role rolename="manager-jmx"/>
     <user username="admin" password="admin" roles="manager-gui,admin,manager-jmx,manager-script" />
 </tomcat-users>

同样在 Maven / conf / settings.xml 我有:

<server>
    <id>tomcat7</id>
    <username>admin</username>
    <password>admin</password>
</server>

当我想去

http://localhost:8085/manager/html/deploy?path=%2Fjava_web&update=true

并输入用户名和密码(admin admin)我有错误:

and input username and password (admin admin) I have error:

403 Access Denied
You are not authorized to view this page.

但是我输入了 tomcat-users.xml 用户管理员有经理-gui角色。
我正在使用Tomcat 7.0.56和Jenkins。还使用命令:clean和tomcat7-redeploy。
需要帮助才能理解错误:C

But I typed in tomcat-users.xml that user admin has manager-gui role. I'm using Tomcat 7.0.56 and Jenkins. Also use commands: clean and tomcat7-redeploy. Need help to understand what is wrong:C

推荐答案

在我的情况下设置看起来不错,但我已经有了相同的webapp上传到tomcat并且未指定

In my case settings looked ok, but I already had the same webapp uploaded to tomcat and hadn't specified

<update>true</update>

在pom.xml中的tomcat插件中,因此maven无法在现有的上面添加新的webapp运行webapp。

in tomcat plugin in pom.xml, thus maven couldn't upload new webapp on top of existing and running webapp.

所以考虑一下。

这篇关于Tomcat 7:由对等方或软件重置连接导致连接中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆