一、前言
接下来介绍项目中weblogic中间件在迁移过程中碰到的一系列坑,并提供相应解决办法。
二、weblogic常见问题
问题 1 : WebLogic Managed Server 无法连接连接 Admin Server
现象: WebLogic Managed Server Cannot Communicate With Admin Server Because of Wrong IP Address Used
问题原因:
主机名未配置到 hosts 文件
解决方法:
在 hosts 文件配置 ip 主机名
问题 2 : weblogic11g 部署应用 bea-240003 失败
现象:
问题原因:
新建连接池失败,主要因为 db 的监听对中间件主机 ip 限制导致
解决方法:
在 db 监听中加入监听 ip 即可解决
问题 3 :使用 64bit jdk 但没有正常加载 64bit 的性能包
现象:
Unable To Load Performance Pack, Error code: BEA-000438
问题原因:
预设性能包加载失败
解决方法:
Set the following in commEnv.sh:
JAVA_USE_64BIT=true
SUN_ARCH_DATA_MODEL="64"
问题 4 : weblogic 升级过程中出现大量中文乱码问题
现象:
has wrong version 50.0, should be 48.0
问题原因:
升级后主机默认字符集不一致
解决方法:
在启动 weblogic 时加上 JAVA_OPTIONS=-Dfile.encoding=GBK 解决以上问题
在 startweblogic,cmd 中加上
if "%WLS_REDIRECT_LOG%"=="" (
echo Starting WLS with line:
echo %JAVA_HOME%\bin\java %JAVA_VM%
%MEM_ARGS% %JAVA_OPTIONS% -Dweblogic.Name=%SERVER_NAME%
-Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy
%PROXY_SETTINGS% %SERVER_CLASS%
%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS%
%JAVA_OPTIONS% -Dfile.encoding=GBK -Dweblogic.Name=%SERVER_NAME%
-Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy
%PROXY_SETTINGS% %SERVER_CLASS%
) else (
问题 5 : weblogic11g 无法启动,报 Security:090399
现象:
启动失败,报如下信息:
There are 1 nested errors:
weblogic.security.service.SecurityServiceRuntimeException: [Security:090399]Secu
rity Services Unavailable
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.do
BootAuthorization(CommonSecurityServiceManagerDelegateImpl.java:916)
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.in
itialize(CommonSecurityServiceManagerDelegateImpl.java:1050)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
erviceManager.java:875)
at weblogic.security.SecurityService.start(SecurityService.java:141)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
<2013-9-29
下午
03
时
00
分
03
秒
CST>
state changed to FAILED>
<2013-9-29
下午
03
时
00
分
03
秒
CST>
al service failed. The server will shut itself down>
<2013-9-29
下午
03
时
00
分
03
秒
CST>
state changed to FORCE_SHUTTING_DOWN>
问题原因:
当机器存在多个网卡时,服务器可能会无法确认选择正确的适配器,所以注意在新建域的时候监听地址使用IP 地址而不要使用域名地址,如不要使用localhost
解决方法:
修改 config.xml 以下加粗内容:
问题 6 : weblogic 使用文件夹模式部署应用失败
现象:
java.io.IOException: [DeploymentService:290066]Error occurred while downloading files from admin server for deployment request "1,386,836,887,172". Underlying error is: "null"
at weblogic.deploy.service.datatransferhandlers.HttpDataTransferHandler.getDataAsStream(HttpDataTransferHandler.java:86)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager$RemoteDataTransferHandler.getDataAsStream(DataHandlerManager.java:153)
at weblogic.deploy.internal.targetserver.datamanagement.AppDataUpdate.doDownload(AppDataUpdate.java:39)
问题原因:
主要是因为应用程序过大,或者程序嵌套过深,小文件太多等原因导致从admin server 下载程序时出错
解决方法:
1. 使用 external_stage 方法:
The Administration Server does not copy deployment files. Instead, the Administrator must ensure that deployment files are distributed to the correct staging directory location before deployment (for example, by manually copying files prior to deployment).
With external_stage deployments, the Administration Server requires a copy of the deployment files for validation purposes. Copies of the deployment files that reside in target servers' staging directories are not validated before deployment.
详细请参考: http://docs.oracle.com/cd/E23943_01/web.1111/e13702/deploy.htm
即把应用程序分别拷贝到相应的机器上,然后选择 external_stage 模式
2. 把程序打包成 war 或者 ear 文件,这样由于应用程序传输时是作为一个文件传输的,所以一般不存在太大问题。
有需要的朋友可以关注我的公众号,文章每日一更
