Weblogic的生产模式与开发

昨天启动Weblogic adminServer失败,报错信息如下:

<Feb 18, 2013 9:51:05 AM CST> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: java.lang.AssertionError: java.lang.reflect.InvocationTargetException
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
 at weblogic.descriptor.DescriptorManager$SecurityServiceImpl$SecurityProxy._invokeServiceMethod(DescriptorManager.java:175)
 at weblogic.descriptor.DescriptorManager$SecurityServiceImpl$SecurityProxy.decrypt(DescriptorManager.java:192)
 at weblogic.descriptor.DescriptorManager$SecurityServiceImpl.decrypt(DescriptorManager.java:114)
 at weblogic.descriptor.internal.AbstractDescriptorBean._decrypt(AbstractDescriptorBean.java:991)
 at weblogic.management.configuration.SecurityConfigurationMBeanImpl.getCredential(SecurityConfigurationMBeanImpl.java:736)
 Truncated. see log file for complete stacktrace

Caused By: java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:600)
 at weblogic.descriptor.DescriptorManager$SecurityServiceImpl$SecurityProxy._invokeServiceMethod(DescriptorManager.java:173)
 Truncated. see log file for complete stacktrace

Caused By: weblogic.security.internal.encryption.EncryptionServiceException: com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte.
 at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptBytes(JSafeEncryptionServiceImpl.java:125)
 at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptString(JSafeEncryptionServiceImpl.java:173)
 at weblogic.security.internal.encryption.ClearOrEncryptedService.decrypt(ClearOrEncryptedService.java:96)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
 Truncated. see log file for complete stacktrace

Caused By: com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte.
 at com.rsa.jsafe.JA_PKCS5Padding.a(Unknown Source)
 at com.rsa.jsafe.JG_BlockCipher.decryptFinal(Unknown Source)
 at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptBytes(JSafeEncryptionServiceImpl.java:113)
 at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptString(JSafeEncryptionServiceImpl.java:173)
 at weblogic.security.internal.encryption.ClearOrEncryptedService.decrypt(ClearOrEncryptedService.java:96)
 Truncated. see log file for complete stacktrace
> 
<Feb 18, 2013 9:51:05 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED> 
<Feb 18, 2013 9:51:05 AM CST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down> 
<Feb 18, 2013 9:51:05 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN> 

这应该是密码解析问题,在%DOMAIN_HOME%/servers/AdminServer/security/boot.properties中看到用户名和密码是明文,记得前段将用户名和密码从startWebLogic.sh放到了boot.properties,应该是这个问题造成的。在网上搜索解决方法,有一篇https://forums.oracle.com/forums/thread.jspa?threadID=1022442

Weblogic开发模式与生产模式互换:

WebLogic安装时默认是开发模式,为了模拟生产环境就选择了生产模式,为了缩短测试环境部署周期,想使用WebLogic的FastSwap技术,而FastSwap只支持开发模式,于是通过改变配置实现开发模式和生产模式的切换。

1、生产模式--》开发模式

    将domain路径下%DOMAIN_HOME%\bin\setDomainEnv.cmd文件set PRODUCTION_MODE=true 更改为 set PRODUCTION_MODE=false 或set PRODUCTION_MODE=

    将%DOMAIN_HOME%\config\config.xml文件中<production-mode-enabled>true</production-mode-enabled>更改为<production-mode-enabled>false</production-mode-enabled>或者直接删掉。

2、开发模式--》生产模式

    将domain路径下%DOMAIN_HOME%\bin\setDomainEnv.cmd文件set PRODUCTION_MODE= 更改为 set PRODUCTION_MODE=true

步骤一:如果你的Weblogic是生产模式请将其改成开发模式(可参看http://blog.csdn.net/cuihaiyang/article/details/8289148),否则weblogic不支持在config.xml中使用明文密码而启动失败。

 将domain路径下%DOMAIN_HOME%\bin\setDomainEnv.cmd文件set PRODUCTION_MODE=true 更改为 set PRODUCTION_MODE=false 或set PRODUCTION_MODE=

    将%DOMAIN_HOME%\config\config.xml文件中<production-mode-enabled>true</production-mode-enabled>更改为<production-mode-enabled>false</production-mode-enabled>或者直接删掉。

步骤二:修改%DOMAIN_HOME%/config/config.xml文件,将

<default-realm>myrealm</default-realm>

<credential-encrypted>weblogic123</credential-encrypted>

<node-manager-username>weblogic</node-manager-username>

<node-manager-password-encrypted>weblogic123</node-manager-password-encrypted>


<embedded-ldap>

<name>base_domain</name>

<credential-encrypted>weblogic123</credential-encrypted>

</embedded-ldap>

中加密的用户名和密码替换成自己的用户名和密码(我的用户名weblogic,密码weblogic123),再次启动Weblogic成功。weblogic会自动将%DOMAIN_HOME%/servers/AdminServer/security/boot.properties中的用户名和密码加密。

#Mon Feb 18 09:54:46 CST 2013

password={AES}9ymlSJ82yzBzGH0sLgATptcNvdJ1tn6Wdbt248iMRnY\=

username={AES}RnjKpCymMz0aVpuFc5V0ok8A8xJV5od21aWerppJ9V4\=

步骤三:在控制台(base_domain-》安全)修改realm、nodemananger和ldap的密码

保存后weblogic会自动加密密码并更新到config.xml中

<credential-encrypted>{AES}wv4rulmnNCdQZhope1ehp6TGnE9YOzqhOwCTSL3xOBw=</credential-encrypted>

<node-manager-username>weblogic</node-manager-username>

<node-manager-password-encrypted>{AES}XhbgIeSqoN2SCg7hxhfeo7hAfgvLrEX3dgEyRMtTdNI=</node-manager-password-encrypted>


<embedded-ldap>

<name>base_domain</name>

<credential-encrypted>{AES}wSZq29RMDZWOQGXjD2l45VEdEfua3n3G1bNAabWfFQk=</credential-encrypted>

<backup-hour>23</backup-hour>

<backup-minute>5</backup-minute>

<backup-copies>7</backup-copies>

<cache-enabled>true</cache-enabled>

<cache-size>32</cache-size>

<cache-ttl>60</cache-ttl>

<refresh-replica-at-startup>false</refresh-replica-at-startup>

<master-first>false</master-first>

<timeout>0</timeout>

<anonymous-bind-allowed>false</anonymous-bind-allowed>

</embedded-ldap>

步骤四:与步骤一相反,关闭Weblogic,将Weblogic从开发模式改成生产模式,重新启动。

 

文章转自:http://blog.csdn.net/cuihaiyang/article/details/8586795

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值