我想从jenkins向warfly部署war文件。我尝试了很多方法,但它对我不起作用
(致命:无法初始化命令上下文。构建步骤'部署 WAR / EAR到WildFly'标记为构建失败完成:失败),
我搜索了这个问题,给出的答案对我没有帮助。
ERROR: Build step failed with exception org.codehaus.cargo.container.ContainerException: Failed to deploy to [http://hostname:9990/jmx-console/HtmlAdaptor] at org.codehaus.cargo.container.jboss.internal.JdkHttpURLConnection.connect(JdkHttpURLConnection.java:76) at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.invokeURL(JBoss4xRemoteDeployer.java:312) at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.invokeRemotely(JBoss4xRemoteDeployer.java:233) at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.redeploy(JBoss4xRemoteDeployer.java:194) 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:997) at hudson.FilePath.act(FilePath.java:975) 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:1749) 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://hostname:9990/jmx-console/HtmlAdaptor
? 提前谢谢
答案 0 :(得分:0)
您需要配置WildFly管理界面以侦听由hostname
表示的网络地址。否则,它默认只收听localhost
。
实现此目的的最简单方法是使用其他命令行选项启动WildFly。例如,如果hostname的IP地址为192.168.12.100,则:
[wildfly-10.1.0.Final]$ bin/standalone.sh -bmanagement=192.168.12.100
答案 1 :(得分:0)
您尝试