解决 Wildfly 启动超时(concurrent timeout)

问题

在做项目的过程中,由于项目比较庞大,并且使用了 VPN 导致网络较差。在启动时经常报启动超时的错误,错误详情如下:

16:38:04,388 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0348: 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")
]'
16:38:05,642 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0019: Stopped Driver service with driver-name = Aerobay.war_com.mysql.jdbc.Driver_5_1
16:38:09,548 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0190: Step handler org.jboss.as.server.DeployerChainAddHandler$FinalRuntimeStepHandler@5f88823f 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:396)
    ......

从错误信息里面可以看出来,wildfly 在 300 秒内没有启动成功,导致 wildfly 自动停止启动。

解决方案

可以适当延长 wildfly 启动时间限制,比如把默认的 300 秒调成 600 秒。

在 standalone.bat 中增加一行配置:

set "JAVA_OPTS=%JAVA_OPTS% -Djboss.as.management.blocking.timeout=600

如果使用 ide 开发工具的话,可以在 wildfly 配置页面增加一行配置:(这边以 IDEA 为例)

-Djboss.as.management.blocking.timeout=600

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值