Re: 2.1.2-alpha http/ftp proxy/cache problems

2005-01-01 Thread Andreas Steinmetz
Mladen Turk wrote:
Can you check the current HEAD?
Hostname and port are now noncachable for forward and
reverse proxies.
Things are getting better but there is still a bug somewhere. I'm 
sending a screenshot, the compressed log and the associated tcpdump of a 
similar problem appearing off list to you due to the file sizes.

Short description:
A request that should have been sent to userfriendly.org is according to 
the tcpdump erroneously sent to pagead2.googlesyndication.com, the debug 
log however does not show this.

Details:
The base URLs are:
http://www.heise.de/newsticker/
http://slashdot.org/
http://lwn.net/
http://www.userfriendly.org/static/
The URLs are reloaded quite fast so that the reloads are then 
progressing in parallel.
--
Andreas Steinmetz   SPAMmers use [EMAIL PROTECTED]


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-31 Thread Mladen Turk
Andreas Steinmetz wrote:
if (!conn->hostname) {
if (proxyname) {
conn->hostname = apr_pstrdup(conn->pool, proxyname);
conn->port = proxyport;
} else {
conn->hostname = apr_pstrdup(conn->pool, uri->hostname);
conn->port = uri->port;
}
}
Can you check the current HEAD?
Hostname and port are now noncachable for forward and
reverse proxies.
I do hope this helps to solve the forward proxy bug.
Yes, It did :)
Regards,
Mladen.


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-29 Thread Andreas Steinmetz
Mladen Turk wrote:
So this is basically a forward proxy problem correct?
Yes.
I did a bit of digging and the following should give you some hint about 
the actual problem. My current dev version is svn revision 123634.

I did modify proxy_util.c to dump an additional log line (last line of 
code excerpt below):

ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
 "proxy: connecting %s to %s:%d", *url, uri->hostname,
 uri->port);
/* allocate these out of the specified connection pool
 * The scheme handler decides if this is permanent or
 * short living pool.
 */
/* are we connecting directly, or via a proxy? */
if (!proxyname) {
*url = apr_pstrcat(p, uri->path, uri->query ? "?" : "",
   uri->query ? uri->query : "",
   uri->fragment ? "#" : "",
   uri->fragment ? uri->fragment : "", NULL);
}
if (!conn->hostname) {
if (proxyname) {
conn->hostname = apr_pstrdup(conn->pool, proxyname);
conn->port = proxyport;
} else {
conn->hostname = apr_pstrdup(conn->pool, uri->hostname);
conn->port = uri->port;
}
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: %s:%d", 
conn->hostname, conn->port);

Now this spits out in the error log in case of the proxy error appearing:
[Wed Dec 29 14:24:25 2004] [debug] proxy_util.c(1627): proxy: connecting 
http://www.wetter.com/v2/?SID=&LANG=DE&LOC=0280&LOCFROM=0202®ion=BY 
to www.wetter.com:80
[Wed Dec 29 14:24:25 2004] [debug] proxy_util.c(1651): proxy: 
images.freshmeat.net:80

So actually the connect request is fine but conn->hostname is already 
set in ap_proxy_determine_connection() which causes the connect for the 
proxy request to go to the wrong site.

I do hope this helps to solve the forward proxy bug.
--
Andreas Steinmetz   SPAMmers use [EMAIL PROTECTED]


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-21 Thread Andreas Steinmetz
Mladen Turk wrote:
So this is basically a forward proxy problem correct?
Yes.
--
Andreas Steinmetz   SPAMmers use [EMAIL PROTECTED]


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-21 Thread Mladen Turk
Andreas Steinmetz wrote:
URL1:
http://linux.bkbits.net:8080/linux-2.5/[EMAIL PROTECTED]
URL2:
http://www.wetter.com/v2/?SID=&LANG=DE&LOC=0280&LOCFROM=0202®ion=BY
When reloading both tabs in the sequence URL1 first and then URL2 the 
second URL is requested from an existing connection to bitmover.com (the 
top of page image of URL1 is located there) instead using a new 
connection to wetter.com. This, however, does not happen all the time. 
In most cases the proxy works properly so it seems one must hit the 
right timing to trigger this problem. After your last fixes the problem 
seemed to be gone so it looks it is now hard to trigger.

So this is basically a forward proxy problem correct?
Mladen.


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-21 Thread Andreas Steinmetz
Mladen Turk wrote:
Since it's prefork we don't have a threading problem.
Can you paste some light and post the Proxy config
directives. It will help.
It is the same problem and config as already sent. Nevertheless to save 
you the time here it comes again:

Browser is either mozilla or firefox, two tabs with the following URLs
are open:
URL1:
http://linux.bkbits.net:8080/linux-2.5/[EMAIL PROTECTED]
URL2:
http://www.wetter.com/v2/?SID=&LANG=DE&LOC=0280&LOCFROM=0202®ion=BY
When reloading both tabs in the sequence URL1 first and then URL2 the 
second URL is requested from an existing connection to bitmover.com (the 
top of page image of URL1 is located there) instead using a new 
connection to wetter.com. This, however, does not happen all the time. 
In most cases the proxy works properly so it seems one must hit the 
right timing to trigger this problem. After your last fixes the problem 
seemed to be gone so it looks it is now hard to trigger.

Proxy Config (the actual proxy is hades, zeus is included to allow for 
work at home without client proxy setup reconfiguration):

Listen *:8080

ServerName hades.lan.domdv.de
SSLEngine off
AddHandler cgi-script .cfg
DirectoryIndex index.shtml

Order deny,allow
Allow from 10.1.9.0/24 127.0.0.1
Deny from all
Options Includes ExecCGI
AllowOverride none

Alias / /var/apache/proxywww/
CustomLog /dev/null common
ProxyRequests On
DefaultType application/octet-stream

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^.*MSIE.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*Opera.*$ [NC]
RewriteRule ^.*$ /deny.html  [L]
Order deny,allow
Allow from 10.1.9.0/24 127.0.0.1
Deny from all

ProxyVia Block
ProxyDomain .lan.domdv.de
AllowCONNECT 443 563
CacheRoot "/var/apache/proxy"
CacheDefaultExpire 60
CacheIgnoreNoLastMod On
CacheLastModifiedFactor 0.1
CacheMaxExpire 86400
NoProxy .lan.domdv.de
ProxyMaxForwards 5
CacheDirLength 1
CacheDirLevels 2
CacheMinFileSize 1
CacheMaxFileSize 524288
CacheEnable disk /


SSLEngine off
AddHandler cgi-script .cfg
DirectoryIndex index.shtml

Order deny,allow
Allow from 10.1.9.0/24 127.0.0.1
Deny from all
Options Includes ExecCGI
AllowOverride none

Alias / /var/apache/proxywww/
CustomLog /dev/null common
ProxyRequests On
DefaultType application/octet-stream

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^.*MSIE.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*Opera.*$ [NC]
RewriteRule ^.*$ /deny.html  [L]
Order deny,allow
Allow from 10.1.9.0/24 127.0.0.1
Deny from all

ProxyVia Block
ProxyDomain .lan.domdv.de
AllowCONNECT 443 563
CacheRoot "/var/apache/proxy"
CacheDefaultExpire 60
CacheIgnoreNoLastMod On
CacheLastModifiedFactor 0.1
CacheMaxExpire 86400
NoProxy .lan.domdv.de
ProxyMaxForwards 5
CacheDirLength 1
CacheDirLevels 2
CacheMinFileSize 1
CacheMaxFileSize 524288
CacheEnable disk /

--
Andreas Steinmetz   SPAMmers use [EMAIL PROTECTED]


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-21 Thread Mladen Turk
Andreas Steinmetz wrote:
Yes, but you are running 1.3.27.
What that has to do with the Apache2.1 mod_proxy?
Nope, the version number pasted is in the 404 reply that comes from the 
bitmover site. To clarify what I'm currently running:

/usr/local/apache/bin/httpsd -V
Server version: Apache/2.1.3-dev
OK then :).
Since it's prefork we don't have a threading problem.
Can you paste some light and post the Proxy config
directives. It will help.
Cheers,
Mladen.


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-21 Thread Andreas Steinmetz
Mladen Turk wrote:
Yes, but you are running 1.3.27.
What that has to do with the Apache2.1 mod_proxy?
Nope, the version number pasted is in the 404 reply that comes from the 
bitmover site. To clarify what I'm currently running:

/usr/local/apache/bin/httpsd -V
Server version: Apache/2.1.3-dev
Server built:   Dec 16 2004 13:48:49
Server's Module Magic Number: 20040425:1
Architecture:   32-bit
Server MPM: Prefork
  threaded: no
forked: yes (variable process count)
Server compiled with
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/usr/local/apache"
 -D SUEXEC_BIN="/usr/local/apache/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpsd.conf"
--
Andreas Steinmetz   SPAMmers use [EMAIL PROTECTED]


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-21 Thread Mladen Turk
Andreas Steinmetz wrote:
Unfortunately it looks as the http problem is still there as I 
discovered today:

Yes, but you are running 1.3.27.
What that has to do with the Apache2.1 mod_proxy?
Mladen.


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-21 Thread Andreas Steinmetz
Mladen Turk wrote:
Andreas Steinmetz wrote:

Since the fix is trivial, I'll commit the changes ASAP.
Will you be able to retest upon the commit?

Managed to find the time to install subversion. Seems that the problem 
is fixed. Thanks.

Cool. Glad this also works on your side of the wire too 8-).
Unfortunately it looks as the http problem is still there as I 
discovered today:

http://www.wetter.com/v2/?SID=&LANG=DE&LOC=0280&LOCFROM=0202®ion=BY
Not Found
The requested URL /v2/ was not found on this server.
Apache/1.3.27 Server at www.bitmover.com Port 80
--
Andreas Steinmetz   SPAMmers use [EMAIL PROTECTED]


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-18 Thread Mladen Turk
Andreas Steinmetz wrote:

Since the fix is trivial, I'll commit the changes ASAP.
Will you be able to retest upon the commit?
Managed to find the time to install subversion. Seems that the problem 
is fixed. Thanks.
Cool. Glad this also works on your side of the wire too 8-).
Cheers,
Mladen


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-18 Thread Andreas Steinmetz
Andreas Steinmetz wrote:
Mladen Turk wrote:
Since the fix is trivial, I'll commit the changes ASAP.
Will you be able to retest upon the commit?
Managed to find the time to install subversion. Seems that the problem 
is fixed. Thanks.
--
Andreas Steinmetz   SPAMmers use [EMAIL PROTECTED]


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-14 Thread Andreas Steinmetz
Mladen Turk wrote:
Since the fix is trivial, I'll commit the changes ASAP.
Will you be able to retest upon the commit?
No problem, if you let me know the svn id(s), as I currently don't have 
svn installed and thus will need to extract the changes through the web 
interface.


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-14 Thread Mladen Turk
Andreas Steinmetz wrote:
Both problems described below relate to the http and the ftp proxy with 
cache enabled. URLs and proxy setup are given at the end of this mail.

Hi,
As Justin said it has nothing to do with the cache.
The problem is with the single forward/reverse proxy worker
that is not thread safe for backend address cache.
Address cache is a great thing offering up to 20% higher
performance compared with previous implementation, but for
workers that does not use it (like using Rewrite),
it has a address cache reusage bug.
Since the fix is trivial, I'll commit the changes ASAP.
Will you be able to retest upon the commit?
Regards,
Mladen.


Re: 2.1.2-alpha http/ftp proxy/cache problems

2004-12-13 Thread Justin Erenkrantz
--On Sunday, December 12, 2004 3:49 PM +0100 Andreas Steinmetz 
<[EMAIL PROTECTED]> wrote:

It seems from the tcpdump that http://www.bitmover.com/gifs/bitkeeper-shadow.gif";> is requested by
the proxy resulting in a 304 and then the same tcp connection is
erroneously reused to request the www.wetter.com URL. tcpdump excerpt:
Since mod_cache doesn't actually fetch the pages, that would finger 
mod_proxy as the likely culprit.  =)

I've yet to dig down into the mod_proxy code, so I'm little help.  -- justin


2.1.2-alpha http/ftp proxy/cache problems

2004-12-12 Thread Andreas Steinmetz
Both problems described below relate to the http and the ftp proxy with 
cache enabled. URLs and proxy setup are given at the end of this mail.

Problem 1 - http:
It happens from time to time that when URL 1 is reloaded and then URL 2 
is reloaded in Mozilla that /v2/ (URL 2) is requested by the proxy from 
a server related to URL 1, resulting in the following 404:

Not Found
The requested URL /v2/ was not found on this server.
Apache/1.3.27 Server at www.bitmover.com Port 80
It seems from the tcpdump that http://www.bitmover.com/gifs/bitkeeper-shadow.gif";> is requested by 
the proxy resulting in a 304 and then the same tcp connection is 
erroneously reused to request the www.wetter.com URL. tcpdump excerpt:

15:11:51.745134 IP 80.140.165.47.1949 > 192.132.92.2.80: P 1:506(505) 
ack 1 win
5808
0x0020:  5018 16b0 f075  4745 5420 2f67 6966  Pu..GET./gif
0x0030:  732f 6269 746b 6565 7065 722d 7368 6164  s/bitkeeper-shad
0x0040:  6f77 2e67 6966 2048 5454 502f 312e 310d  ow.gif.HTTP/1.1.
0x0050:  0a48 6f73 743a 2077  2e62 6974 6d6f  .Host:.www.bitmo
0x0060:  7665 722e 636f 6d0d 0a55 7365 722d 4167  ver.com..User-Ag
0x0070:  656e 743a 204d 6f7a 696c 6c61 2f35 2e30  ent:.Mozilla/5.0
0x0080:  2028 5831 313b 2055 3b20 4c69 6e75 7820  .(X11;.U;.Linux.
0x0090:  6936 3836 3b20 656e 2d55 533b 2072 763a  i686;.en-US;.rv:
0x00a0:  312e 372e 3329 2047 6563 6b6f 2f32 3030  1.7.3).Gecko/200
0x00b0:  3430 3931 380d 0a41 6363 6570 743a 2069  40918..Accept:.i
0x00c0:  6d61 6765 2f70 6e67 2c2a 2f2a 3b71 3d30  mage/png,*/*;q=0
0x00d0:  2e35 0d0a 4163 6365 7074 2d4c 616e 6775  .5..Accept-Langu
0x00e0:  6167 653a 2065 6e2d 7573 2c65 6e3b 713d  age:.en-us,en;q=
0x00f0:  302e 372c 6465 3b71 3d30 2e33 0d0a 4163  0.7,de;q=0.3..Ac
0x0100:  6365 7074 2d45 6e63 6f64 696e 673a 2067  cept-Encoding:.g
0x0110:  7a69 702c 6465 666c 6174 650d 0a41 6363  zip,deflate..Acc
0x0120:  6570 742d 4368 6172 7365 743a 2049 534f  ept-Charset:.ISO
0x0130:  2d38 3835 392d 3135 2c75 7466 2d38 3b71  -8859-15,utf-8;q
0x0140:  3d30 2e37 2c2a 3b71 3d30 2e37 0d0a 5265  =0.7,*;q=0.7..Re
0x0150:  6665 7265 723a 2068 7474 703a 2f2f 6c69  ferer:.http://li
0x0160:  6e75 782e 626b 6269 7473 2e6e 6574 3a38  nux.bkbits.net:8
0x0170:  3038 302f 6c69 6e75 782d 322e 352f 4368  080/linux-2.5/Ch
0x0180:  616e 6765 5365 7440 2d37 643f 6e61 763d  [EMAIL PROTECTED]
0x0190:  696e 6465 782e 6874 6d6c 0d0a 4966 2d4d  index.html..If-M
0x01a0:  6f64 6966 6965 642d 5369 6e63 653a 2053  odified-Since:.S
0x01b0:  6174 2c20 3238 2046 6562 2032 3030 3420  at,.28.Feb.2004.
0x01c0:  3137 3a32 313a 3033 2047 4d54 0d0a 4966  17:21:03.GMT..If
0x01d0:  2d4e 6f6e 652d 4d61 7463 683a 2022 3334  -None-Match:."34
0x01e0:  3433 332d 3230 3361 2d34 3034 3063 6466  433-203a-4040cdf
0x01f0:  6622 0d0a 4361 6368 652d 436f 6e74 726f  f"..Cache-Contro
0x0200:  6c3a 206d 6178 2d61 6765 3d30 0d0a 4d61  l:.max-age=0..Ma
0x0210:  782d 466f 7277 6172 6473 3a20 350d 0a0d  x-Forwards:.5...

15:11:51.999590 IP 192.132.92.2.80 > 80.140.165.47.1949: P 1:187(186) 
ack 506 wi
n 6432
0x0020:  5018 1920 805b  4854 5450 2f31 2e31  P[..HTTP/1.1
0x0030:  2033 3034 204e 6f74 204d 6f64 6966 6965  .304.Not.Modifie
0x0040:  640d 0a44 6174 653a 2053 756e 2c20 3132  d..Date:.Sun,.12
0x0050:  2044 6563 2032 3030 3420 3134 3a31 313a  .Dec.2004.14:11:
0x0060:  3530 2047 4d54 0d0a 5365 7276 6572 3a20  50.GMT..Server:.
0x0070:  4170 6163 6865 2f31 2e33 2e32 3720 2855  Apache/1.3.27.(U
0x0080:  6e69 7829 2020 2852 6564 2d48 6174 2f4c  nix)..(Red-Hat/L
0x0090:  696e 7578 2920 6d6f 645f 7373 6c2f 322e  inux).mod_ssl/2.
0x00a0:  382e 3132 204f 7065 6e53 534c 2f30 2e39  8.12.OpenSSL/0.9
0x00b0:  2e36 6220 6d6f 645f 7065 726c 2f31 2e32  .6b.mod_perl/1.2
0x00c0:  360d 0a45 5461 673a 2022 3334 3433 332d  6..ETag:."34433-
0x00d0:  3230 3361 2d34 3034 3063 6466 6622 0d0a  203a-4040cdff"..
0x00e0:  0d0a ..

15:11:53.180488 IP 80.140.165.47.1949 > 192.132.92.2.80: P 506:995(489) 
ack 187
win 6432
0x0020:  5018 1920 172f  4745 5420 2f76 322f  P/..GET./v2/
0x0030:  3f53 4944 3d26 4c41 4e47 3d44 4526 4c4f  ?SID=&LANG=DE&LO
0x0040:  433d 3032 3830 264c 4f43 4652 4f4d 3d30  C=0280&LOCFROM=0
0x0050:  3230 3226 7265 6769 6f6e 3d42 5920 4854  202®ion=BY.HT
0x0060:  5450 2f31 2e31 0d0a 486f 7374 3a20   TP/1.1..Host:.ww
0x0070:  772e 7765 7474 6572 2e63 6f6d 0d0a 5573  w.wetter.com..Us
0x0080:  6572 2d41 6765 6e74 3a20 4d6f 7a69 6c6c  er-Agent:.Mozill
0x0090:  612f 352e 3020 2858 3131 3b20 553b 204c  a/5.0.(X11;.U;.L
0x00a0:  696e 7578 2069 3638 363b 2065 6e2d 5