我想检查一下我的JBoss EAP7是否通过jboss-cli
启动。
对于JBoss EAP6,我可以使用以下命令
jboss-cli.bat -c --commands="read-attribute server-state"
当服务器启动时,响应是starting
。当服务器成功引导时,响应为running
。
迁移到JBoss EAP7.0后,该命令在服务器启动时返回以下消息。Failed to connect to the controller: Timeout waiting for the system to boot.
当服务器成功启动时,返回通常的消息running
。
我的问题是:为什么jboss-cli
在启动之前无法连接到服务器?
发布于 2018-05-28 18:32:06
在EAP7.x和EAP6.3.0或更高版本中,您可以配置jboss.as.management.blocking.timeout
系统属性来调整等待服务容器稳定超时(秒)。通过CLI连接后,请尝试设置此参数。
从EAP6.3.0.ER8开始,jboss.as.controller中有了一个新的类: BlockingTimeout。此类加载系统属性jboss.as.management.blocking.timeout的值或默认为300 (秒)。因此,如果您的应用程序无法在给定的超时值内加载,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.
将抛出错误Failed to connect to the controller: Timeout waiting for the system to boot
jboss-cli.sh --connect --controller=IP:PORT --timeout=40000
将超时值配置为大于服务器启动所需的时间。
发布于 2019-07-22 19:10:49
实际的命令行是./jboss-cli.sh --连接command=“:读取属性(名称=服务器状态)”
https://stackoverflow.com/questions/50522925
复制相似问题