Friday, July 27, 2018

Timeout exception while starting Liferay on Jboss EAP 7.x or Wildfly

Issue:

Jboss server throws following error while start up :

2018-07-23 21:36:09,29 [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS013412: Timeout after [300] seconds waiting for service container stability. Operation will roll back. Step that first updated the service container was 'add' at address '[("interface" => "management")]'

2018-07-23 21:36:09,35 [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS013412: Timeout after [300] seconds waiting for service container stability. Operation will roll back. Step that first updated the service container was 'add' at address '[ ("core-service" => "management"), ("management-interface" => "http-interface") ]' 

2018-07-23 21:36:09,295 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.server.DeployerChainAddHandler$FinalRuntimeStepHandler@47f29910 for operation {"operation" => "add-deployer-chains","address" => []} at address [] failed handling operation rollback -- java.util.concurrent.TimeoutException: java.util.concurrent.TimeoutException
        at org.jboss.as.controller.OperationContextImpl.waitForRemovals(OperationContextImpl.java:511)
        at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1369)
        at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1328)
        at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1301)
        at org.jboss.as.controller.AbstractOperationContext$Step.access$300(AbstractOperationContext.java:1185)
        at

Liferay is a big application running on jboss server and it may take 5-10 minutes to start the servers. So how to set the timeout to 600 or 900 seconds ? Where and how to set it ?

For detail information please read the official document from redhat https://access.redhat.com/solutions/1190323

You can configure jboss.as.management.blocking.timeout system property to tune timeout (seconds) waiting for service container stability.

For standalone mode:


To resolve the problem by increasing the block management timeout to 600-900 in standalone.xml. The default timeout was set to 300 so liferay startup takes more than five minutes.

The above will set jboss.as.management.blocking.timeout system property in configuration file (i.e standalone-*.xml) like :

...
</extensions>
<system-properties>
      <property name="jboss.as.management.blocking.timeout" value="600"/>
</system-properties>
<management>
...

or

Add -Djboss.as.management.blocking.timeout=600 to jvm argument of standalone.sh or add the following JAVA_OPTS in standalone.conf:
JAVA_OPTS="$JAVA_OPTS -Djboss.as.management.blocking.timeout=600"



For Domain mode:


Edit the $JBOSS_HOME/bin/domain.conf and set it via this line -Djboss.as.management.blocking.timeout=600 after the if block:

JAVA_OPTS="$JAVA_OPTS -Djboss.as.management.blocking.timeout=600"