使用詹金斯在jboss上发动战争

时间:2019-06-28 13:05:45

标签: amazon-web-services jenkins amazon-ec2 jboss7.x

我有一个运行jboss的ec2实例,另一个安装了jenkins的ec2实例。我的战争是在jenkins中构建的,现在我想将其部署在另一个EC2实例上的jboss上。建立行动。我们已经提供了管理控制台的网址和凭据。但是,由于正在运行的工作,我们遇到了以下错误:

错误

  

17:58:24将/../../../../some.war部署到容器JBoss 7.x Remote   与上下文somewar 17:58:29重新部署的取消部署阶段   操作失败:org.codehaus.cargo.util.CargoException:无法   取消部署   org.codehaus.cargo.container.deployable.WAR [some.war] 17:58:34错误:   构建步骤因异常17:58:34而失败   org.codehaus.cargo.util.CargoException:无法部署可部署   org.codehaus.cargo.container.deployable.WAR [some.war] 17:58:34在   org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.deploy(JBoss5xRemoteDeployer.java:216)   17:58:34在   org.codehaus.cargo.container.spi.deployer.AbstractDeployer.redeploy(AbstractDeployer.java:245)   17:58:34在   hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:77)   17:58:34在   hudson.plugins.deploy.CargoContainerAdapter $ DeployCallable.invoke(CargoContainerAdapter.java:147)   17:58:34在   hudson.plugins.deploy.CargoContainerAdapter $ DeployCallable.invoke(CargoContainerAdapter.java:117)   hudson.FilePath.act(FilePath.java:1078)17:58:34 17:58:34 at   hudson.FilePath.act(FilePath.java:1061)17:58:34在   hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:114)   17:58:34在   hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeploy(PasswordProtectedAdapterCargo.java:93)   17:58:34在   hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:64)   17:58:34在   hudson.tasks.BuildStepMonitor $ 3.perform(BuildStepMonitor.java:45)   17:58:34在   hudson.model.AbstractBuild $ AbstractBuildExecution.perform(AbstractBuild.java:741)   17:58:34在   hudson.model.AbstractBuild $ AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)   17:58:34在   hudson.maven.MavenModuleSetBuild $ MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1073)   17:58:34在   hudson.model.AbstractBuild $ AbstractBuildExecution.post(AbstractBuild.java:635)   在hudson.model.Run.execute(Run.java:1843)17:58:34在17:58:34   hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)   17:58:34在   hudson.model.ResourceController.execute(ResourceController.java:97)   17:58:34 at hudson.model.Executor.run(Executor.java:429)17:58:34   引起原因:java.lang.RuntimeException:java.net.ConnectException:   JBAS012144:无法连接到remote:// soemhost:9999。的   连接超时于17:58:34   org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeAsync(AbstractModelControllerClient.java:113)   17:58:34在   org.jboss.as.controller.client.helpers.standalone.impl.ModelControllerClientServerDeploymentManager.executeOperation(ModelControllerClientServerDeploymentManager.java:47)   17:58:34在   org.jboss.as.controller.client.helpers.standalone.impl.AbstractServerDeploymentManager.execute(AbstractServerDeploymentManager.java:79)   17:58:34在   org.codehaus.cargo.tools.jboss.JBossDeployer.executeAction(JBossDeployer.java:144)   17:58:34在   org.codehaus.cargo.tools.jboss.JBossDeployer.deploy(JBossDeployer.java:84)   17:58:34在   org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.deploy(JBoss5xRemoteDeployer.java:212)   17:58:34 ...另外18:17:58:34原因:java.net.ConnectException:   JBAS012144:无法连接到远程:// somehost:9999。的   连接超时于17:58:34   org.jboss.as.protocol.ProtocolChannelClient.connectSync(ProtocolChannelClient.java:155)   17:58:34在   org.jboss.as.protocol.mgmt.ManagementClientChannelStrategy $ Establishment.getChannel(ManagementClientChannelStrategy.java:166)   17:58:34在   org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:137)   17:58:34在   org.jboss.as.controller.client.impl.RemotingModelControllerClient $ 1.getChannel(RemotingModelControllerClient.java:62)   17:58:34在   org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:106)   17:58:34在   org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:89)   17:58:34在   org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:252)   17:58:34在   org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:151)   17:58:34在   org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeAsync(AbstractModelControllerClient.java:111)   17:58:34 ... 23更多17:58:34 java.lang.RuntimeException:   java.net.ConnectException:JBAS012144:无法连接到   远程:// somehost:9999。连接在17:58:34超时   org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeAsync(AbstractModelControllerClient.java:113)   17:58:34在   org.jboss.as.controller.client.helpers.standalone.impl.ModelControllerClientServerDeploymentManager.executeOperation(ModelControllerClientServerDeploymentManager.java:47)   17:58:34在   org.jboss.as.controller.client.helpers.standalone.impl.AbstractServerDeploymentManager.execute(AbstractServerDeploymentManager.java:79)   17:58:34在   org.codehaus.cargo.tools.jboss.JBossDeployer.executeAction(JBossDeployer.java:144)   17:58:34在   org.codehaus.cargo.tools.jboss.JBossDeployer.deploy(JBossDeployer.java:84)   17:58:34在   org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.deploy(JBoss5xRemoteDeployer.java:212)   17:58:34在   org.codehaus.cargo.container.spi.deployer.AbstractDeployer.redeploy(AbstractDeployer.java:245)   17:58:34在   hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:77)   17:58:34在   hudson.plugins.deploy.CargoContainerAdapter $ DeployCallable.invoke(CargoContainerAdapter.java:147)   17:58:34在   hudson.plugins.deploy.CargoContainerAdapter $ DeployCallable.invoke(CargoContainerAdapter.java:117)   hudson.FilePath.act(FilePath.java:1078)17:58:34 17:58:34 at   hudson.FilePath.act(FilePath.java:1061)17:58:34在   hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:114)   17:58:34在   hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeploy(PasswordProtectedAdapterCargo.java:93)   17:58:34在   hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:64)   17:58:34在   hudson.tasks.BuildStepMonitor $ 3.perform(BuildStepMonitor.java:45)   17:58:34在   hudson.model.AbstractBuild $ AbstractBuildExecution.perform(AbstractBuild.java:741)   17:58:34在   hudson.model.AbstractBuild $ AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)   17:58:34在   hudson.maven.MavenModuleSetBuild $ MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1073)   17:58:34在   hudson.model.AbstractBuild $ AbstractBuildExecution.post(AbstractBuild.java:635)   在hudson.model.Run.execute(Run.java:1843)17:58:34在17:58:34   hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)   17:58:34在   hudson.model.ResourceController.execute(ResourceController.java:97)   17:58:34 at hudson.model.Executor.run(Executor.java:429)17:58:34   引起原因:java.net.ConnectException:JBAS012144:无法连接到   远程:// somehost:9999。连接在17:58:34超时   org.jboss.as.protocol.ProtocolChannelClient.connectSync(ProtocolChannelClient.java:155)   17:58:34在   org.jboss.as.protocol.mgmt.ManagementClientChannelStrategy $ Establishment.getChannel(ManagementClientChannelStrategy.java:166)   17:58:34在   org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:137)   17:58:34在   org.jboss.as.controller.client.impl.RemotingModelControllerClient $ 1.getChannel(RemotingModelControllerClient.java:62)   17:58:34在   org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:106)   17:58:34在   org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:89)   17:58:34在   org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:252)   17:58:34在   org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:151)   17:58:34在   org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeAsync(AbstractModelControllerClient.java:111)

1 个答案:

答案 0 :(得分:0)

您可以看到防火墙规则,因为Jenkins未连接到远程主机(无法连接到远程this)。

另一种进行部署的方法是在ssh上使用Shell脚本,例如{{3}}