【发布时间】: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