Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59068

SSL connection reset during deploy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: deploy-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.176.2
      deploy-plugin ver. 1.15
    • Similar Issues:

      Description

      JENKINS-44810 added support for Jenkins Pipeline and I'm trying to deploy with the following declarative pipeline:

      stage('Deploy') {
       steps {
           deploy adapters: [tomcat8(credentialsId: 'tomcat-dev', path: '/', url: "https://localhost:8080/manager/text" )], onFailure: false, war: 'target/ROOT.war'
       }
      } 

      and I'm getting:

      16:15:27    Deploying [/opt/jenkins/workspace/test/deploy/target/ROOT.war]
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // timestamps
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      Notified JIRA that a build has completed.
      org.codehaus.cargo.container.ContainerException: Failed to deploy [/opt/jenkins/workspace/test/deploy/target/ROOT.war]
      	at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:108)
      	at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:180)
      	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81)
      	at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167)
      	at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:136)
      	at hudson.FilePath.act(FilePath.java:1076)
      	at hudson.FilePath.act(FilePath.java:1059)
      	at hudson.plugins.deploy.CargoContainerAdapter.redeployFile(CargoContainerAdapter.java:133)
      	at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeployFile(PasswordProtectedAdapterCargo.java:95)
      	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:113)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset
      	at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1541)
      	at sun.security.ssl.AppInputStream.read(AppInputStream.java:95)
      	at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
      	at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
      	at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
      	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:735)
      	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1569)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
      	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
      	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
      	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:581)
      	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:767)
      	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:312)
      	at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:99)
      	... 17 more
      Caused by: javax.net.ssl.SSLException: java.net.SocketException: Connection reset
      	at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
      	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
      	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1906)
      	at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1870)
      	at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1815)
      	at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:128)
      	at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
      	at java.io.PrintStream.write(PrintStream.java:480)
      	at sun.net.www.http.ChunkedOutputStream.flush(ChunkedOutputStream.java:145)
      	at sun.net.www.http.ChunkedOutputStream.write(ChunkedOutputStream.java:237)
      	at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3507)
      	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
      	at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
      	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.pipe(TomcatManager.java:827)
      	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:574)
      	... 20 more
      Caused by: java.net.SocketException: Connection reset
      	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115)
      	at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
      	at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:431)
      	at sun.security.ssl.OutputRecord.write(OutputRecord.java:417)
      	at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:876)
      	at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:847)
      	at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
      	... 29 more
      javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset
      	at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1541)
      	at sun.security.ssl.AppInputStream.read(AppInputStream.java:95)
      	at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
      	at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
      	at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
      	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:735)
      	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1569)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
      	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
      	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
      	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:581)
      	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:767)
      	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:312)
      	at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:99)
      	at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:180)
      	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81)
      	at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167)
      	at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:136)
      	at hudson.FilePath.act(FilePath.java:1076)
      	at hudson.FilePath.act(FilePath.java:1059)
      	at hudson.plugins.deploy.CargoContainerAdapter.redeployFile(CargoContainerAdapter.java:133)
      	at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeployFile(PasswordProtectedAdapterCargo.java:95)
      	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:113)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: javax.net.ssl.SSLException: java.net.SocketException: Connection reset
      	at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
      	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
      	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1906)
      	at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1870)
      	at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1815)
      	at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:128)
      	at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
      	at java.io.PrintStream.write(PrintStream.java:480)
      	at sun.net.www.http.ChunkedOutputStream.flush(ChunkedOutputStream.java:145)
      	at sun.net.www.http.ChunkedOutputStream.write(ChunkedOutputStream.java:237)
      	at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3507)
      	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
      	at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
      	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.pipe(TomcatManager.java:827)
      	at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:574)
      	... 20 more
      Caused by: java.net.SocketException: Connection reset
      	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115)
      	at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
      	at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:431)
      	at sun.security.ssl.OutputRecord.write(OutputRecord.java:417)
      	at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:876)
      	at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:847)
      	at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
      	... 29 more
      Finished: FAILURE
      

      2. There seems there is inconsistent behavior as Robin Jansohn suggested here to not include /manager/text in the *url* specification, but when I tried that, I'm getting error of the plugin trying to access **https://localhost:8080//** directly.

      3. The *onFailure* parameter is undocumented (with the help icon), it would be great to know what it means.

        Attachments

          Issue Links

            Activity

            Hide
            warden Radek Antoniuk added a comment -

            It turns out that Tomcat didn't have enough write permissions to the /webapps folder to overwrite the previous WAR file.

            Show
            warden Radek Antoniuk added a comment - It turns out that Tomcat didn't have enough write permissions to the /webapps  folder to overwrite the previous WAR file.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              warden Radek Antoniuk
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: