jbossjboss-eap-7jboss-cli

JBoss EAP 7.0 check startup


I want to check whether my JBoss EAP 7 is started via jboss-cli.

With JBoss EAP 6 I could use the following command

jboss-cli.bat -c --commands="read-attribute server-state"

While the server is starting, the response is starting. When the server booted successfully, the response is running.

After migrating to JBoss EAP 7.0, the same command returns the following message, while the server is starting. Failed to connect to the controller: Timeout waiting for the system to boot. When the server started successfully, the usual message running is returned.

My question is: Why can't the jboss-cli connect to the server until it started?


Solution

  • In EAP 7.x and EAP 6.3.0 or later, you can configure jboss.as.management.blocking.timeout system property to tune timeout (seconds) waiting for service container stability. Try setting this parameter once connected via CLI.

    Since EAP 6.3.0.ER8 there is a new class in jboss.as.controller: BlockingTimeout. This class loads the value of system property jboss.as.management.blocking.timeout or defaults to 300 (seconds). Note: This property is not a timeout per deployment but a timeout on container stability and if jboss.as.management.blocking.timeout is reached during startup then all applications will be undeployed and the container shutdown. The reasoning behind this is that having a half-working server is potentially dangerous as you may not notice major failures. Thus if your application is unable to load within the given timeout value,CLI will throw the errorFailed to connect to the controller: Timeout waiting for the system to boot

    jboss-cli.sh --connect --controller=IP:PORT --timeout=40000 configure timeouts value to be more then the amount of time your server takes to start.