在VM(VirtualBox和VMware)下,Weblogic启动缓慢(11分钟) [英] Weblogic is slow to start (11mins) under VM (VirtualBox and VMware)

查看:268
本文介绍了在VM(VirtualBox和VMware)下,Weblogic启动缓慢(11分钟)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(已解决!通过FAKING SYSTEM随机发生器,请参见下文)



我正在为我的dev / build设置VM映像球队。在该VM内部,应该运行Weblogic域。我使用Ububtu服务器发行版,WLS 9.2MP3 + ALSB。



一切正常,非常快,但在开始时WLS会在可测量的时间内停止两次。两站总共延迟约10分钟。对于部署需要重新启动服务器的任务,这非常烦人。 : - (



睡眠时间不是恒定的,有时服务器启动速度非常快,有时也是如此,有时是10分钟或更长时间。



有趣的是,如果我在查看已停止的服务器时按Enter键,它会更快地唤醒,有时会在几秒钟后唤醒.WLST(Weblogic Jython shell)在VM中执行时也会挂起很长时间。虽然它没有对Enter作出反应。



这里必须是一些使用VM运行WLS的开发人员。我想知道其他人是否有同样的问题?是不是有人能解决吗?



这是服务器输出(仅适用于一个案例):

  Java(TM)2运行时环境,标准版(版本1.5.0_12-b04)
Java HotSpot(TM)客户端VM(版本1.5.0_12-b04,混合模式)
用行开始WLS:
/ shared2 / beahome / jdk150_12 / bin / java -client -Xmx256m -XX:MaxPermSize = 128m -Xverify:none -da -Dplatform.home = / shared2 / beahome / weblogic92
-Dwls.home = / shared2 / beahome / web logic92 / server -Dwli.home = / shared2 / beahome / weblogic92 / integration -Dweblogic.management.discover = true -Dwl
w.iterativeDev = -Dwlw.testConsole = -Dwlw.logErrorsToConsole = -Dweblogic.ext.dirs = / shared2 / beahome / patch_weblogic923 / profiles / default / sysext_
manifest_classpath -Dweblogic.management.username = admin -Dweblogic.management.password = wlsadmin -Dweblogic.Name = LOGMGR-admin -Djava.security
.policy = / shared2 / beahome / weblogic92 / server / lib / weblogic.policy weblogic.Server
< 1-Apr-2010 12:47:22 PM GMT-05:00> <公告> < WebLogicServer> < BEA-000395> <以下扩展目录内容添加到类路径的结尾

/shared2/beahome/weblogic92/platform/lib/p13n/p13n-schemas.jar:/shared2/beahome/weblogic92/platform/ lib / p13n / p13n_common.jar:/ shared2 / beahom
e / weblogic92 / platform / lib / p13n / p13n_system.jar:/shared2/beahome/weblogic92/platform/lib/wlp/netuix_common.jar:/ shared2 / beahome / weblogic92 / pl
atform / lib / wlp / netuix_schemas.jar:/shared2/beahome/weblogic92/platform/lib/wlp/netuix_system.jar:/ shared2 / beahome / weblogic92 / platform / lib / wl
P / WSRP-common.jar>
< 1-Apr-2010 12:47:22 PM GMT-05:00> <信息> < WebLogicServer> < BEA-000377> <从Sun Microsystems Inc.启动带有Java HotSpot(TM)客户端VM的WebLogic Server,来自Sun Microsystems Inc.的1.5.0_12-b04>
< 1-Apr-2010 12:47:23 PM GMT-05:00> <信息> <管理> < BEA-141107> < Version:WebLogic Server 9.2 MP3 Mon Mar 10 08:28:41 EDT 2008
1096261>
< 1-Apr-2010 12:47:25 PM GMT-05:00> <信息> < WebLogicServer> < BEA-000215> < Loaded License:/shared2/beahome/license.bea>
< 1-Apr-2010 12:47:25 PM GMT-05:00> <公告> < WebLogicServer> < BEA-000365> <服务器状态已更改为STARTING>
< 1-Apr-2010 12:47:25 PM GMT-05:00> <信息> <&的WorkManager GT; < BEA-002900> <初始化自调整线程池>
< 1-Apr-2010 12:47:25 PM GMT-05:00> <公告> <日志管理> < BEA-170019> <服务器日志文件/ shared2 / wldomains / beaadmd / LOGMGR / ser
vers / LOGMGR-admin / logs / LOGMGR-admin.log已打开。所有服务器端日志事件都将写入此文件。>

这里我们有第一次延迟,最多5分钟......

 < 1-Apr-2010 12:53:21 PM GMT-05:00> <公告> <安全和GT; < BEA-090082> <使用安全领域myrealm初始化安全性。> 
< 1-Apr-2010 12:53:24 PM GMT-05:00> <公告> < WebLogicServer> < BEA-000365> <服务器状态更改为STANDBY>
< 1-Apr-2010 12:53:24 PM GMT-05:00> <公告> < WebLogicServer> < BEA-000365> <服务器状态已更改为STARTING>
< 1-Apr-2010 12:53:25 PM GMT-05:00> <公告> <日志管理> < BEA-170027> <服务器完全初始化域日志广播器成功
。现在,日志消息将被广播到域日志。>
< 1-Apr-2010 12:53:25 PM GMT-05:00> <公告> < WebLogicServer> < BEA-000365> <服务器状态已更改为ADMIN>
< 1-Apr-2010 12:53:25 PM GMT-05:00> <公告> < WebLogicServer> < BEA-000365> <服务器状态更改为RESUMING>
< 1-Apr-2010 12:53:28 PM GMT-05:00> <公告> <安全和GT; < BEA-090171> <从jks密钥库文件/shared2/wldomains/beaadmd/LOGMGR/CustomIdentity.jks.>加载存储在t
下的别名adminuialias下的身份证书和私钥;

这是第二次,最多5分钟。

 < 1-Apr-2010 12:58:56 PM GMT-05:00> <公告> <安全和GT; < BEA-090169> <从jks密钥库文件/ shared 
2 / wldomains / beaadmd / LOGMGR / CustomTrust.jks中加载可信证书。>
< 1-Apr-2010 12:58:57 PM PMT-05:00> <公告> <服务器> < BEA-002613> <频道DefaultSecure正在侦听192.168.56.102:7002 f
或协议iiops,t3s,ldaps,https。>
< 1-Apr-2010 12:58:57 PM PMT-05:00> <公告> <服务器> < BEA-002613> <频道默认现在在192.168.56.102:8012上收听pro
tocols iiop,t3,ldap,http。>
< 1-Apr-2010 12:58:57 PM PMT-05:00> <公告> < WebLogicServer> < BEA-000331> <已启动WebLogic Admin ServerLOGMGR-adminfor domain
LOGMGR在开发模式下运行>
< 1-Apr-2010 12:58:57 PM PMT-05:00> <公告> < WebLogicServer> < BEA-000365> <服务器状态已更改为RUNNING>
< 1-Apr-2010 12:58:57 PM PMT-05:00> <公告> < WebLogicServer> < BEA-000360> <服务器以RUNNING模式启动>

更新



<我认为我已经有了这条赛道:它必须是randon种子初始化。这可以解释为什么生成键盘事件会释放服务器。我做了线程转储,一个线程处于runnable状态,但是等待:

 [STANDBY] ExecuteThread:' 1'用于队列:'weblogic.kernel.Default(自调整)'守护进程prio = 1 tid = 0x0a7b06e8 nid = 0xeda runnable [0x728a500 
0..0x728a6d80]
at java.io.FileInputStream .readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:194)
at sun.security.provider.NativePRNG $ RandomIO.readFully(NativePRNG.java:185)
at sun.security.provider.NativePRNG $ RandomIO.implGenerateSeed(NativePRNG.java:202)
- 已锁定< 0x7d928c78> (a java.lang.Object)
at sun.security.provider.NativePRNG $ RandomIO.access $ 300(NativePRNG.java:108)
at sun.security.provider.NativePRNG.engineGenerateSeed(NativePRNG.java :102)
at java.security.SecureRandom.generateSeed(SecureRandom.java:475)
at weblogic.security.AbstractRandomData.ensureInittedAndSeeded(AbstractRandomData.java:83)


解决方案

已解决



Weblogic使用SecureRandom来初始化安全子系统。 SecureRandom默认使用/ dev / urandom设备。出于某种原因,在VM下读取此设备会经常停止。生成控制台事件有助于创建更多随机性,并释放WLS。



出于测试目的,我更改了jre / lib / security / java.security文件:

  securerandom.source = file:/tmp/big.random.file 

Weblogic现在开始15秒。



由于我们不测试VM中的任何安全性内容,重复种子对我们来说完全没问题。


(SOLVED! BY FAKING SYSTEM RANDOM GENERATOR, SEE BELOW)

I'm setting up a VM image for my dev/build team. Inside that VM a Weblogic domain should be running. I use Ububtu server distro, WLS 9.2MP3 + ALSB.

Everything works OK, quite fast, but at the start time the WLS stops twice for a measurable amounts of time. Two stops in total amount to about 10 minutes delay. For tasks where deployment requires server restart it's very annoying. :-(

Sleeping time is not constant, sometimes the server starts very fast, sometimes so-so, sometimes 10 minutes or more.

Interesting that if I press Enter while looking at the stopped server, it wakes up much faster, sometimes after a few seconds. WLST (Weblogic Jython shell) is also hanging for quite a time when executed in VM. It doesn't react to Enter though.

Here must be some developers who run WLS with a VM. I wonder if others have the same problem? Was someone able to solve it?

Here's the server output (just for a case):

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode)
Starting WLS with line:
/shared2/beahome/jdk150_12/bin/java -client   -Xmx256m  -XX:MaxPermSize=128m  -Xverify:none  -da -Dplatform.home=/shared2/beahome/weblogic92
 -Dwls.home=/shared2/beahome/weblogic92/server -Dwli.home=/shared2/beahome/weblogic92/integration  -Dweblogic.management.discover=true  -Dwl
w.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/shared2/beahome/patch_weblogic923/profiles/default/sysext_
manifest_classpath -Dweblogic.management.username=admin -Dweblogic.management.password=wlsadmin -Dweblogic.Name=LOGMGR-admin -Djava.security
.policy=/shared2/beahome/weblogic92/server/lib/weblogic.policy   weblogic.Server
<1-Apr-2010 12:47:22 o'clock PM GMT-05:00> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end
of the classpath:
/shared2/beahome/weblogic92/platform/lib/p13n/p13n-schemas.jar:/shared2/beahome/weblogic92/platform/lib/p13n/p13n_common.jar:/shared2/beahom
e/weblogic92/platform/lib/p13n/p13n_system.jar:/shared2/beahome/weblogic92/platform/lib/wlp/netuix_common.jar:/shared2/beahome/weblogic92/pl
atform/lib/wlp/netuix_schemas.jar:/shared2/beahome/weblogic92/platform/lib/wlp/netuix_system.jar:/shared2/beahome/weblogic92/platform/lib/wl
p/wsrp-common.jar>
<1-Apr-2010 12:47:22 o'clock PM GMT-05:00> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Ve
rsion 1.5.0_12-b04 from Sun Microsystems Inc.>
<1-Apr-2010 12:47:23 o'clock PM GMT-05:00> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.2 MP3  Mon Mar 10 08:28:41 EDT 2008
1096261 >
<1-Apr-2010 12:47:25 o'clock PM GMT-05:00> <Info> <WebLogicServer> <BEA-000215> <Loaded License : /shared2/beahome/license.bea>
<1-Apr-2010 12:47:25 o'clock PM GMT-05:00> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<1-Apr-2010 12:47:25 o'clock PM GMT-05:00> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<1-Apr-2010 12:47:25 o'clock PM GMT-05:00> <Notice> <Log Management> <BEA-170019> <The server log file /shared2/wldomains/beaadmd/LOGMGR/ser
vers/LOGMGR-admin/logs/LOGMGR-admin.log is opened. All server side log events will be written to this file.>

Here we have the first delay, up to 5 mins...

<1-Apr-2010 12:53:21 o'clock PM GMT-05:00> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<1-Apr-2010 12:53:24 o'clock PM GMT-05:00> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<1-Apr-2010 12:53:24 o'clock PM GMT-05:00> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<1-Apr-2010 12:53:25 o'clock PM GMT-05:00> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster success
fully. Log messages will now be broadcasted to the domain log.>
<1-Apr-2010 12:53:25 o'clock PM GMT-05:00> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
<1-Apr-2010 12:53:25 o'clock PM GMT-05:00> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
<1-Apr-2010 12:53:28 o'clock PM GMT-05:00> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under t
he alias adminuialias from the jks keystore file /shared2/wldomains/beaadmd/LOGMGR/CustomIdentity.jks.>

And here is the second, again up to 5 mins.

<1-Apr-2010 12:58:56 o'clock PM GMT-05:00> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /shared
2/wldomains/beaadmd/LOGMGR/CustomTrust.jks.>
<1-Apr-2010 12:58:57 o'clock PM GMT-05:00> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure" is now listening on 192.168.56.102:7002 f
or protocols iiops, t3s, ldaps, https.>
<1-Apr-2010 12:58:57 o'clock PM GMT-05:00> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.56.102:8012 for pro
tocols iiop, t3, ldap, http.>
<1-Apr-2010 12:58:57 o'clock PM GMT-05:00> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "LOGMGR-admin" for domain "
LOGMGR" running in Development Mode>
<1-Apr-2010 12:58:57 o'clock PM GMT-05:00> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<1-Apr-2010 12:58:57 o'clock PM GMT-05:00> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

UPDATE

I think I've got the track: it must be the randon seed initialization. That may explain why generating keyboard events release the server. I've made the thread dump, and one thread is in runnable state, but waiting:

"[STANDBY] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=1 tid=0x0a7b06e8 nid=0xeda runnable [0x728a500
0..0x728a6d80]
        at java.io.FileInputStream.readBytes(Native Method)
        at java.io.FileInputStream.read(FileInputStream.java:194)
        at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:185)
        at sun.security.provider.NativePRNG$RandomIO.implGenerateSeed(NativePRNG.java:202)
        - locked <0x7d928c78> (a java.lang.Object)
        at sun.security.provider.NativePRNG$RandomIO.access$300(NativePRNG.java:108)
        at sun.security.provider.NativePRNG.engineGenerateSeed(NativePRNG.java:102)
        at java.security.SecureRandom.generateSeed(SecureRandom.java:475)
        at weblogic.security.AbstractRandomData.ensureInittedAndSeeded(AbstractRandomData.java:83)

解决方案

SOLVED

Weblogic uses SecureRandom to init security subsystem. SecureRandom by default uses /dev/urandom device. For some reason, reading this device under VM comes to halt quite often. Generating console events helps to create more randomness, and release the WLS.

For the test purposes I have changed jre/lib/security/java.security file:

securerandom.source=file:/tmp/big.random.file

Weblogic now starts in 15 seconds.

Since we do not test any security stuff in our VMs, the repeating seed is totally alright for us.

这篇关于在VM(VirtualBox和VMware)下,Weblogic启动缓慢(11分钟)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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