Weblogic 集群配置
两台机器配置集群,信息如下:
操作系统
| 网络配置
| 角色
| 备注
|
Windows win 7(32)
| IP:192.168.1.105
PORT:7002
| Administraor Server
Proxy Server
| 管理服务器
代理服务器
|
Windows win 7(32)
| IP:192.168.1.102
PORT:7001
| Managed Server
| 受管服务器
|
主控服务器配置(本机)
使用configuration wizard进行配置

选择“创建新的Weblogic域”,单击“下一步”按钮

默认选择安装“Basic WebLogic Server Domain”, 单击“下一步”按钮。

输入要创建的域名和位置,此处域名输入为 MyCluster_Domain,输入完成后单击“下一步”按钮。本文安装位置为C:\Oracle\Middleware\user_projects\domains目录下。


选择“生产模式”,因为我的版本是generanic版本(没有自带的Jrockit)

选择“管理服务器”��“受管服务器、群集和计算机”后,单击“下一步”按钮。

配置受管服务器
注意:代理服务器实际上也是一个受管理服务器
点击“添加”,输入 Managed Server 的名称,监听地址,监听端口,如果需要SSL 支持的话,可以在“SSL enabled”复选框上打勾,配置SSL 监听端口。

配置集群
单击“添加”,输入Cluster 的名称My_Cluster_1,Multicast address 组播地址(用来进行集群间的状态通信)和端口7777,Cluster 的各个服务器地址和端口。
提示:当用Configuration Wizard 创建集群时,您只能选择multicast,虽然官方文档推荐新建集群时使用unicast 消息机制;若选择unicast,您只能在Administration Console 中修改集群的配置,参考Oracle Fusion Middleware Oracle WebLogic Server Administration Console 帮助文档中的:"Create and configure clusters".
提示: multicast address 的IP 范围必须位于224.0.0.0 到 239.255.255.255 之间.
WebLogic Server 使用的multicast 默认值为 239.192.0.0. 您不能使用类似于x.0.0.1 的多播地址.

向集群分配服务器
选择左面列表中的Managed Server,将其添加到右面的列表中,注意这里代理服务器Proxy_Server 不要添加到右边,之后单击“下一步”按钮。

选中“创建HTTP 代理”复选框,My_Cluster_1 代理服务器选择Proxy_Server,单击“下一步”按钮。

配置计算机

选择左面列表中的Admin Server、Managed Servers、Proxy Server,将其添加到右面的计算机下,之后单击“下一步”按钮。
向集群配置计算机

配置概要信息

创建成功

编辑WebLogic 服务启动文件
编辑口令文件
在刚才创建的域目录下建立 boot.properties 文件,内容为:
username=weblogic
password=weblogic1
在本文的机器上,该文件的存储位置是:
C:\Oracle\Middleware\user_projects\domains\MyCluster_domain
编辑启动管理服务器的文件(可选,可直接运行startWebLogic.cmd 即可)
在刚才创建的域目录下的bin 目录中创建startAdminServer.cmd,内容为:
@ECHO OFF
@REM 启动管理服务器.
start .\startWebLogic
在本文的机器上,该文件的存储位置是:
C:\Oracle\Middleware\user_projects\domains\MyCluster_domain\bin
编辑启动代理服务器的文件
在刚才创建的域目录下的 bin 目录中创建startProxyServer.cmd,内容为:
@ECHO OFF
@REM 启动代理服务器
@REM 使用startManagedWeblogic 命令启动Managed Server,它的命令格式是:
@REM startManagedWeblogic.cmd Managed Server 的名称 Administrator Server 地址
@REM startManagedWeblogic 受管理服务器名称管理服务器 URL
start .\startManagedWebLogic Proxy_Server http://192.168.1.105:7002
在本文的机器上,该文件的存储位置是:
C:\Oracle\Middleware\user_projects\domains\MyCluster_domain\bin\startProxyServer.cmd。
编辑启动受管理服务器(ManagedServer_1)的文件
在刚才创建的域目录下的 bin 目录中创建startManagedServer_1.cmd,内容为:
@ECHO OFF
@REM 启动受管理服务 new_ManagedServer_1
@REM 使用startManagedWeblogic 命令启动Managed Server,它的命令格式是:
@REM startManagedWeblogic.cmd Managed Server 的名称 Administrator Server 地址
@REM startManagedWeblogic 受管理服务器名称管理服务器 URL
start.\startManagedWebLogic new_ManagedServer_1 http://192.168.1.105:7002
在本文的机器上,该文件的存储位置是:
C:\Oracle\Middleware\user_projects\domains\MyCluster_domain\bin\startManagedServer_1.cmd。
编辑启动代理服务器(ManagedServer_2)的文件
在刚才创建的域目录下的 bin 目录中创建startManagedServer_2.cmd,内容为:
@ECHO OFF
@REM 启动受管理服务 Cluster_ManagedServer_2
@REM 使用startManagedWeblogic 命令启动Managed Server,它的命令格式是:
@REM startManagedWeblogic.cmd Managed Server 的名称 Administrator Server 地址
@REM startManagedWeblogic 受管理服务器名称管理服务器 URL
start.\startManagedWebLogic new_ManagedServer_2 http://192.168.1.105:7002
在本文的机器上,该文件的存储位置是:
C:\Oracle\Middleware\user_projects\domains\MyCluster_domain\bin\startManagedServer_2.cmd
启动WebLogic 服务
建议按照顺序启动服务器,只有当管理服务器首先启动完毕后,受管服务器再启动。
启动的过程中,会让输入管理员用户名(weblogic)和密码(weblogic1),当所有服务器的控制台上出现Server started in RUNNING mode 字样时,整个集群启动完毕。
1.start weblogic.cmd

startProxyServer.cmd

startManagedServer_1.cmd

startManagedServer_2.cmd

主控端的服务启动完毕
再启动受控端的startManagedServer_3.cmd就可以访问控制台了。

主控端的配置应该是没有错的,貌似受控服务器端new_ManagedServer3出错了。
在受控端启动new_ManagedServer3脚本运行后的部分截图:
<2014-7-3 上午10时10分49秒 CST> <Critical> <WebLogicServer> <BEA-000386> <Serve
subsystem failed. Reason: java.lang.SecurityException: Method 'getAdministratinURL' cannot be invoked without
administrator access
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
at weblogic.server.channels.RemoteChannelServiceImpl_1036_WLStub.getAdm
nistrationURL(Unknown Source)
at weblogic.server.channels.RemoteChannelServiceImpl.registerInternal(R
moteChannelServiceImpl.java:183)
at weblogic.server.channels.RemoteChannelServiceImpl.registerForever(Re
oteChannelServiceImpl.java:146)
Truncated. see log file for complete stacktrace
Caused By: java.lang.SecurityException: Method 'getAdministrationURL' cannot be invoked without administrator access
上面貌似是受控服务器不能访问主控服务器,需要进一步查看。