Weblogic :解决Managed Server启动非常慢的情况            

       分类:             WebLogic         2075人阅读     评论(0)     收藏     举报    

版本:10.3.6

环境:Oracle Enterprise Linux 6.0(虚拟机)

现象:当Weblogic Managed Server启动时,到达下列日志的最后一行时,要过很久(5分钟以上)才能继续显示下一行日志。


[plain] view plaincopyprint?

  1. [weblogic@vm-cportalapp-tst bin]$ nohup: appending output to “nohup.out”  

  2.   

  3. [weblogic@vm-cportalapp-tst bin]$ tail -f nohup.out  

  4. Java(TM) SE Runtime Environment (build 1.6.0_37-b06)  

  5. Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)  

  6. Starting WLS with line:  

  7. /app/mid/jdk1.6.0_37/bin/java -server   -Xms512m -Xmx1024m  -XX:MaxPermSize=1024m -Dweblogic.Name=WLS_CPORTAL -Djava.security.policy=/app/mid/weblogic_home/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.policy  -Dweblogic.ProductionModeEnabled=true -Dweblogic.security.SSL.trustedCAKeyStore=/app/mid/weblogic_home/Oracle/Middleware/wlserver_10.3/server/lib/cacerts   -da -Dplatform.home=/app/mid/weblogic_home/Oracle/Middleware/wlserver_10.3 -Dwls.home=/app/mid/weblogic_home/Oracle/Middleware/wlserver_10.3/server -Dweblogic.home=/app/mid/weblogic_home/Oracle/Middleware/wlserver_10.3/server  -Dcommon.components.home=/app/mid/weblogic_home/Oracle/Middleware/oracle_common -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02 -Djrockit.optfile=/app/mid/weblogic_home/Oracle/Middleware/oracle_common/modules/oracle.jrf_11.1.1/jrocket_optfile.txt -Doracle.server.config.dir=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/config/fmwconfig/servers/WLS_CPORTAL -Doracle.domain.config.dir=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/config/fmwconfig  -Digf.arisidbeans.carmlloc=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/config/fmwconfig/carml  -Digf.arisidstack.home=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/config/fmwconfig/arisidprovider -Doracle.security.jps.config=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/config/fmwconfig/jps-config.xml -Doracle.deployed.app.dir=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/servers/WLS_CPORTAL/tmp/_WL_user -Doracle.deployed.app.ext=/- -Dweblogic.alternateTypesDirectory=/app/mid/weblogic_home/Oracle/Middleware/oracle_common/modules/oracle.ossoiap_11.1.1,/app/mid/weblogic_home/Oracle/Middleware/oracle_common/modules/oracle.oamprovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol  -Dweblogic.jdbc.remoteEnabled=false  -Dem.oracle.home=/app/mid/weblogic_home/Oracle/Middleware/oracle_common -Djava.awt.headless=true -Dweblogic.management.discover=false -Dweblogic.management.server=http://vm-cportalapp-tst:7002  -Djava.security.egd=file:/dev/./urandom -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/app/mid/weblogic_home/Oracle/Middleware/patch_wls1036/profiles/default/sysext_manifest_classpath:/app/mid/weblogic_home/Oracle/Middleware/patch_ocp371/profiles/default/sysext_manifest_classpath  weblogic.Server  

  8. <2013-8-26 上午10时41分36秒 CST>       

  9. <2013-8-26 上午10时41分37秒 CST>       

  10. <2013-8-26 上午10时41分37秒 CST>    

  11. /app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/lib/dbmsauth.jar:/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/lib/fonts.jar:/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/lib/runtime12.jar>   

  12. <2013-8-26 上午10时41分37秒 CST>       

  13. <2013-8-26 上午10时41分39秒 CST>       

  14. <2013-8-26 上午10时41分41秒 CST>       

  15. <2013-8-26 上午10时41分41秒 CST>       

  16. <2013-8-26 上午10时41分41秒 CST>       

[weblogic@vm-cportalapp-tst bin]$ nohup: appending output to “nohup.out”

[weblogic@vm-cportalapp-tst bin]$ tail -f nohup.out
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
Starting WLS with line:
/app/mid/jdk1.6.0_37/bin/java -server   -Xms512m -Xmx1024m  -XX:MaxPermSize=1024m -Dweblogic.Name=WLS_CPORTAL -Djava.security.policy=/app/mid/weblogic_home/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.policy  -Dweblogic.ProductionModeEnabled=true -Dweblogic.security.SSL.trustedCAKeyStore=/app/mid/weblogic_home/Oracle/Middleware/wlserver_10.3/server/lib/cacerts   -da -Dplatform.home=/app/mid/weblogic_home/Oracle/Middleware/wlserver_10.3 -Dwls.home=/app/mid/weblogic_home/Oracle/Middleware/wlserver_10.3/server -Dweblogic.home=/app/mid/weblogic_home/Oracle/Middleware/wlserver_10.3/server  -Dcommon.components.home=/app/mid/weblogic_home/Oracle/Middleware/oracle_common -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02 -Djrockit.optfile=/app/mid/weblogic_home/Oracle/Middleware/oracle_common/modules/oracle.jrf_11.1.1/jrocket_optfile.txt -Doracle.server.config.dir=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/config/fmwconfig/servers/WLS_CPORTAL -Doracle.domain.config.dir=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/config/fmwconfig  -Digf.arisidbeans.carmlloc=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/config/fmwconfig/carml  -Digf.arisidstack.home=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/config/fmwconfig/arisidprovider -Doracle.security.jps.config=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/config/fmwconfig/jps-config.xml -Doracle.deployed.app.dir=/app/mid/weblogic_home/Oracle/Middleware/user_projects/domains/CPortal_02/servers/WLS_CPORTAL/tmp/_WL_user -Doracle.deployed.app.ext=/- -Dweblogic.alternateTypesDirectory=/app/mid/weblogic_home/Oracle/Middleware/oracle_common/modules/oracle.ossoiap_11.1.1,/app/mid/weblogic_home/Oracle/Middleware/oracle_common/modules/oracle.oamprovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol  -Dweblogic.jdbc.remoteEnabled=false  -Dem.oracle.home=/app/mid/weblogic_home/Oracle/Middleware/oracle_common -Djava.awt.headless=true -Dweblogic.management.discover=false -Dweblogic.management.server=http://vm-cportalapp-tst:7002  -Djava.security.egd=file:/dev/./urandom -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/app/mid/weblogic_home/Oracle/Middleware/patch_wls1036/profiles/default/sysext_manifest_classpath:/app/mid/weblogic_home/Oracle/Middleware/patch_ocp371/profiles/default/sysext_manifest_classpath  weblogic.Server
<2013-8-26 上午10时41分36秒 CST>     
<2013-8-26 上午10时41分37秒 CST>     
<2013-8-26 上午10时41分37秒 CST>     
<2013-8-26 上午10时41分37秒 CST>     
<2013-8-26 上午10时41分39秒 CST>     
<2013-8-26 上午10时41分41秒 CST>     
<2013-8-26 上午10时41分41秒 CST>     
<2013-8-26 上午10时41分41秒 CST>    

解决方法:


1. 修改Weblogic对应JAVA_HOME下的jre/lib/security/java.security文件

[plain] view plaincopyprint?

  1. securerandom.source=file:/dev/./urandom  

securerandom.source=file:/dev/./urandom

2. 修改Weblogic Server的启动的JAVA_OPTION参数


[plain] view plaincopyprint?

  1. -Djava.security.egd=file:/dev/./urandom  

-Djava.security.egd=file:/dev/./urandom

修改后,出现下一行日志的时间有分钟级别缩短到秒级别(我的环境是10秒内)。


参考文献

1. 13.28.7 Random Number Generator May Be Slow on Machines With Inadequate Entropy

2. Weblogic is slow to start (11mins) under VM (VirtualBox and VMware)

3. Weblogic administration console way too slow

4. Oracle Support 

     The FMW Configuration Wizard Is Very Slow On Linux Virtual Environments. The Startup Of WLS Servers Is Also Very Slow. (文档 ID 1344974.1)