小编Vai*_*xit的帖子

java.net.socketexception连接重置由对等套接字写入错误通过Jenkins在Tomcat7上部署war(使用Maven)

我试图通过Jenkins在tomcat7上部署基于maven的web项目.当我尝试从我的命令提示符执行maven目标"mvn tomcat7:deploy"时,它运行良好并在运行tomcat7实例上部署应用程序.现在我在Jenkins上为相同的项目设置了一个Job,并收到套接字错误.下面是我的代码和Jenkins控制台的堆栈跟踪.

在POM.xml中输入

<plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.2</version>
        <configuration>
            <url>http://localhost:8080/manager/text</url>
            <server>Tomcat7Server</server>
            <path>/ElecnorMPR</path>
        </configuration>
    </plugin>
Run Code Online (Sandbox Code Playgroud)

Apache Maven Settings.xml

<server>
  <id>Tomcat7Server</id>
  <username>tomcat</username>
  <password>tomcat</password>
</server>
Run Code Online (Sandbox Code Playgroud)

已经在tomcat-user.xml中定义了用户.

    [DEBUG] Connection 0.0.0.0:51036<->127.0.0.1:8080 closed
[DEBUG] Closing the connection.
[DEBUG] Connection 0.0.0.0:51036<->127.0.0.1:8080 closed
[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[DEBUG] Connection reset by peer: socket write error

    java.net.SocketException: Connection reset by peer: socket write error
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
        at org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:181)
        at org.apache.http.impl.conn.LoggingSessionOutputBuffer.write(LoggingSessionOutputBuffer.java:73)
        at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:115)
        at org.apache.tomcat.maven.common.deployer.TomcatManager$RequestEntityImplementation.writeTo(TomcatManager.java:880) …
Run Code Online (Sandbox Code Playgroud)

java java-ee maven-3 tomcat7 jenkins

5
推荐指数
1
解决办法
1875
查看次数

标签 统计

java ×1

java-ee ×1

jenkins ×1

maven-3 ×1

tomcat7 ×1