改善 JBoss 5 启动缓慢 [英] Improving JBoss 5 slow startup

查看:20
本文介绍了改善 JBoss 5 启动缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们从 JBoss 4(和 JDK 5)升级到 JBoss 5(和 JDK 6).问题是开始时间从 1.5 分钟(在 JBoss 4 上)变成了 4 多分钟.

We upgraded from JBoss 4 (and JDK 5) to JBoss 5 (and JDK 6). The problem is that the start time has gone from 1.5 minutes (on JBoss 4) to more than 4 minutes.

18:53:35,444 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 3m:9s:262ms

似乎 JBoss 初始化时间最长的组件是 JMX

It seems like the component that is taking JBoss the longest time to initialize is the JMX

18:50:41,926 INFO  [LogNotificationListener] Adding notification listener for logging mbean "jboss.system:service=Logging,type=Log4jService" to server org.jboss.mx.server.MBeanServerImpl@1adc122[ defaultDomain='jboss' ]
18:52:38,797 INFO  [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://lharel2/jndi/rmi://lharel2:1090/jmxconnector

从 DEBUG 服务器日志,我在有问题的时间得到这些行:

From the DEBUG server log, I get these lines at the problematic time:

2009-12-18 18:51:00,886 DEBUG [org.jboss.deployment.MappedReferenceMetaDataResolverDeployer] (main) vfsfile:/C:/QC/Views/QCDev/jboss-5.1.0.GA/server/default/deploy/jmx-console.war/ endpoint mappings:
2009-12-18 18:51:00,886 DEBUG [org.jboss.deployment.MappedReferenceMetaDataResolverDeployer] (main) Processing unit=jmx-console.war, structure: jmx-console.war
2009-12-18 18:52:35,209 DEBUG [org.jboss.deployment.OptAnnotationMetaDataDeployer] (main) Deployment is metadata-complete, skipping annotation processing, ejbJarMetaData=null, jbossWebMetaData=org.jboss.metadata.web.spec.Web23MetaData@1f, jbossClientMetaData=null, metaDataCompleteIsDefault=false

项目中没有 EJB.

内存设置为:

 -Xms128m -Xmx512m -XX:MaxPermSize=256m

您知道如何改进 JBoss 启动时间吗?

Do you have any idea how JBoss start time can be improved?

更新: 到目前为止没有运气,我尝试了 shreeni 的建议(更改了扫描 xmls).服务器未在调试模式下运行,因此 MicSim 的建议不相关

Update: so far no luck, I tried shreeni's suggestion (changed the scanning xmls). The server is not running in debug mode so MicSim's suggestion is not relevant

推荐答案

没有更多信息的情况下射入蓝天

A shot into the blue sky without more information

  • 网络超时:部署 jmx-console.war 时的 1.5 分钟延迟可能表示网络超时(例如 3 x 30 秒).尝试启动 JBoss 并使用 -b 命令行参数或 jboss.bind.address 系统属性将其绑定到特定的 IP 地址.此外,请尝试确保系统上的主机和 DNS 解析设置正确.

  • Network timeouts: 1,5 minutes of delay when deploying jmx-console.war may indicate a network timeout (e.g. 3 x 30 seconds). Try to start JBoss and bind it to a specific IP address using the -b command line argument or the jboss.bind.address system property. Also, try to make sure your host and DNS resolution settings on your system are correct.

JMX 也使用 RMI,您可能希望将RMI 服务器主机名设置为系统属性.在某些 Linux 发行版上,RMI 在查找正确的主机名方面存在问题,并且 jmx-console.war 可能会尝试连接到错误的本地主机".系统属性是 java.rmi.server.hostname

JMX is also using RMI and you may want to set the RMI server host name as system property. On some Linux distributions, RMI has problems with looking up the correct hostname and jmx-console.war may try to connect to the 'wrong localhost'. The system property is java.rmi.server.hostname

系统跟踪:如果这没有帮助,您可能需要使用 strace 来启动 java 进程,这样您就可以看到系统挂起(如果它确实由于网络超时或类似原因而挂起).

System tracing: If that does not help, you may want to use strace to start the java process, so you can see the point where the system hangs (if it really does hang due to a network timeout or similar).

这篇关于改善 JBoss 5 启动缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆