6

我无法在 Ubuntu 中连接到 CLI Jboss 7.1.1.FINAL,我想知道为什么?

在控制台中我输入:

mastervodoo@vodoo-Studio-1558:/opt/jboss-as-7.1.1.Final/bin$ ./jboss-cli.sh
You are disconnected at the moment. Type 'connect' to connect to the server or 'help'     for the list of supported commands.
[disconnected /] connect
The controller is not available at localhost:9999
[disconnected /] connect 127.0.0.1
The controller is not available at 127.0.0.1:9999
[disconnected /] connect 127.0.1.1
The controller is not available at 127.0.1.1:9999 
[disconnected /] connect 192.168.1.33
The controller is not available at 192.168.1.33:9999
[disconnected /] 

是一个独立的配置,为什么我不能进入?

4

5 回答 5

10

Check your XML configuration, e.g. standalone.xml or domain.xml, and look <interfaces/> section. Make sure you're binding to 127.0.0.1 for the management interface. Also have a look at your management-native port in the <socket-binding/> section and make sure it's set to 9999. These are the defaults.

It should look something like the following:

<interfaces>
    <interface name="management">
        <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
    </interface>
    <interface name="public">
        <inet-address value="${jboss.bind.address:127.0.0.1}"/>
    </interface>
    ...
</interfaces>

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
    <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
    <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:9443}"/>
    ...
</socket-binding-group>

You could also pass properties to change the values if the expression values are being used.

$JBOSS_HOME/bin/standalone.sh -Djboss.bind.address.management=127.0.0.1 -Djboss.management.native.port=9999

If it's still not connecting it's likely a local issue. Most likely a firewall getting in the way or possibly you don't have localhost set-up in your hosts.

于 2012-04-23T15:41:18.430 回答
1

如果你的 jboss 实例没有绑定到 127.0.0.1,你可以使用--controller如下选项:

./jboss-cli.sh --controller=YOUR_IP:9999
于 2015-01-26T13:14:29.673 回答
1

检查您的主机文件!

/etc/hosts

您的localhost必须指定为127.0.0.1

于 2013-01-10T13:49:58.027 回答
0

对我来说,这是因为 JBoss 在处理错误任务时负载过重,导致 Hibernate 异常发生率很高。

我在重试约 20 次后设法连接,之后我无法再次连接。

于 2013-12-05T13:54:21.497 回答
0

只是为了让下一个偶然发现这个问题的人,如果你在 Mac 上,这将解决它:

http://saltnlight5.blogspot.com.au/2012/07/getting-jboss-clish-to-work-on-macosx.html

如果链接断开:

  1. 启动服务器: bin/standalone.sh -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.KQueueSelectorProvider
  2. 在客户端,首先运行:export JAVA_OPTS="-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.KQueueSelectorProvider"
  3. 然后运行 ​​bin/jboss-cli.sh --connect

您现在应该已连接!

于 2013-06-11T23:30:07.163 回答