0

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

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

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 中,我添加了服务器身份并编辑了套接字绑定

    <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 之前,我添加了信任库:

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

连接在成功执行时超时。这是错误:

    > 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

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

4

1 回答 1

0

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

于 2018-10-09T20:26:51.210 回答