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

Tomcat deployment fails when using deploy plugin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Component/s: deploy-plugin
    • Labels:
      None
    • Environment:
      ubuntu 16.04
    • Similar Issues:

      Description

      getting below errors when using deploy to container plugin to tomcat 8

       
      ERROR: Build step failed with exception
      org.codehaus.cargo.container.ContainerException: Failed to redeploy [/var/lib/jenkins/workspace/divya_deploy/sample.war]
      at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:192)
      at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:77)
      at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:147)
      at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:117)
      at hudson.FilePath.act(FilePath.java:1075)
      at hudson.FilePath.act(FilePath.java:1058)
      at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:114)
      at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeploy(PasswordProtectedAdapterCargo.java:93)
      at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:64)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      at hudson.model.Build$BuildExecution.post2(Build.java:186)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      at hudson.model.Run.execute(Run.java:1841)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Caused by: java.io.FileNotFoundException:
      http://192.168.0.102:8080/manager/text/list
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1890)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
      at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:571)
      at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:876)
      at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:889)
      at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:173)
      ... 17 more
      java.io.FileNotFoundException:
      http://192.168.0.102:8080/manager/text/list
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1890)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
      at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:571)
      at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:876)
      at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:889)
      at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:173)
      at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:77)
      at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:147)
      at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:117)
      at hudson.FilePath.act(FilePath.java:1075)
      at hudson.FilePath.act(FilePath.java:1058)
      at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:114)
      at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeploy(PasswordProtectedAdapterCargo.java:93)
      at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:64)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      at hudson.model.Build$BuildExecution.post2(Build.java:186)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      at hudson.model.Run.execute(Run.java:1841)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Build step 'Deploy war/ear to a container' marked build as failure
      Finished: FAILURE

        Attachments

          Issue Links

            Activity

            Hide
            jansohn Robin Jansohn added a comment -

            Closing due to inactivity. Seems to be a configuration problem anyway. Nothing to fix in the plugin code.

            Show
            jansohn Robin Jansohn added a comment - Closing due to inactivity. Seems to be a configuration problem anyway. Nothing to fix in the plugin code.
            Hide
            kamydur Karthik Mydur added a comment -

            HI divya P

            Even I was facing the same issue, please first ensure whether you can access the manager-gui, if not follow the below instruction to enable the access and also add "manager-script" access to the role like below.

            <user username="admin" password="admin" roles="manager-gui,admin-gui,manager-script"/>

            and add the admin credentials in configuration. {ref. screenshot}

            https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04

            in the above link follow the Step -7 

             

             

            Show
            kamydur Karthik Mydur added a comment - HI divya P Even I was facing the same issue, please first ensure whether you can access the manager-gui, if not follow the below instruction to enable the access and also add "manager-script" access to the role like below. <user username="admin" password="admin" roles="manager-gui,admin-gui,manager-script"/> and add the admin credentials in configuration. {ref. screenshot} https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04 in the above link follow the Step -7     
            Hide
            sudheer_petluri sudheer petluri added a comment -

            Please check java and tomcat servers. Please check firewall ports or opened not.
            For me i tried this. It will be successes. Try it.

            Show
            sudheer_petluri sudheer petluri added a comment - Please check java and tomcat servers. Please check firewall ports or opened not. For me i tried this. It will be successes. Try it.
            Hide
            jyothibasu1k jyothibasu k added a comment -

            Hi anyone got the solution for this issue?

            [INFO] BUILD SUCCESS
            [INFO] ------------------------------------------------------------------------
            [INFO] Total time: 3.561 s
            [INFO] Finished at: 2020-06-20T16:39:06Z
            [INFO] ------------------------------------------------------------------------
            [DeployPublisher][INFO] Attempting to deploy 1 war file(s)
            [DeployPublisher][INFO] Deploying /var/lib/jenkins/workspace/freecijob/webapp/target/webapp.war to container Tomcat 8.x Remote with context qaenv
            ERROR: Build step failed with exception
            org.codehaus.cargo.container.ContainerException: Failed to redeploy [/var/lib/jenkins/workspace/freecijob/webapp/target/webapp.war]
            at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:188)
            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:1075)
            at hudson.FilePath.act(FilePath.java:1058)
            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 hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
            at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
            at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
            at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
            at hudson.model.Build$BuildExecution.post2(Build.java:186)
            at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
            at hudson.model.Run.execute(Run.java:1905)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:428)
            Caused by: java.io.FileNotFoundException:
            http://54.157.145.236:8080/manager/text/list
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1896)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:577)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895)
            at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169)
            ... 18 more
            java.io.FileNotFoundException:
            http://54.157.145.236:8080/manager/text/list
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1896)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:577)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895)
            at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169)
            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:1075)
            at hudson.FilePath.act(FilePath.java:1058)
            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 hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
            at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
            at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
            at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
            at hudson.model.Build$BuildExecution.post2(Build.java:186)
            at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
            at hudson.model.Run.execute(Run.java:1905)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:428)
            Build step 'Deploy war/ear to a container' marked build as failure
            Finished: FAILURE

            Show
            jyothibasu1k jyothibasu k added a comment - Hi anyone got the solution for this issue? [INFO [m] BUILD SUCCESS [INFO [m] ------------------------------------------------------------------------ [INFO [m] Total time: 3.561 s [INFO [m] Finished at: 2020-06-20T16:39:06Z [INFO [m] ------------------------------------------------------------------------ [DeployPublisher] [INFO] Attempting to deploy 1 war file(s) [DeployPublisher] [INFO] Deploying /var/lib/jenkins/workspace/freecijob/webapp/target/webapp.war to container Tomcat 8.x Remote with context qaenv ERROR: Build step failed with exception org.codehaus.cargo.container.ContainerException: Failed to redeploy [/var/lib/jenkins/workspace/freecijob/webapp/target/webapp.war] at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:188) 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:1075) at hudson.FilePath.act(FilePath.java:1058) 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 hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1905) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) Caused by: java.io.FileNotFoundException: http://54.157.145.236:8080/manager/text/list at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1896) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:577) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895) at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169) ... 18 more java.io.FileNotFoundException: http://54.157.145.236:8080/manager/text/list at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1896) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:577) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895) at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169) 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:1075) at hudson.FilePath.act(FilePath.java:1058) 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 hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1905) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) Build step 'Deploy war/ear to a container' marked build as failure Finished: FAILURE
            Hide
            divyap divya P added a comment -

            again i am getting same credentials error
            Started by user unknown or anonymous
            Running as SYSTEM
            Building in workspace /root/.jenkins/workspace/auto
            [auto] $ /bin/sh -xe /tmp/jenkins2468471969922371506.sh
            + date
            Fri Aug 16 16:43:20 IST 2019
            [DeployPublisher][INFO] Attempting to deploy 1 war file(s)
            [DeployPublisher][INFO] Deploying /root/.jenkins/workspace/auto/sample.war to container Tomcat 8.x Remote with context sample.war
            ERROR: Build step failed with exception
            org.codehaus.cargo.container.ContainerException: Failed to redeploy [/root/.jenkins/workspace/auto/sample.war]
            at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:184)
            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 hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:79)
            at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
            at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
            at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
            at hudson.model.Build$BuildExecution.post2(Build.java:186)
            at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
            at hudson.model.Run.execute(Run.java:1843)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:429)
            Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The username and password you provided are not correct (error 401)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:704)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895)
            at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169)
            ... 18 more
            Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL:
            http://192.168.0.102:8080/manager/text/list
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:577)
            ... 21 more
            org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The username and password you provided are not correct (error 401)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:704)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895)
            at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169)
            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 hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:79)
            at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
            at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
            at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
            at hudson.model.Build$BuildExecution.post2(Build.java:186)
            at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
            at hudson.model.Run.execute(Run.java:1843)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:429)
            Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL:
            http://192.168.0.102:8080/manager/text/list
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
            at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:577)
            ... 21 more
            Build step 'Deploy war/ear to a container' marked build as failure
            Finished: FAILURE
             

            Show
            divyap divya P added a comment - again i am getting same credentials error Started by user unknown or anonymous Running as SYSTEM Building in workspace /root/.jenkins/workspace/auto [auto] $ /bin/sh -xe /tmp/jenkins2468471969922371506.sh + date Fri Aug 16 16:43:20 IST 2019 [DeployPublisher] [INFO] Attempting to deploy 1 war file(s) [DeployPublisher] [INFO] Deploying /root/.jenkins/workspace/auto/sample.war to container Tomcat 8.x Remote with context sample.war ERROR: Build step failed with exception org.codehaus.cargo.container.ContainerException: Failed to redeploy [/root/.jenkins/workspace/auto/sample.war] at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:184) 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 hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:79) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1843) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The username and password you provided are not correct (error 401) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:704) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895) at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169) ... 18 more Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://192.168.0.102:8080/manager/text/list at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:577) ... 21 more org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The username and password you provided are not correct (error 401) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:704) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895) at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169) 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 hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:79) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1843) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://192.168.0.102:8080/manager/text/list at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:577) ... 21 more Build step 'Deploy war/ear to a container' marked build as failure Finished: FAILURE  

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              divyap divya P
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: