java.lang.IllegalStateException: error submitting remote command

Jenkins JIRA | Laimonas S | 3 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Hi, Seems that the Deploy plugin does not resolve build parameters. If I configure my job with a build parameter and use it within Deploy plugin configuration (see the attached screenshot), it does not get properly replaced by the value and causes an exception to be raised during the execution phase: {noformat} Deploying /var/lib/jenkins/jobs/myJob/workspace/myapp.war to container GlassFish 3.x Remote ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception java.lang.IllegalStateException: error submitting remote command at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:170) at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.findTargetModule(AbstractJsr88Deployer.java:436) at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:187) at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73) at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116) at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103) at hudson.FilePath.act(FilePath.java:909) at hudson.FilePath.act(FilePath.java:882) at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103) at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:754) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:707) at hudson.model.Run.execute(Run.java:1628) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Caused by: java.lang.RuntimeException: error submitting remote command at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:725) at org.glassfish.deployment.client.AbstractDeploymentFacility.listTargets(AbstractDeploymentFacility.java:683) at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:168) ... 18 more Caused by: java.lang.RuntimeException: org.glassfish.api.admin.CommandException: No remote server named ${DEPLOY_HOST}. Is that the correct host name? at org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run(RemoteDeploymentFacility.java:121) at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:694) ... 20 more {noformat} Due this lack of functionally plugin can't be used in combination with other jobs, where it should be used dynamically (e.g. making deployment to multiple machines in a loop). Regards, Laimonas

    Jenkins JIRA | 3 years ago | Laimonas S
    java.lang.IllegalStateException: error submitting remote command
  2. 0

    Hi, Seems that the Deploy plugin does not resolve build parameters. If I configure my job with a build parameter and use it within Deploy plugin configuration (see the attached screenshot), it does not get properly replaced by the value and causes an exception to be raised during the execution phase: {noformat} Deploying /var/lib/jenkins/jobs/myJob/workspace/myapp.war to container GlassFish 3.x Remote ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception java.lang.IllegalStateException: error submitting remote command at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:170) at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.findTargetModule(AbstractJsr88Deployer.java:436) at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:187) at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73) at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116) at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103) at hudson.FilePath.act(FilePath.java:909) at hudson.FilePath.act(FilePath.java:882) at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103) at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:754) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:707) at hudson.model.Run.execute(Run.java:1628) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:246) Caused by: java.lang.RuntimeException: error submitting remote command at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:725) at org.glassfish.deployment.client.AbstractDeploymentFacility.listTargets(AbstractDeploymentFacility.java:683) at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:168) ... 18 more Caused by: java.lang.RuntimeException: org.glassfish.api.admin.CommandException: No remote server named ${DEPLOY_HOST}. Is that the correct host name? at org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run(RemoteDeploymentFacility.java:121) at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:694) ... 20 more {noformat} Due this lack of functionally plugin can't be used in combination with other jobs, where it should be used dynamically (e.g. making deployment to multiple machines in a loop). Regards, Laimonas

    Jenkins JIRA | 3 years ago | Laimonas S
    java.lang.IllegalStateException: error submitting remote command

    Root Cause Analysis

    1. java.lang.RuntimeException

      org.glassfish.api.admin.CommandException: No remote server named ${DEPLOY_HOST}. Is that the correct host name?

      at org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run()
    2. GF Deployment
      SunDeploymentManager.getTargets
      1. org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run(RemoteDeploymentFacility.java:121)
      2. org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:694)
      3. org.glassfish.deployment.client.AbstractDeploymentFacility.listTargets(AbstractDeploymentFacility.java:683)
      4. org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:168)
      4 frames
    3. Cargo
      AbstractJsr88Deployer.redeploy
      1. org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.findTargetModule(AbstractJsr88Deployer.java:436)
      2. org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:187)
      2 frames
    4. Deploy to container Plugin
      CargoContainerAdapter$1.invoke
      1. hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73)
      2. hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116)
      3. hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103)
      3 frames
    5. Hudson
      FilePath.act
      1. hudson.FilePath.act(FilePath.java:909)
      2. hudson.FilePath.act(FilePath.java:882)
      2 frames
    6. Deploy to container Plugin
      DeployPublisher.perform
      1. hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103)
      2. hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61)
      2 frames
    7. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:754)
      4. hudson.model.Build$BuildExecution.post2(Build.java:183)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:707)
      6. hudson.model.Run.execute(Run.java:1628)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      8. hudson.model.ResourceController.execute(ResourceController.java:88)
      9. hudson.model.Executor.run(Executor.java:246)
      9 frames