Intermittent cannot connect to Domain Controller with JBoss CLI

Solution Verified - Updated -

Issue

  • When tried to login into the CLI the following error occurs, but when tried to run the same login command again the login is successful:
./jboss-cli.sh -c --controller=10.xx.xx.xx:9999
  • The following is an example of what is happening:
$ ./jboss-cli.sh -c --controller=10.xx.xx.xx:9999
org.jboss.as.cli.CliInitializationException: Failed to connect to the controller
        [stack trace omitted]
Caused by: org.jboss.as.cli.CommandLineException: The controller is not available at 10.xx.xx.xx:9999

$ ./jboss-cli.sh -c --controller=10.xx.xx.xx:9999
[domain@10.xx.xx.xx:9999 /]
  • Getting Failed to connect to the controller, yet I can reconnect right after the failure.
  • Both the CLI and Domain Controller are running on the same box and bound to the same interface, so all network calls are local to the box.
  • When we are trying to connect to the JBoss EAP via command line then we are getting the following exception intermittently (but the next second when an attempt is made to connect it is successful):
[root@testbin]# ./jboss-cli.sh --connect --controller=x.x.x.x:9999
org.jboss.as.cli.CliInitializationException: Failed to connect to the controller
        at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:280)
        at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:258)
        at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.jboss.modules.Module.run(Module.java:270)
        at org.jboss.modules.Main.main(Main.java:411)
Caused by: org.jboss.as.cli.CommandLineException: The controller is not available at x.x.x.x:9999
        at org.jboss.as.cli.impl.CommandContextImpl.tryConnection(CommandContextImpl.java:951)
        at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:790)
        at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:766)
        at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:278)
        ... 8 more
Caused by: java.io.IOException: java.net.ConnectException: JBAS012144: Could not connect to remote://x.x.x.x:9999. The connection timed out
        at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)
        at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71)
        at org.jboss.as.cli.impl.CommandContextImpl.tryConnection(CommandContextImpl.java:929)
        ... 11 more
Caused by: java.net.ConnectException: JBAS012144: Could not connect to remote://x.x.x.x:9999. The connection timed out
        at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:131)
        at org.jboss.as.protocol.ProtocolConnectionManager$EstablishingConnection.connect(ProtocolConnectionManager.java:256)
        at org.jboss.as.protocol.ProtocolConnectionManager.connect(ProtocolConnectionManager.java:70)
        at org.jboss.as.protocol.mgmt.FutureManagementChannel$Establishing.getChannel(FutureManagementChannel.java:176)
        at org.jboss.as.cli.impl.CLIModelControllerClient.getOrCreateChannel(CLIModelControllerClient.java:155)
        at org.jboss.as.cli.impl.CLIModelControllerClient$2.getChannel(CLIModelControllerClient.java:117)
        at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:115)
        at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:90)
        at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:236)
        at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:141)
        at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127)
        ... 13 more

So it seems the client is timing out because for some reason the client itself isn't sending the data the server needs to respond in time.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
  • java-1.7.0-openjdk-1.7.0.71

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In