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

查看:102
本文介绍了改善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

从调试服务器日志中,我在有问题的时间得到了以下几行:

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的建议(更改了扫描xml).服务器未在调试模式下运行,因此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秒).尝试使用-b命令行参数或jboss.bind.address系统属性启动JBoss并将其绑定到特定的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天全站免登陆