【问题标题】:JBAS012144: Could not connect to remote://127.0.0.1:9990. The connection timed outJBAS012144:无法连接到远程://127.0.0.1:9990。连接超时
【发布时间】:2021-04-29 11:06:45
【问题描述】:

当我运行我的代码时,我总是得到错误:

java.io.IOException: java.net.ConnectException: JBAS012144: Could not connect to remote://127.0.0.1:9990. The connection timed out.

我尝试连接到我的 JBOSS Eap 7。

如果我在 Powershell 中尝试,连接到 remote://127.0.0.1:9990 不起作用,但连接到 remote+http://127.0.0.1:9990 确实有效。所以我认为我必须更改协议,但我不知道如何。

ModelControllerClient client = ModelControllerClient.Factory.create(InetAddress.getByName("localhost"), 9990);

    ModelNode operation = new ModelNode();
    operation.get("address").add("deployment", "*");
    operation.get("operation").set("read-attribute");
    operation.get("name").set("name");

    ModelNode result = client.execute(operation);

standalone.xml:

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
        <socket-binding name="http" port="${jboss.http.port:8080}"/>
        <socket-binding name="https" port="${jboss.https.port:8443}"/>
        <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="txn-recovery-environment" port="4712"/>
        <socket-binding name="txn-status-manager" port="4713"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="localhost" port="25"/>
        </outbound-socket-binding>
    </socket-binding-group>

【问题讨论】:

    标签: java jboss command-line-interface wildfly


    【解决方案1】:

    看起来不像是协议问题。您是否在standalone.xml 中定义了本机接口? 在 WildFly 的新版本中,这是折旧的,但可能适用于您的情况。请参阅此处的文档:https://docs.jboss.org/author/display/WFLY8/The%20native%20management%20API.html

    它还谈到了有一个身份验证层。

    【讨论】: