设置基本的高可用性配置

设置并配置基本的高可用性环境的主服务器和备份服务器。

安装并配置 IBM HTTP Server 和 Web 服务器插件

注: 如果您使用 Developer for Workgroups 客户访问许可证,那么高可用性不受支持。
要安装并配置 IBM® HTTP Server 和 Web 服务器插件,请参阅下列资源:
  1. 安装 IBM HTTP Server:
  2. 安装 Web 服务器插件:
  3. 在不同的计算机上以远程方式配置 Web 服务器和应用程序服务器:
  4. 为了保护 Web 服务器与客户机之间的传输安全以及在 IBM HTTP Server 上启用 SSL:
注: 如果您计划将自签名 SSL 证书替换为贵公司的证书,请参阅安装安全证书。

在主服务器和备份服务器上安装并配置 Jazz 应用程序

注: jts.war、ccm.war 和 qm.war 应用程序使用空闲备用环境,而 rm.war 和 admin.war(生命周期项目管理)在备份服务器上保持处于停止状态(冷备用)。另请注意,admin.war (LPA) 和 jts.war 应用程序必须安装在同一服务器上。Jazz Team Server 发生故障转移时,请完全停止主服务器,进行故障转移以切换到备份服务器,然后在备份服务器上启动 admin.war 应用程序。
下表列示了这些部署指示信息中使用的缩写:
表 1. 缩写
缩写 术语
URI 统一资源标识
JTS Jazz Team Server V4
CCM “变更和配置管理”应用程序 V4
QM “质量管理”应用程序 V4
RM “需求管理”应用程序 V4
CLM Collaborative Lifecycle Management(JTS、CCM、QM 和 RM)
LPA 生命周期项目管理
要在主服务器和备份服务器上安装并配置 Rational solution for Collaborative Lifecycle Management (CLM) 应用程序的副本,请参阅设置 WebSphere® Application Server 和在 WebSphere Application Server 上部署 Rational solution for Collaborative Lifecycle Management 应用程序。
  1. 部署 Web 应用程序之后,请通过执行运行设置向导(定制设置)中的步骤配置主服务器。
    要点: 不要在备份服务器上运行 Jazz Team Server 安装向导。此向导只能在主服务器上运行。
  2. 将公用 URL 设置为指向 IBM HTTP Server,而不要指向应用程序服务器。
  3. 在安装并配置主服务器之后,请将其关闭,然后将其配置文件复制到备份服务器安装。

为主服务器和备份服务器配置高可用性

注: 此部分中的示例针对 jts.war 应用程序。您可以对 ccm.war 和 qm.war 应用程序使用同一过程。

通常,jts.war 应用程序在将单一应用程序服务器作为目标的情况下进行安装。由于引入了 Web 服务器,所以必须将应用程序容器配置修改为允许通过 Web 服务器进行路由。

要修改应用程序,请执行下列操作:
  1. 在 WebSphere 控制台中,单击企业应用程序下的 jts.war 应用程序链接。
  2. 选择管理模块。
  3. 选中 jts.war 应用程序模块的复选框。
  4. 在集群和服务器的列表中,同时选择 Web 服务器和应用程序服务器,然后单击应用。
  5. 单击确定,然后单击保存更改。
  6. 重新启动 jts.war 应用程序。
重新配置主要和备份 Jazz™Team Server 实例,使其引用同一个全文本索引位置。要保持索引最新并可供主服务器和备份服务器使用,请更新主服务器和备份服务器上 teamserver.properties 文件中的 com.ibm.team.fulltext.indexLocation 和 com.ibm.team.jfs.index.root.directory 属性,以便在共享驱动器上存储索引。
  • 此属性值是您可以在 Windows 上看到的示例:
    com.ibm.team.fulltext.indexLocation=I\:/sharedIndexFolder/workitemindex
  • 此属性设置是您可以在 Linux 上看到的示例:
    com.ibm.team.fulltext.indexLocation=/net/LinuxHost/sharedIndex/workitemindex

关闭备份服务器上的异步任务

为了避免两个运行中的 JazzTeam Server 之间发生可能的数据争用,必须关闭备份服务器上的异步(后台)任务。
  1. 在备份服务器上的 teamserver.properties 文件中添加下面这一行:
    com.ibm.team.repository.scheduler.migration.mode.enabled=true
  2. 在备份服务器上重新启动 jts.war 应用程序。
注: 对将会更改主服务器上的配置文件的异步任务应用任何更新后,确保上述属性保留在备份服务器上。
注: 关闭异步任务之后,备份服务器将不会运行这些异步任务。如果环境规定在延长期将备份服务器用作主服务器,那么应将此属性复位为 false,以在“高级属性”中启用后台任务。在重新启动主服务器之前,务必将此属性设置为 true。

编辑用于空闲备用配置的 Web 服务器 plugin_cfg.xml 文件

每次将 WebSphere Application Server 配置为通过 Web 服务器将请求路由到应用程序服务器时,Web 服务器的 plugin.xml 文件都将根据该应用程序服务器的连接信息进行更新。此时,您对 plugin-cfg.xml 文件进行了部分配置。在 Web 服务器上,请替换并接着编辑 plugin-cfg.xml 的下一节以完成配置。这个 plugin-cfg.xml 文件位于 Web 服务器的 plugin\config\webserver1 文件夹中,其中 webserver1 是您在上一节(安装并配置 IBM HTTP Server 和 Web 服务器插件)对该 Web 服务器指定的名称。

URI 组

根据高可用性环境设置不同,以及根据您是打算对每个应用程序分别使用一个 WebSphere Application Server 实例还是对所有应用程序使用一个应用程序服务器,您必须相应地进行规划。URI 组是集群提供的 URI 的逻辑分组。例如,如果对每个应用程序分别使用一个 WebSphere Application Server 实例,请为每个应用程序声明一个集群。这将对单一集群应用一个 URI 组。URI 分组可能与以下示例类似:

<!-- JTS URI Group -->
<UriGroup Name="default_host_JTS_basicHA_Cluster_URIs">
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/admin/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/jts/*"/>
</UriGroup>

<!-- CCM URI Group -->
<UriGroup Name="default_host_CCM_basicHA_Cluster_URIs">
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/ccm/*"/>
</UriGroup>

<!-- QM URI Group -->
<UriGroup Name="default_host_QM_basicHA_Cluster_URIs">
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/qm/*"/>
</UriGroup>

<!-- RM URI Group -->
<UriGroup Name="default_host_RM_basicHA_Cluster_URIs">
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/rm/*"/>
</UriGroup>

服务器集群

如果对每个应用程序设置一个 WebSphere Application Server 实例,那么必须将服务器集群设置为包括所有提供了一个应用程序 URI 的服务器。CLM 应用程序的服务器集群可能与以下示例类似:

<!-- JTS Server Cluster -->
<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="server1_jts_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
	<Server LoadBalanceWeight="0" ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="jts1Node01_server1" ServerIOTimeout="0" WaitForContinue="false">
		<Transport Hostname="jts1.example.com" Port="9080" Protocol="http"/>
		<Transport Hostname="jts1.example.com" Port="9443" Protocol="https">
			<Property Name="keyring" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.kdb"/>
			<Property Name="stashfile" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.sth"/>
		</Transport>
	</Server>
	<Server LoadBalanceWeight="1" ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="jts2Node01_server1" ServerIOTimeout="0" WaitForContinue="false">
		<Transport Hostname="jts2.example.com" Port="9080" Protocol="http"/>
		<Transport Hostname="jts2.example.com" Port="9443" Protocol="https">
			<Property Name="keyring" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.kdb"/>
			<Property Name="stashfile" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.sth"/>
		</Transport>>
	</Server>
</ServerCluster>
<!-- End JTS Server Cluster -->

<!-- CCM Server Cluster -->
<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="server1_ccm_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
	<Server LoadBalanceWeight="0" ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="ccm1Node01_server1" ServerIOTimeout="0" WaitForContinue="false">
		<Transport Hostname="ccm5.example.com" Port="9080" Protocol="http"/>
		<Transport Hostname="ccm5.example.com" Port="9443" Protocol="https">
			<Property Name="keyring" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.kdb"/>
			<Property Name="stashfile" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.sth"/>
		</Transport>
	</Server>
	<Server LoadBalanceWeight="1" ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="ccm2Node01_server1" ServerIOTimeout="0" WaitForContinue="false">
		<Transport Hostname="ccm6.example.com" Port="9080" Protocol="http"/>
		<Transport Hostname="ccm6.example.com" Port="9443" Protocol="https">
			<Property Name="keyring" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.kdb"/>
			<Property Name="stashfile" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.sth"/>
		</Transport>
	</Server>
</ServerCluster>
<!-- End CCM Cluster -->

<!-- QM Server Cluster -->
<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="server1_qm_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
	<Server LoadBalanceWeight="0" ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="qm1Node01_server1" ServerIOTimeout="0" WaitForContinue="false">
		<Transport Hostname="qm7.example.com" Port="9080" Protocol="http"/>
		<Transport Hostname="qm7.example.com" Port="9443" Protocol="https">
			<Property Name="keyring" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.kdb"/>
			<Property Name="stashfile" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.sth"/>
		</Transport>
	</Server>
	<Server LoadBalanceWeight="1" ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="qm2Node01_server1" ServerIOTimeout="0" WaitForContinue="false">
		<Transport Hostname="qm8.example.com" Port="9080" Protocol="http"/>
		<Transport Hostname="qm8.example.com" Port="9443" Protocol="https">
			<Property Name="keyring" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.kdb"/>
			<Property Name="stashfile" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.sth"/>
		</Transport>
	</Server>
</ServerCluster>
<!-- End QM Cluster -->

<!-- RM Server Cluster -->
<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="server1_rm_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
	<Server LoadBalanceWeight="0" ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="rm1Node01_server1" ServerIOTimeout="0" WaitForContinue="false">
		<Transport Hostname="rm3.example.com" Port="9080" Protocol="http"/>
		<Transport Hostname="rm3.example.com" Port="9443" Protocol="https">
			<Property Name="keyring" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.kdb"/>
			<Property Name="stashfile" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.sth"/>
		</Transport>
	</Server>
	<Server LoadBalanceWeight="1" ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="rm2Node01_server1" ServerIOTimeout="0" WaitForContinue="false">
		<Transport Hostname="rm4.example.com" Port="9080" Protocol="http"/>
		<Transport Hostname="rm4.example.com" Port="9443" Protocol="https">
			<Property Name="keyring" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.kdb"/>
			<Property Name="stashfile" Value="/root/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.sth"/>
		</Transport>
	</Server>
</ServerCluster>
<!-- End RM Cluster -->

路由

Route 元素是 URI 组与服务器集群的绑定位置。Route 元素将“哪些 URI 由哪个集群提供”这一情况告知插件。以上一个示例为基础,Route 元素示例将应用程序 URI 与其相应的集群绑定,如下所示:

<Route ServerCluster="server1_jts_Cluster" UriGroup="default_host_JTS_basicHA_Cluster_URIs" VirtualHostGroup="default_host"/>
<Route ServerCluster="server1_ccm_Cluster" UriGroup="default_host_CCM_basicHA_Cluster_URIs" VirtualHostGroup="default_host"/>
<Route ServerCluster="server1_qm_Cluster" UriGroup="default_host_QM_basicHA_Cluster_URIs" VirtualHostGroup="default_host"/>
<Route ServerCluster="server1_rm_Cluster" UriGroup="default_host_RM_basicHA_Cluster_URIs" VirtualHostGroup="default_host"/>

使主服务器与备份服务器的配置文件同步

定制服务器属性不会自动地在主服务器与备份服务器之间进行同步。为了确保备份服务器具有一致的配置属性,必须在备份服务器激活之前将所有定制设置传播到备份服务器。从主服务器定期备份这些文件并将其复原到备份服务器即可确保可定制的服务器属性保持同步。

注: 如果存在任何要求重新启动主服务器的配置更改,那么还必须重新启动备份服务器以使其获得这些更改。
以下列表包含可能需要在主服务器与备份服务器之间进行同步的配置文件(按 CLM 应用程序排列)。
  • Jazz Team Server
    • <JazzInstallDir>/server/conf/jts/teamserver.properties
    • <JazzInstallDir>/server/conf/jts/log4j.properties
  • CCM
    • <JazzInstallDir>/server/conf/ccm/teamserver.properties
    • <JazzInstallDir>/server/conf/ccm/log4j.properties
  • QM
    • <JazzInstallDir>/server/conf/qm/teamserver.properties
    • <JazzInstallDir>/server/conf/qm/log4j.properties
    • <JazzInstallDir>/server/conf/qm/integration_config.xml
  • RM
    • <JazzInstallDir>/server/conf/rm/composerweb.properties
    • <JazzInstallDir>/server/conf/rm/log4j.properties
    • <JazzInstallDir>/server/conf/rm/fronting.properties
    • <JazzInstallDir>/server/conf/rm/friendsconfig.rdf
  • ADMIN
    • <JazzInstallDir>/server/conf/admin/friends.rtf
    • <JazzInstallDir>/server/conf/admin/log4j.properties
    • <JazzInstallDir>/server/conf/admin/admin.properties

验证服务器设置以检查手动故障转移能力

要验证 WebSphere Application Server 的手动故障转移能力,请编辑 Web 服务器上的 plugin-cfg.xml 文件,以便对 PrimaryNode01_server1 设置 LoadBalanceWeight ="0" 属性并对 BackupNode01_server1 设置 LoadBalanceWeight ="1" 属性。保存 plugin-cfg.xml 文件。
  1. 在主服务器和备份服务器都联机的情况下,运行 WebSphere 样本 Snoop servlet 以获取正在处理请求的服务器的名称。
  2. 通过访问 https://webserver/snoop 从 HTML 浏览器中调用 Snoop Servlet。
  3. 请求的信息将显示正在作为本地主机为请求提供服务的主机。在本例中,将显示具有 LoadBalanceWeight =1 属性的服务器。
  4. 尝试在主服务器与备份服务器之间交换 LoadBalanceWeight 属性,并注意负责处理 Snoop Servlet 请求的服务器。

检测主服务器上的故障

要点: 在切换到故障转移服务器之前,您必须确保主服务器已完全停止。另外,还必须确保没有正在与数据库进行交互的运行中进程。

为了实现高可用性,您必须在主服务器关闭时了解到此情况。了解此情况对于这种基本的高可用性解决方案而言至关重要(此解决方案不支持进行自动故障转移以便从主服务器切换到备份服务器)。

检测故障服务器的过程是一项必须及时完成的紧急任务。服务器故障可以由多个因素体现,例如网络问题、配置问题、应用程序超负荷或用户错误。无论您选择哪种解决方案来检测服务器故障,都必须确保尽可能及时地发出警报。


反馈