JBoss AS7:Timeout deploying JBoss applications

问题现象:jboss在开机部署时,由于软件包的问题,导致部署时间超过jboss默认时间(60秒),jboss重新部署,打断上一次部署,如此反复,导致网站启动失败
 
Code: 
KB-E1037
Issue: 

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.

Resolution: 

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

猜你喜欢

转载自yzyzero.iteye.com/blog/1964275