httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44543] New: mod_proxy makes wrong decision on choosing worker, ignoring request scheme
Date Thu, 06 Mar 2008 00:03:42 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44543

           Summary: mod_proxy makes wrong decision on choosing worker,
                    ignoring request scheme
           Product: Apache httpd-2
           Version: 2.2.8
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: jeffwu75@gmail.com


Step0: cleanup browser A (e.g. alt-shift-del in firefox)
Step1: browser A send http://B/ request through apache proxy to HTTP server B
Step2: browser A send ftp://B/ request through apache proxy to FTP server B
result:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET ftp://192.168.3.129/.

Reason: Error reading from remote server

B=192.168.3.129, A=127.0.0.1, apache proxy running at localhost

errorlog:

[Wed Mar 05 15:35:43 2008] [debug] mod_proxy_http.c(1607): proxy: start body
send
[Wed Mar 05 15:35:43 2008] [debug] mod_proxy_http.c(1696): proxy: end body send
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1873): proxy: HTTP: has
released connection for (*)
[Wed Mar 05 15:35:43 2008] [error] Optional hook test said: GET
http://192.168.3.129/favicon.ico HTTP/1.1
[Wed Mar 05 15:35:43 2008] [error] Optional function test said: GET
http://192.168.3.129/favicon.ico HTTP/1.1
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1670): proxy: grabbed
scoreboard slot 0 in child 22992 for worker proxy:forward
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1689): proxy: worker
proxy:forward already initialized
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1778): proxy: initialized
single connection worker 0 in child 22992 for (*)
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1670): proxy: grabbed
scoreboard slot 1 in child 22992 for worker proxy:reverse
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1689): proxy: worker
proxy:reverse already initialized
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1778): proxy: initialized
single connection worker 1 in child 22992 for (*)
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1670): proxy: grabbed
scoreboard slot 0 in child 22993 for worker proxy:forward
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1689): proxy: worker
proxy:forward already initialized
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1778): proxy: initialized
single connection worker 0 in child 22993 for (*)
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1670): proxy: grabbed
scoreboard slot 1 in child 22993 for worker proxy:reverse
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1689): proxy: worker
proxy:reverse already initialized
[Wed Mar 05 15:35:43 2008] [debug] proxy_util.c(1778): proxy: initialized
single connection worker 1 in child 22993 for (*)
[Wed Mar 05 15:35:45 2008] [debug] mod_proxy_ftp.c(149): proxy: FTP:
canonicalising URL //192.168.3.129/
[Wed Mar 05 15:35:45 2008] [debug] proxy_util.c(1424): [client 127.0.0.1]
proxy: *: found forward proxy worker for ftp://192.168.3.129/
[Wed Mar 05 15:35:45 2008] [debug] mod_proxy.c(849): Running scheme ftp handler
(attempt 0)
[Wed Mar 05 15:35:45 2008] [debug] mod_proxy_http.c(1812): proxy: HTTP:
declining URL ftp://192.168.3.129/
[Wed Mar 05 15:35:45 2008] [debug] mod_proxy_connect.c(100): proxy: CONNECT:
declining URL ftp://192.168.3.129/
[Wed Mar 05 15:35:45 2008] [debug] mod_proxy_ftp.c(811): proxy: FTP: serving
URL ftp://192.168.3.129/
[Wed Mar 05 15:35:45 2008] [debug] mod_proxy_ftp.c(903): proxy: FTP: connecting
ftp://192.168.3.129/ to 192.168.3.129:21
[Wed Mar 05 15:35:45 2008] [debug] proxy_util.c(1855): proxy: FTP: has acquired
connection for (*)
[Wed Mar 05 15:35:45 2008] [debug] proxy_util.c(2269): proxy: FTP: connection
complete to 192.168.3.129:21 (192.168.3.129)
[Wed Mar 05 15:35:45 2008] [debug] mod_proxy_ftp.c(993): proxy: FTP: control
connection complete
[Wed Mar 05 15:35:57 2008] [debug] mod_proxy_ftp.c(634): proxy:<FTP: 4294967295
<unable to read result>
[Wed Mar 05 15:35:57 2008] [debug] proxy_util.c(1873): proxy: FTP: has released
connection for (*)
[Wed Mar 05 15:35:57 2008] [error] [client 127.0.0.1] proxy: Error reading from
remote server returned by ftp://192.168.3.129/
[Wed Mar 05 15:35:57 2008] [error] Optional hook test said: GET
ftp://192.168.3.129/ HTTP/1.1
[Wed Mar 05 15:35:57 2008] [error] Optional function test said: GET
ftp://192.168.3.129/ HTTP/1.1


After the following _hack_(cleaning up the worker's history), apache proxy
works fine again.

diff -du modules/proxy/mod_proxy_ftp.c~ modules/proxy/mod_proxy_ftp.c
--- modules/proxy/mod_proxy_ftp.c~      2008-01-02 11:25:08.000000000 -0800
+++ modules/proxy/mod_proxy_ftp.c       2008-03-05 15:39:27.000000000 -0800
@@ -902,6 +902,10 @@

     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
        "proxy: FTP: connecting %s to %s:%d", url, connectname, connectport);
+
+    worker->is_address_reusable = 0;
+    worker->cp->addr = NULL;
+    worker->cp->conn = NULL;

     if (worker->is_address_reusable) {
         if (!worker->cp->addr) {


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message