【问题标题】:Problems with weblogic 9.2 load balancing and clustering using proxy plugin使用代理插件的 weblogic 9.2 负载平衡和集群问题
【发布时间】:2012-01-15 21:27:12
【问题描述】:

我在 weblogic 9.2 中有一个集群,有 2 个节点(172.20.1.68:7101、172.20.1.23:7102)、1 个管理服务器(172.20.1.23:7001)和 1 个平衡器(apache 代理插件)172.20.1.49:7103。

我在平衡器的 access.log 中看到的是每个请求都被标记为 404 not found。但是在节点的日志中,我可以看到那些非常相同的请求被标记为 GET,代码为 200。

问题是我的应用程序不工作。

任何想法都将不胜感激。

非常感谢!

编辑:

这是我的相关 httpd.conf,我没有部分,而是我 有这个:

<VirtualHost *:80>
        ServerName fake.server.name  
        DocumentRoot "/usr/local/apache_ssl/htdocs"  
        <Location /myApp/>  
             SetHandler weblogic-handler  
             WebLogicCluster 172.20.1.23:7102,172.20.1.68:7101  
             Debug All   
             DebugConfigInfo ALL  
             WLLogFile logs/p.log  
              KeepAliveEnabled ON  
             KeepAliveSecs 15  
        </Location>  

        <Location /psoc-app>
             SetHandler weblogic-handler
             WebLogicCluster 172.20.1.23:7102,172.20.1.68:7101
              KeepAliveEnabled ON
             KeepAliveSecs 15
        </Location>

    WLLogFile logs/p.log
    ErrorLog logs/_log_error
    CustomLog logs/_log common
</VirtualHost>

/tmp/wlproxy.log 请求:

================New Request: [GET /myApp/path HTTP/1.1] =================
Thu Jul 29 14:30:00 2010 <1382912804066002> INFO: SSL is not configured
Thu Jul 29 14:30:00 2010 <1382912804066002> Using Uri /myApp/path
Thu Jul 29 14:30:00 2010 <1382912804066002> After trimming path: '/myApp/path'
Thu Jul 29 14:30:00 2010 <1382912804066002> The final request string is '/myApp/path'
Thu Jul 29 14:30:00 2010 <1382912804066002> SEARCHING       id=[172.20.1.23:7102,172.20.1.68:7101] from current ID=[172.20.1.23:7102,172.20.1.68:7101]
Thu Jul 29 14:30:00 2010 <1382912804066002> The two ids matched
Thu Jul 29 14:30:00 2010 <1382912804066002> @@@FOUND...id=[172.20.1.23:7102,172.20.1.68:7101], server_name=[172.20.1.49], server_port=[80]
Thu Jul 29 14:30:00 2010 <1382912804066002> attempt #0 out of a max of 5
Thu Jul 29 14:30:00 2010 <1382912804066002> Trying a pooled connection for '172.20.1.68/7101/7106'
Thu Jul 29 14:30:00 2010 <1382912804066002> getPooledConn: No more connections in the pool for Host[172.20.1.68] Port[7101] SecurePort[7106]
Thu Jul 29 14:30:00 2010 <1382912804066002> general list: trying connect to '172.20.1.68'/7101/7106 at line 2619 for '/myApp/path'
Thu Jul 29 14:30:00 2010 <1382912804066002> INFO: New NON-SSL URL
Thu Jul 29 14:30:00 2010 <1382912804066002> Connect returns -1, and error no set to 115, msg 'Operation now in progress'
Thu Jul 29 14:30:00 2010 <1382912804066002> EINPROGRESS in connect() - selecting
Thu Jul 29 14:30:00 2010 <1382912804066002> Local Port of the socket is 38958
Thu Jul 29 14:30:00 2010 <1382912804066002> Remote Host 172.20.1.68 Remote Port 7101
Thu Jul 29 14:30:00 2010 <1382912804066002> general list: created a new connection to '172.20.1.68'/7101 for '/myApp/path', Local port:38958
Thu Jul 29 14:30:00 2010 <1382912804066002> URL::parseHeaders: CompleteStatusLine set to [HTTP/1.1 404 Not Found]
Thu Jul 29 14:30:00 2010 <1382912804066002> URL::parseHeaders: StatusLine set to [404 Not Found]
Thu Jul 29 14:30:00 2010 <1382912804066002> parsed all headers OK
Thu Jul 29 14:30:00 2010 <1382912804066002> sendResponse() : r->status = '404'
Thu Jul 29 14:30:00 2010 <1382912804066002> canRecycle: conn=1 status=404 isKA=0 clen=1214 isCTE=0
Thu Jul 29 14:30:00 2010 <1382912804066002> closeConn: URL.canRecycle() returns false, deleting URL '172.20.1.68/7101'
Thu Jul 29 14:30:00 2010 <1382912804066002> request [/myApp/path] processed sucessfully..................

抱歉,我无法让格式化程序工作

【问题讨论】:

  • 您是否使用带有代理插件的 Web 服务器 (Apache)?集群节点访问日志(带有 200)是否始终显示原始请求 IP 地址为 172.20.1.23,即平衡器服务器的 IP 地址?这是为了证明是否所有请求都正确地从插件转发到节点?
  • 是的,我正在使用 Apache 和代理插件。在集群节点访问日志中,我看到传入连接来自 apache 平衡器。在节点日志中显示:“GET /myApp/path HTTP/1.1”200 0 在 Apache 访问日志中我看到:“GET /myApp/path HTTP/1.1”404 1214 谢谢您的回复!
  • 您能否发布 的 httpd.conf 设置
  • 在插件上启用这些标志 - 调试并设置一些 WLLogFile C:/proxydebug.log。您可以在 DEBUG 模式下查看从 Apache 到 Weblogic 的每个请求,看看发生了什么。
  • 好的 DEBUG 已经启用 - 你可以在 logs/p.log 中跟踪请求吗?

标签: weblogic cluster-computing


【解决方案1】:

到目前为止的 cmets 有 3 件事需要注意和尝试:

A) 它在 Apache conf 中的哪个位置指向 /tmp/wlproxy.log ?这质疑我们是否正在查看正确的 conf 文件 - 或者是否有另一个 Apache 实例正在运行?

运行此命令(如果在 unix 上)以识别写入日志的所有者 pid

/usr/sbin/fuser /tmp/wlproxy.log

这将返回 Apache 进程的 pid - 是您正在运行的 Apache 吗?

您也可以尝试在关闭 Apache 的情况下运行 fuser,看看它是否仍然显示拥有该文件的 pid?

B) 插件调试日志显示 apache 请求转到集群中的第二台服务器并获得 404。

Thu Jul 29 14:30:00 2010 <1382912804066002> general list: created a new connection to '172.20.1.68'/7101 for '/myApp/path', Local port:38958 
Thu Jul 29 14:30:00 2010 <1382912804066002> URL::parseHeaders: CompleteStatusLine set to [HTTP/1.1 404 Not Found] 
Thu Jul 29 14:30:00 2010 <1382912804066002> URL::parseHeaders: StatusLine set to [404 Not Found] 

该应用程序是否已在172.20.1.68:7101/myApp/path 上确定部署并可用?

C) 当您请求 conf 中显示的 /psoc-app 时会发生什么?

【讨论】:

  • 感谢您的宝贵时间。文件 /tmp/wlproxy.log 是默认日志文件。我解决了它,问题是在 weblogic 中应用程序在部署时出错(它位于多节点集群上)。再次感谢您的回答和时间!
猜你喜欢
  • 1970-01-01
  • 2015-09-27
  • 2020-08-17
  • 1970-01-01
  • 2014-12-18
  • 2017-06-19
  • 1970-01-01
  • 1970-01-01
  • 2012-04-16
相关资源
最近更新 更多