jboss mysql 连接超时设置_配置jboss EAP 6.4 数据库连接超时时间

当启动JBoss EAP服务器时,如果应用启动时间过长,可能会遇到服务容器稳定性超时的问题。解决方案是在EAP 7.x及6.3.0及以上版本中,通过设置`jboss.as.management.blocking.timeout`系统属性来调整等待服务容器稳定性的超时时间。对于独立模式,可以通过CLI命令或修改`standalone.conf`添加JVM参数;对于域模式,需要编辑`domain.conf`文件。确保设置足够大的超时值,以避免服务器因长时间无法启动而关闭。
摘要由CSDN通过智能技术生成

Environment

Red Hat JBoss Enterprise Application Platform (EAP)

6.x

7.x

Issue

Server throws following error while start up :

Raw

12:21:13,956 ERROR [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")]'

There are pretty big applications running on server and it may take 5-6 min to start the servers. So how to set the timeout to 600 or 900 seconds ? Where and how to set it ?

Slave JBoss EAP instance won't start when application code takes too long to load.

We are coming across this bug mentioned in  https://bugzilla.redhat.com/show_bug.cgi?id=1117945 and were wondering if it has been fixed in 6.3.3 or the up-coming 6.4.

When trying to deploy a new version of our application I get the following error. ” Operation timeout awaiting service container stability" typically the application will deploy pretty quick. Now it waits until it times out, What could be causing this problem?

Jboss application server is not able to restart after throwing the below error. We had this issue in of our servers in the past, so had set this property, looks like the server is waiting 600 seconds for the deployment to happen and failing after that. Could you please advice us on what the issue could be, as our QA environment is down at this moment?

Raw

02:30:20,757 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS013412: Timeout after [600] 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" => "native-interface")

]'

We run jboss on a rather underpowered VM for test purposes,sometimes it can take a long time to start, and then times out.Is it possible to extend the timeout?

Unable to deploy WAR file on AWS VM

When we start the JBOSSEAP6 windows service, the deployment produces a ".failed" file in the deployments folder, rather than a ".deployment" file.  This is a newly-created AWS EC2 Windows Server 2012 R@  instance - a test environment for now and issue comes every time we try to start the JBoss service.

Resolution

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.

For standalone mode :

Use following CLI command to set jboss.as.management.blocking.timeout. For example:

Raw

/system-property=jboss.as.management.blocking.timeout:add(value=600)

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

Raw

...

...

or

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

Raw

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:

Raw

...

#

# Specify options to pass to the Java VM.

#

if [ "x$JAVA_OPTS" = "x" ]; then

JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true"

JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"

else

echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"

fi

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

...

Note: The only use case for setting a property at the server-group or individual domain server level would be if you wanted a lower timeout than what you configure on the host controllers.

Root Cause

In 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.

Diagnostic Steps

Confirm whether a virus scanner is installed to the server

If the issue  was caused after making changes in application, check what exactly has changed since it was working previously?  Was something upgraded?  Added?  Pointing to a new database or other external system?

Collect a series of thread dumps during your startup period so we can see what it might be getting stuck on.

Make sure to add the setting to the domain.conf on the Domain controller  and  Slave Host controller

Once you  collect we can analyse them and to see whether there is some sort of deadlock or resource that your threads are waiting on that's preventing them from completing the deployment etc.

Symptoms

When starting JBoss, the following error is printed in application server log:

ERROR [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" => "native-interface")

]'

JBoss then fails to deploy.

Cause

This error message is printed out when the management-native socket defined in standalone.xml located in /standalone/configuration takes longer than the configured timeout value to load. By default, this value is set to 300 seconds.

Action

Open standalone.conf (Unix) or standalone.conf.bat (Windows) located in /bin and verify the following timeout value is large enough:

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

Open standalone.xml and modify the default-timeout property in the coordinator-environment element to a larger value (e.g., 1000):

Note: In case the changes are not applied, clear the JBoss cache by deleting the following folders:

/standalone/data

/standalone/tmp

Affected Versions

This article applies to all versions of Appian using JBoss as an application server.

Last Reviewed: February 2017

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值