我已經配置Apache來負載平衡兩個WebLogic節點(使用mod_weblogic) 但所有請求被轉發到第二節點。WebLogic羣集平衡器總是路線第二節點
這裏我已經加入到httpd.conf中:
LoadModule weblogic_module modules/mod_wl_22.so
<IfModule mod_weblogic.c>
MatchExpression /soa-infra WebLogicCluster=node1.domain.com:8001,node2.domain.com:8001
</IfModule>
<Location /soa-infra>
SetHandler weblogic-handler
WebLogicCluster node1.domain.com:8001,node2.domain.com:8001
</Location>
我有沒有效果的嘗試:
1) swap node1.domain.com and node2.domain.com
2) change balancing algorithm in WebLogic Administration Console
一些澄清: 1.客戶端adressing阿帕奇 - 我測試我。 2.我看到Apache是僅創建之後,從客戶端請求連接/我和它僅僅是第二節點(它在其上執行)的連接。 3.是的,兩個節點都在本地網絡中並且可達。 我發現有趣的事情: 如果我刪除的httpd.conf我都行,除了線裝載mod_weblogic和重啓apache然後我必須通過負載均衡器不能訪問 - 所以平衡器真的使用我的配置線, 但如果我刪除列表中的第二個節點,然後負載平衡器仍然重定向第二個節點,而不是隻有一個列出的第一個節點。
看起來像我發現的問題!
幾次要求我在日誌中看到後:
Wed Jan 25 19:56:49 2012 <480013275070093> Trying a pooled connection for '192.168.0.111/8001/8001'
Wed Jan 25 19:56:49 2012 <480013275070093> getPooledConn: No more connections in the pool for Host[192.168.0.111] Port[8001] SecurePort[8001]
Wed Jan 25 19:56:49 2012 <480013275070093> general list: trying connect to '192.168.0.111'/8001/8001 at line 2724 for '/soa-infra/services/partition/my_composite/my_composite_client_ep'
Wed Jan 25 19:57:05 2012 <480013275070256> Trying to locate Primary or Secondary using SrvrInfo with JVMID: -76285319
Wed Jan 25 19:57:05 2012 <480013275070256> getPreferredFromCookie: Found Primary 192.168.0.112:8001:0
Wed Jan 25 19:57:05 2012 <480013275070256> getPreferredFromCookie: Found 1 servers
192.168.0.111是第一點,192.168.0.112 - 第二。
有什麼建議嗎?在節點2
集羣是組播(非單播)。 – Denys
我沒有這樣做: http://www.javaoracleblog.com/java/Installing_an_11g_SOA_Cluster_8211_Part_IV_More_Configuration.jsf 設置SOA/BPM前端主機和羣集地址。 這是一個原因嗎? – Denys
不幸的是,從我的瀏覽器中刪除cookie沒有幫助。 此外,我注意到我的測試請求獲得來自soa_server複合WSDL是不創造任何瀏覽器的cookies,現在負載均衡是不會告訴任何getPreferredFromCookie更多。只是仍然轉發到第二個節點。 但在日誌中還,現在我已經注意到下一行: 週五1月27日16點23分20秒2012 <455613276670002>人類發展報告從WLS:![X-WebLogic的集羣列表] = [ - 76285319 node2.domain.com 8001 !-1] – Denys