JBoss AS7:Timeout deploying JBoss applications
There is an error message in log file while deploying JBoss application
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.
In the local Git repository of the application locate file ".openshift/config/stanalone.xml" and open it in an editor.
Look up this section
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0"> <deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" /> </subsystem>
and add "deployment-timeout" attribute to the "deployment-scanner" tag with big enough number. E.g.
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0"> <deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" deployment-timeout="1200" /> </subsystem>
The attributes are
Name | Type | Description |
---|---|---|
name | STRING | The name of the scanner. default is used if not specified |
path | STRING | The actual filesystem path to be scanned. Treated as an absolute path, unless the 'relative-to' attribute is specified, in which case the value is treated as relative to that path. |
relative-to | STRING | Reference to a filesystem path defined in the "paths" section of the server configuration, or one of the system properties specified on startup. In the example above jboss.server.base.dir resolves to {{$JBOSS_HOME/standalone |
scan-enabled | BOOLEAN | If true scanning is enabled |
scan-interval | INT | Periodic interval, in milliseconds, at which the repository should be scanned for changes. A value of less than 1 indicates the repository should only be scanned at initial startup. |
auto-deploy-zipped | BOOLEAN | Controls whether zipped deployment content should be automatically deployed by the scanner without requiring the user to add a .dodeploy marker file. |
auto-deploy-exploded | BOOLEAN | Controls whether zipped deployment content should be automatically deployed by the scanner without requiring the user to add a .dodeploy marker file. Setting this to 'true' is not recommended for anything but basic development scenarios, as there is no way to ensure that deployment will not occur in the middle of changes to the content. |
deployment-timeout | LONG | imeout, in seconds, a deployment is allows to execute before being canceled. The default is 60 seconds. |
参考:
https://openshift.redhat.com/community/kb/kb-e1037-timeout-deploying-jboss-applications
https://docs.jboss.org/author/display/AS7/Deployment+Scanner+configuration