Can't connect to CLI jboss 7.1.1.FINAL in Ubuntu
Asked Answered
F

5

6

I can't connect to CLI Jboss 7.1.1.FINAL in Ubuntu, i wonder why?

in console i put :

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 /] 

is a standalone configuration, why i cannot enter?

Factfinding answered 22/4, 2012 at 22:58 Comment(0)
S
11

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.

Schnell answered 23/4, 2012 at 15:41 Comment(1)
In addition to the points above, a requirement is that JBoss is running.Excepting
D
1

Check your hosts file!

/etc/hosts

Your localhost must be specified as 127.0.0.1.

Decent answered 10/1, 2013 at 13:49 Comment(0)
D
1

In case your jboss instance is not binding to 127.0.0.1, you may use --controller option as follows:

./jboss-cli.sh --controller=YOUR_IP:9999
Disembroil answered 26/1, 2015 at 13:14 Comment(0)
V
0

Just for the next guy to stumble on this, if you're on Mac, THIS will solve it:

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

In case link goes down:

  1. Start the server with: bin/standalone.sh -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.KQueueSelectorProvider
  2. On the client side, first run: export JAVA_OPTS="-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.KQueueSelectorProvider"
  3. Then run bin/jboss-cli.sh --connect

You should now be connected!

Vite answered 11/6, 2013 at 23:30 Comment(0)
R
0

To me this happen due to JBoss being under heavy load while processing an erroneous task which caused Hibernate exceptions at a high rate.

I managed to connect after ~20 retries, after which I couldn't connect again.

Ralfston answered 5/12, 2013 at 13:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.