从Jenkins部署Widlfy,其中"连接超时"错误

时间:2014-07-24 13:56:31

标签: maven jenkins wildfly

我可以毫无问题地部署在wildfly本地。但是,如果我尝试从Jenkins远程部署,那么我会得到以下例外:

[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:undeploy (default-cli) on project profiler-domain: Could not execute goal undeploy on `/opt/ci_cq/workspace/myapppackage/target/myapp.ear. Reason: I/O Error could not execute operation '{`
[ERROR] "operation" => "read-attribute",
[ERROR] "address" => [],
[ERROR] "name" => "launch-type"
[ERROR] }': java.net.ConnectException: JBAS012144: Could not connect to http-remoting://myipOfRemotingServer:9990. The connection timed out
[ERROR] -> [Help 1]

wildfly上的端口9990配置如下:

<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
        <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/
>

在pom.xml中我配置了wildfly插件,如下所示:

<plugin>
         <groupId>org.wildfly.plugins</groupId>
                <artifactId>wildfly-maven-plugin</artifactId>
                <version>1.0.2.Final</version>
                <configuration>
                    <skip>false</skip>
                    <hostname>${hostname}</hostname>
                    <port>${port}</port>
                    <username>${username}</username>
                    <password>${password}</password>
                </configuration>
            </plugin>

这里有什么问题?

谢谢!

1 个答案:

答案 0 :(得分:0)

正如James R. Perkins所说,我不允许除localhost之外的任何其他地址访问管理端口。改变之后就可以了!