我試圖合併和負載平衡幾個獨立的WebSphere 6.1 Express服務器。我使用這裏提供的說明:從多個節點 http://www-01.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.base.doc/ae/twsv_configsimplelb.html?lang=enWebSphere:發佈合併plugin-cfg.xml進行負載平衡
這裏
合併的plugin-cfg.xml文件:
配置簡單的負載在多個應用服務器平衡型材 http://www-01.ibm.com/support/knowledgecenter/SSAW57_6.1.0/com.ibm.websphere.base.doc/info/aes/ae/twsv_configsimplelb.html
我將來自兩個不同WAS服務器的兩個plugin-cfg.xml文件合併爲一個,更新了兩個WAS服務器的Web服務器設置以指向這個新文件,並且更新了插件以使用新的合併文件。服務器啓動,但我只收到要求到第一個WebSphere服務器的請求。我很確定我爲<VirtualHostGroup>元素做了什麼是不正確的,並且是這個問題的後面。我想,我需要把所有的<虛擬主機>元素合併爲一個<VirtualHostGroup>元素,也把所有的<服務器>元素融入到一個<的ServerCluster >元素,但我只是猜測。
的WebSphere server1的plugin-cfg.xml文件:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--HTTP server plugin config file for the webserver websphere02Node19Cell.custTestNode.webserver1 generated on 2014.09.25 at 06:45:03 PM EDT-->
<Config ASDisableNagle="false" AcceptAllContent="false" AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" RefreshInterval="60" ResponseChunkSize="64" VHostMatchingCompat="false">
<Log LogLevel="Error" Name="E:\eStorefront\Cust\Test\plugin/logs/webserver1/http_plugin.log"/>
<Property Name="ESIEnable" Value="true"/>
<Property Name="ESIMaxCacheSize" Value="1024"/>
<Property Name="ESIInvalidationMonitor" Value="false"/>
<Property Name="ESIEnableToPassCookies" Value="false"/>
<VirtualHostGroup Name="default_host">
<VirtualHost Name="*:9098"/>
<VirtualHost Name="*:80"/>
<VirtualHost Name="*:9475"/>
<VirtualHost Name="*:5097"/>
<VirtualHost Name="*:5096"/>
<VirtualHost Name="*:443"/>
</VirtualHostGroup>
<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="server1_custTestNode_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
<Server ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="custTestNode_server1" ServerIOTimeout="0" WaitForContinue="false">
<Transport Hostname="websphere02" Port="9098" Protocol="http"/>
<Transport Hostname="websphere02" Port="9475" Protocol="https">
<Property Name="keyring" Value="E:\eStorefront\Cust\Test\plugin/config/webserver1/plugin-key.kdb"/>
<Property Name="stashfile" Value="E:\eStorefront\Cust\Test\plugin/config/webserver1/plugin-key.sth"/>
</Transport>
</Server>
</ServerCluster>
<UriGroup Name="default_host_server1_custTestNode_Cluster_URIs">
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/gatewayRMIWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/ccWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/ccStandAlone/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/ivt/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/monitorServerWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/customerInquiry/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/storefrontAdminWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/storefrontB2BWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/storefrontB2CWEB/*"/>
</UriGroup>
<Route ServerCluster="server1_custTestNode_Cluster" UriGroup="default_host_server1_custTestNode_Cluster_URIs" VirtualHostGroup="default_host"/>
<RequestMetrics armEnabled="false" loggingEnabled="false" rmEnabled="false" traceLevel="HOPS">
<filters enable="false" type="URI">
<filterValues enable="false" value="/snoop"/>
<filterValues enable="false" value="/hitcount"/>
</filters>
<filters enable="false" type="SOURCE_IP">
<filterValues enable="false" value="255.255.255.255"/>
<filterValues enable="false" value="254.254.254.254"/>
</filters>
<filters enable="false" type="JMS">
<filterValues enable="false" value="destination=aaa"/>
</filters>
<filters enable="false" type="WEB_SERVICES">
<filterValues enable="false" value="wsdlPort=aaa:op=bbb:nameSpace=ccc"/>
</filters>
</RequestMetrics>
</Config>
的WebSphere服務器2 plugin-cfg.xml文件:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--HTTP server plugin config file for the webserver websphere02Node23Cell.custTest2Node.webserver1 generated on 2014.09.29 at 04:40:12 PM EDT-->
<Config ASDisableNagle="false" AcceptAllContent="false" AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" RefreshInterval="60" ResponseChunkSize="64" VHostMatchingCompat="false">
<Log LogLevel="Error" Name="E:\eStorefront\Cust\Test\plugin/logs/webserver1/http_plugin.log"/>
<Property Name="ESIEnable" Value="true"/>
<Property Name="ESIMaxCacheSize" Value="1024"/>
<Property Name="ESIInvalidationMonitor" Value="false"/>
<Property Name="ESIEnableToPassCookies" Value="false"/>
<VirtualHostGroup Name="default_host">
<VirtualHost Name="*:9133"/>
<VirtualHost Name="*:80"/>
<VirtualHost Name="*:9491"/>
<VirtualHost Name="*:5105"/>
<VirtualHost Name="*:5104"/>
<VirtualHost Name="*:443"/>
</VirtualHostGroup>
<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="server1_custTest2Node_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
<Server ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="custTest2Node_server1" ServerIOTimeout="0" WaitForContinue="false">
<Transport Hostname="websphere02" Port="9133" Protocol="http"/>
<Transport Hostname="websphere02" Port="9491" Protocol="https">
<Property Name="keyring" Value="E:\eStorefront\Cust\Test\plugin/config/webserver1/plugin-key.kdb"/>
<Property Name="stashfile" Value="E:\eStorefront\Cust\Test\plugin/config/webserver1/plugin-key.sth"/>
</Transport>
</Server>
</ServerCluster>
<UriGroup Name="default_host_server1_custTest2Node_Cluster_URIs">
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/gatewayRMIWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/ivt/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/customerInquiry/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/storefrontAdminWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/storefrontB2BWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/storefrontB2CWEB/*"/>
</UriGroup>
<Route ServerCluster="server1_custTest2Node_Cluster" UriGroup="default_host_server1_custTest2Node_Cluster_URIs" VirtualHostGroup="default_host"/>
<RequestMetrics armEnabled="false" loggingEnabled="false" rmEnabled="false" traceLevel="HOPS">
<filters enable="false" type="URI">
<filterValues enable="false" value="/snoop"/>
<filterValues enable="false" value="/hitcount"/>
</filters>
<filters enable="false" type="SOURCE_IP">
<filterValues enable="false" value="255.255.255.255"/>
<filterValues enable="false" value="254.254.254.254"/>
</filters>
<filters enable="false" type="JMS">
<filterValues enable="false" value="destination=aaa"/>
</filters>
<filters enable="false" type="WEB_SERVICES">
<filterValues enable="false" value="wsdlPort=aaa:op=bbb:nameSpace=ccc"/>
</filters>
</RequestMetrics>
</Config>
合併的plugin-cfg.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--HTTP server plugin config file for the webserver websphere02Node19Cell.custTestNode.webserver1 generated on 2014.09.25 at 06:45:03 PM EDT-->
<Config ASDisableNagle="false" AcceptAllContent="false" AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" RefreshInterval="60" ResponseChunkSize="64" VHostMatchingCompat="false">
<Log LogLevel="Trace" Name="E:\eStorefront\CTire\Test\plugin/logs/webserver1/http_plugin.log"/>
<Property Name="ESIEnable" Value="true"/>
<Property Name="ESIMaxCacheSize" Value="1024"/>
<Property Name="ESIInvalidationMonitor" Value="false"/>
<Property Name="ESIEnableToPassCookies" Value="false"/>
<VirtualHostGroup Name="default_host">
<VirtualHost Name="*:9098"/>
<VirtualHost Name="*:9475"/>
<VirtualHost Name="*:5097"/>
<VirtualHost Name="*:5096"/>
<VirtualHost Name="*:80"/>
<VirtualHost Name="*:443"/>
</VirtualHostGroup>
<VirtualHostGroup Name="default_host2">
<VirtualHost Name="*:9133"/>
<VirtualHost Name="*:9491"/>
<VirtualHost Name="*:5105"/>
<VirtualHost Name="*:5104"/>
<VirtualHost Name="default_host2:80"/>
<VirtualHost Name="default_host2:443"/>
</VirtualHostGroup>
<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="server1_custTestNode_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
<Server ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="custTestNode_server1" ServerIOTimeout="0" WaitForContinue="false">
<Transport Hostname="websphere02" Port="9098" Protocol="http"/>
<Transport Hostname="websphere02" Port="9475" Protocol="https">
<Property Name="keyring" Value="E:\eStorefront\CTire\Test\plugin/config/webserver1/plugin-key.kdb"/>
<Property Name="stashfile" Value="E:\eStorefront\CTire\Test\plugin/config/webserver1/plugin-key.sth"/>
</Transport>
</Server>
</ServerCluster>
<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="server1_custTest2Node_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
<Server ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="custTest2Node_server1" ServerIOTimeout="0" WaitForContinue="false">
<Transport Hostname="websphere02" Port="9133" Protocol="http"/>
<Transport Hostname="websphere02" Port="9491" Protocol="https">
<Property Name="keyring" Value="E:\eStorefront\CTire\Test\plugin/config/webserver1/plugin-key.kdb"/>
<Property Name="stashfile" Value="E:\eStorefront\CTire\Test\plugin/config/webserver1/plugin-key.sth"/>
</Transport>
</Server>
</ServerCluster>
<UriGroup Name="default_host_server1_custTestNode_Cluster_URIs">
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/gatewayRMIWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/ivt/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/customerInquiry/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/storefrontAdminWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/storefrontB2BWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/storefrontB2CWEB/*"/>
</UriGroup>
<UriGroup Name="default_host2_server1_custTest2Node_Cluster_URIs">
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/gatewayRMIWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/ivt/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/customerInquiry/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/storefrontAdminWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/storefrontB2BWEB/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/storefrontB2CWEB/*"/>
</UriGroup>
<Route ServerCluster="server1_custTestNode_Cluster" UriGroup="default_host_server1_custTestNode_Cluster_URIs" VirtualHostGroup="default_host"/>
<Route ServerCluster="server1_custTest2Node_Cluster" UriGroup="default_host2_server1_custTest2Node_Cluster_URIs" VirtualHostGroup="default_host2"/>
<RequestMetrics armEnabled="false" loggingEnabled="false" rmEnabled="false" traceLevel="HOPS">
<filters enable="false" type="URI">
<filterValues enable="false" value="/snoop"/>
<filterValues enable="false" value="/hitcount"/>
</filters>
<filters enable="false" type="SOURCE_IP">
<filterValues enable="false" value="255.255.255.255"/>
<filterValues enable="false" value="254.254.254.254"/>
</filters>
<filters enable="false" type="JMS">
<filterValues enable="false" value="destination=aaa"/>
</filters>
<filters enable="false" type="WEB_SERVICES">
<filterValues enable="false" value="wsdlPort=aaa:op=bbb:nameSpace=ccc"/>
</filters>
</RequestMetrics>
</Config>
只需澄清一下 - 您是否想從這2個服務器(提供相同的應用程序和負載平衡)或通過1個http服務器訪問的2個獨立服務器創建一個簡單的羣集?至於現在第二,沒有ccWEB,ccStandAlone和monitorServerWEB應用程序。 – Gas 2014-09-30 14:17:32
我想創建一個具有負載平衡的簡單羣集。 server2最終會得到ccWEB和ccStandAlone,我將從server1中刪除monitorServerWEB。 – 2014-09-30 14:20:54