通过SSL的wildfly-maven-plugin部署工作一次,然后“连接错误"就会通过SSL进行. [英] wildfly-maven-plugin deployment over SSL works once then "connection error"

查看:127
本文介绍了通过SSL的wildfly-maven-plugin部署工作一次,然后“连接错误"就会通过SSL进行.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在保护Wildfly管理控制台以使用HTTPS,并将pom.xml配置为通过https进行部署之后,我出现了奇怪的行为. (我尝试使用8.2.1和10.1.0版,独立模式).

I'm getting a weird behavior after securing Wildfly Admin console to use HTTPS, and configuring my pom.xml to deploy over https. (I tried on versions 8.2.1 and 10.1.0, standalone mode).

我只能(重新)成功部署一次.之后,出现以下错误,我必须重新启动服务器才能再次(重新)部署:

I can only (re)deploy once successfully. After that, I get the error below, and I have to restart the server to (re)deploy again:

pom.xml中的更改:

Change in pom.xml:

    <plugin>
        <groupId>org.wildfly.plugins</groupId>
        <artifactId>wildfly-maven-plugin</artifactId>
        <version>1.0.2.Final</version>  
        <configuration>
            <protocol>https-remoting</protocol>
            <port>9993</port> 
        </configuration>        
    </plugin>

在我的standalone-full-ha.xml中,添加了服务器身份并编辑了 socket-binding

In my standalone-full-ha.xml, I added the server-identities and edited the socket-binding

    <management>
        <security-realms>
            <security-realm name="ManagementRealm">
                <server-identities>
                    <ssl>
                        <keystore path="server-keystore.jks" relative-to="jboss.server.config.dir" keystore-password="mypassword"/>
                    </ssl>
                </server-identities>
...
        <management-interfaces>
            <http-interface security-realm="ManagementRealm" http-upgrade-enabled="true">
                <socket-binding http="management-http" https="management-https"/>
            </http-interface>
        </management-interfaces>

我在执行mvn之前添加了信任库:

I added the truststore, prior to executing mvn:

> set MAVEN_OPTS=-Djavax.net.ssl.trustStore=C:/pathto/client-truststore -Djavax.net.ssl.trustStorePassword=mypassword

连接在后续执行中超时.这是错误:

The connection is timing out on succeeding executions. Here's the error:

    > mvn wildfly:deploy -e (OR mvn wildfly:redeploy -e)  

    [INFO] BUILD FAILURE
    ...
    [ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:redeploy (default-cli) on project xyz-project-web: Could not execute goal redeploy on C:\projects\abc\xyz-project\trunk\xyz-project-web\target\xyz-project-web-0-SNAPSHOT.war. 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 https-remoting://172.31.100.26:9993. 
The connection timed out
    [ERROR] -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:redeploy (default-cli) 
    on project xyz-project-web: Could not execute goal redeploy on C:\projects\abc\xyz-project\trunk\xyz-project-web\target\xyz-project-web-0-SNAPSHOT.war. Reason: I/O
    Error could not execute operation '{
        "operation" => "read-attribute",
        "address" => [],
        "name" => "launch-type"
    }'
    ...
            at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: org.apache.maven.plugin.MojoExecutionException: Could not execute goal redeploy on C:\projects\abc\xyz-project\trunk\xyz-project-web\target\
    test-project-web-0-SNAPSHOT.war. Reason: I/O Error could not execute operation '{
        "operation" => "read-attribute",
        "address" => [],
        "name" => "launch-type"
    }'
    ...
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
            ... 20 more
    Caused by: java.lang.IllegalStateException: I/O Error could not execute operation '{
        "operation" => "read-attribute",
        "address" => [],
        "name" => "launch-type"
    }'
    ...
            at org.wildfly.plugin.deployment.AbstractDeployment.doExecute(AbstractDeployment.java:136)
            ... 24 more
    Caused by: java.io.IOException: java.net.ConnectException: JBAS012144: Could not connect to https-remoting://172.31.100.26:9993. The connection timed out
            at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)
            ... 28 more
    Caused by: java.net.ConnectException: JBAS012144: Could not connect to https-remoting://172.31.100.26:9993. The connection timed out
            at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:119)
    ...
            at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127)
            ... 30 more

第一次执行后,我找不到任何相关的变化.

I can't find anything relevant changing after the first execution.

推荐答案

它看起来像是旧版本中的错误.我升级到wildfly-maven-plugin 1.2.1Final,现在可以正常工作了.

It looks like a bug in the older version. I upgraded to wildfly-maven-plugin 1.2.1.Final, and it works fine now.

这篇关于通过SSL的wildfly-maven-plugin部署工作一次,然后“连接错误"就会通过SSL进行.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆