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

Failed to Deploy, task completed abnormally, exit code 1

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Labels:
      None
    • Environment:
      RHEL 6.5 64bit, Jenkins ver. 1.605, weblogic-deployer-plugin 2.13 (same issue with 2.8), jdk1.7 and jdk1.8.0_25
    • Similar Issues:

      Description

      On a few of our Jenkins builds, we get a deployment failure. There is no obvious reason as to why. I have compared the Jenkins config.xml from a job that does a successful deployment to a job that fails deployment, have made the settings the same, but with no successful deployment. We can copy and run the java command (/opt/buildjdks/jdk1.8.0_25/bin/java -Xms256M -Xmx1024M -cp /opt/weblogic-deployer/wlfullclient.jar weblogic.Deployer -debug -stage -remote -verbose -upload -name appname -source /opt/jenkins/jobs/appname-build-deploy-dev/modules/com.apps.appname$appname/builds/22/archive/com.apps.appname/appname/1.0.0-SNAPSHOT/appname-1.0.0-SNAPSHOT.war -targets devCluster -adminurl t3://server:7003 -userconfigfile /opt/weblogic-deployer/wls_userConfig.properties -userkeyfile /opt/weblogic-deployer/wls_userConfig.key -deploy) Jenkins is running manually on the Jenkins server console and the deployment works successfully every time, but running the build task we get the error below, every time.

      java.lang.RuntimeException: task completed abnormally (exit code = 1)
      at org.jenkinsci.plugins.deploy.weblogic.task.DeploymentTaskServiceImpl.deploy(DeploymentTaskServiceImpl.java:252)
      at org.jenkinsci.plugins.deploy.weblogic.task.DeploymentTaskServiceImpl.perform(DeploymentTaskServiceImpl.java:181)
      at org.jenkinsci.plugins.deploy.weblogic.WeblogicDeploymentPlugin.perform(WeblogicDeploymentPlugin.java:232)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1046)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
      at hudson.model.Run.execute(Run.java:1776)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)
      ERROR: [WeblogicDeploymentPlugin] - Failed to deploy.
      [INFO] ------------------------------------------------------------------------
      [INFO] DEPLOYMENT FAILURE
      [INFO] ------------------------------------------------------------------------

      Have scoured the internet, have found a few others having the same issue but no resolution posted. One person suggests adding into the java classpath additional jars weblogic, cryptoj.jar, along with wlfullclient.jar. I have tried this with no changes to the build deployment error above.

        Attachments

          Activity

          Hide
          raphc Raphael CHAUMIER added a comment - - edited

          Hi,

          What do see in the weblogic deployment logs? Cf "View deployment Logs" chapter on the plugin wiki page https://wiki.jenkins-ci.org/display/JENKINS/WebLogic+Deployer+Plugin ?

          Do you have any stack trace in jenkins logs ?

          Show
          raphc Raphael CHAUMIER added a comment - - edited Hi, What do see in the weblogic deployment logs? Cf "View deployment Logs" chapter on the plugin wiki page https://wiki.jenkins-ci.org/display/JENKINS/WebLogic+Deployer+Plugin ? Do you have any stack trace in jenkins logs ?
          Hide
          trevorw trevorw added a comment -

          I overlooked that, that's nice to have. So in there, it reports a file not found for the .war to be deployed.

          java.io.FileNotFoundException: /opt/jenkins/jobs/appname-build-deploy-dev/modules/com.apps.appnamejenkins-appname/builds/39/archive/com.apps.appname/appname/1.0.0-SNAPSHOT/appname-1.0.0-SNAPSHOT.war (No such file or directory)
          at java.io.FileInputStream.open(Native Method)
          at java.io.FileInputStream.(FileInputStream.java:138)
          at weblogic.utils.FileUtils.copy(FileUtils.java:266)
          at weblogic.utils.FileUtils.copy(FileUtils.java:245)
          at weblogic.utils.FileUtils.copy(FileUtils.java:186)
          at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.upload(ServerConnectionImpl.java:849)
          at weblogic.deploy.api.spi.deploy.internal.BasicOperation.uploadFiles(BasicOperation.java:332)
          at weblogic.deploy.api.spi.deploy.internal.BasicOperation.execute(BasicOperation.java:465)
          at weblogic.deploy.api.spi.deploy.internal.BasicOperation.run(BasicOperation.java:178)
          at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.deploy(WebLogicDeploymentManagerImpl.java:390)
          at weblogic.deploy.api.tools.deployer.DeployOperation.execute(DeployOperation.java:51)
          at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:139)
          at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88)
          at weblogic.utils.compiler.Tool.run(Tool.java:158)
          at weblogic.utils.compiler.Tool.run(Tool.java:115)
          at weblogic.Deployer.run(Deployer.java:74)
          at weblogic.Deployer.main(Deployer.java:55)

          This is on Linux, looks like the $ in the filepath is causing some weirdness. looks to be replacing the $ with a username variable of "jenkins".

          Not found at:
          /opt/jenkins/jobs/appname-build-deploy-dev/modules/com.apps.appnamejenkinsappname/builds/39/archive/com.apps.appname/appname/1.0.0-SNAPSHOT/appname-1.0.0-SNAPSHOT.war

          Found at:
          /opt/jenkins/jobs/appname-build-deploy-dev/modules/com.apps.appname$appname/builds/39/archive/com.apps.appname/appname/1.0.0-SNAPSHOT/appname-1.0.0-SNAPSHOT.war

          or via the command line we have to escape the $ \$ so it runs with this path:
          /opt/jenkins/jobs/appname-build-deploy-dev/modules/com.apps.appname\$appname/builds/39/archive/com.apps.appname/appname/1.0.0-SNAPSHOT/appname-1.0.0-SNAPSHOT.war

          Show
          trevorw trevorw added a comment - I overlooked that, that's nice to have. So in there, it reports a file not found for the .war to be deployed. java.io.FileNotFoundException: /opt/jenkins/jobs/appname-build-deploy-dev/modules/com.apps.appnamejenkins-appname/builds/39/archive/com.apps.appname/appname/1.0.0-SNAPSHOT/appname-1.0.0-SNAPSHOT.war (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:138) at weblogic.utils.FileUtils.copy(FileUtils.java:266) at weblogic.utils.FileUtils.copy(FileUtils.java:245) at weblogic.utils.FileUtils.copy(FileUtils.java:186) at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.upload(ServerConnectionImpl.java:849) at weblogic.deploy.api.spi.deploy.internal.BasicOperation.uploadFiles(BasicOperation.java:332) at weblogic.deploy.api.spi.deploy.internal.BasicOperation.execute(BasicOperation.java:465) at weblogic.deploy.api.spi.deploy.internal.BasicOperation.run(BasicOperation.java:178) at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.deploy(WebLogicDeploymentManagerImpl.java:390) at weblogic.deploy.api.tools.deployer.DeployOperation.execute(DeployOperation.java:51) at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:139) at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88) at weblogic.utils.compiler.Tool.run(Tool.java:158) at weblogic.utils.compiler.Tool.run(Tool.java:115) at weblogic.Deployer.run(Deployer.java:74) at weblogic.Deployer.main(Deployer.java:55) This is on Linux, looks like the $ in the filepath is causing some weirdness. looks to be replacing the $ with a username variable of "jenkins". Not found at: /opt/jenkins/jobs/appname-build-deploy-dev/modules/com.apps.appnamejenkinsappname/builds/39/archive/com.apps.appname/appname/1.0.0-SNAPSHOT/appname-1.0.0-SNAPSHOT.war Found at: /opt/jenkins/jobs/appname-build-deploy-dev/modules/com.apps.appname$appname/builds/39/archive/com.apps.appname/appname/1.0.0-SNAPSHOT/appname-1.0.0-SNAPSHOT.war or via the command line we have to escape the $ \$ so it runs with this path: /opt/jenkins/jobs/appname-build-deploy-dev/modules/com.apps.appname\$appname/builds/39/archive/com.apps.appname/appname/1.0.0-SNAPSHOT/appname-1.0.0-SNAPSHOT.war
          Hide
          trevorw trevorw added a comment - - edited

          Narrowed this down a bit more, it is the $ being replaced. I've obscured some stuff above but we are seeing truly a folder path of apps.user$user-app on Linux becomes apps.userjenkins-app so $user is being taken as a variable replacement in the file path where it should be a literal \$user. Adding "" around the path may fix the issue too, depending upon what is doing the replacement.

          Not sure if this is a jenkins, weblogic deployer plugin, artifactory plugin, java or linux issue but that's what's happening.

          Show
          trevorw trevorw added a comment - - edited Narrowed this down a bit more, it is the $ being replaced. I've obscured some stuff above but we are seeing truly a folder path of apps.user$user-app on Linux becomes apps.userjenkins-app so $user is being taken as a variable replacement in the file path where it should be a literal \$user. Adding "" around the path may fix the issue too, depending upon what is doing the replacement. Not sure if this is a jenkins, weblogic deployer plugin, artifactory plugin, java or linux issue but that's what's happening.
          Hide
          raphc Raphael CHAUMIER added a comment -

          Hi

          This issue seems to be the same as https://issues.jenkins-ci.org/browse/JENKINS-21244

          Do you use your own command line set in advanced task properties ?

          Show
          raphc Raphael CHAUMIER added a comment - Hi This issue seems to be the same as https://issues.jenkins-ci.org/browse/JENKINS-21244 Do you use your own command line set in advanced task properties ?
          Hide
          trevorw trevorw added a comment - - edited

          Hello. Yes, I would say it's the same issue so this is a duplicate. Sorry about that!

          My issue has the extra issue of chance, the app name is app.user$user.app so $user is getting replaced as a variable. Escaping the $ or quoting the string should fix it, same as the other issue.

          We tried creating our own command line set in the advanced task properties but it did not correct the problem. We typically have just used the default options, so no custom string.

          Thanks for looking into this.

          Show
          trevorw trevorw added a comment - - edited Hello. Yes, I would say it's the same issue so this is a duplicate. Sorry about that! My issue has the extra issue of chance, the app name is app.user$user.app so $user is getting replaced as a variable. Escaping the $ or quoting the string should fix it, same as the other issue. We tried creating our own command line set in the advanced task properties but it did not correct the problem. We typically have just used the default options, so no custom string. Thanks for looking into this.
          Hide
          raphc Raphael CHAUMIER added a comment -

          duplicate with JENKINS-21244

          Show
          raphc Raphael CHAUMIER added a comment - duplicate with JENKINS-21244
          Hide
          raphc Raphael CHAUMIER added a comment -

          duplcated ticket

          Show
          raphc Raphael CHAUMIER added a comment - duplcated ticket

            People

            • Assignee:
              raphc Raphael CHAUMIER
              Reporter:
              trevorw trevorw
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: