Friday, 19 April 2013

Spring!

Spring! by Viny N
Spring!, a photo by Viny N on Flickr.

In wait of spring and rain

Monday, 1 April 2013

Increasing deployment timeout for jboss7.1.0

Sometimes EAR deployment fails as it needs more time to deply than the timeout specified in your JBOSS7.1 config files

In such cases we get errors like :


23:33:19,789 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "abc.ear" was rolled back with failure message Operation cancelled
23:33:19,795 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment.

Searching the standalone.xml file for timeout might not help if its a fresh install of jboss 7.1 as these values are default.
You have to explicitly set it in the standalone.xml file

Steps are as follows:

1)Stop jboss server
2)Goto jboss-as-7.1.0.Final/standalone/configuration
3)Edit standalone.xml file
4)Search for he following block of code

 <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
            <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>
        </subsystem>

In this case deployment timeout defaults to 60 seconds
5)Add deployment-timeout value

 <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
            <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="300"/>
        </subsystem>

Now the deployment timeout value has been set to 300 secands.You can configure it as per your need
6)Start jboss server and deploy your app.