Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

WwWXxX, udp high ports, d-link extract firmware dsl-2750u, wwwwxxxxx.2G, yxxxcom, WWWXXX, ftp://192.168.100.100, wwwxxx 100, www.xxxcon, wwwxxx

Links

XODOX
Impressum

#1: mod_proxy / mod_proxy_html problem

Posted on 2006-02-22 20:56:17 by Jorge Morgado

Hello,

I'm having a problem with mod_proxy/mod_proxy_html... After googling a
while it seems I'm not the only user with this problem but I don't
seem to find the solution (if there is one already), so I decided to
post my problem here.

I'm using FreeBSD 5.3 with Apache 2.2.0 as reverse proxy.
Here's my configuration (the part that matters):

----------------------------------------
LoadModule headers_module modules/mod_headers.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadFile /usr/local/lib/libxml2.so
LoadModule proxy_html_module modules/mod_proxy_html.so

ProxyRequests off

ProxyPass /url/ http://backend_server/
ProxyHTMLURLMap http://backend_server /url
ProxyHTMLLogVerbose On

<Location /url/>
ProxyPassReverse /

SetOutputFilter proxy-html
ProxyHTMLURLMap / /url/
ProxyHTMLURLMap /url /url
RequestHeader unset Accept-Encoding
</Location>

AcceptFilter http none
AcceptFilter https none
----------------------------------------

The above configuration always causes my Apache to crash. Actually the
problem is the SetOutputFilter directive (it works well if I disable
it). The problem seems to be with a few pages in the backend server
without a content-type in the header (?!) which seems to trigger a bug
in mod_proxy_html. Here's a snip of Apache's error_log:

[info] [client x] No content-type; bailing out of proxy-html filter
[notice] child pid 33357 exit signal Segmentation fault (11)
[info] [client x] Non-HTML content; not inserting proxy-html filter
[info] [client x] Non-HTML content; not inserting proxy-html filter,
referer: http://backend_server/url/page.html
[notice] child pid 33439 exit signal Segmentation fault (11)
[notice] child pid 33444 exit signal Segmentation fault (11)


Here's the backtrace of one of the core dumps I got:

#0 0x284e6cf2 in proxy_html_filter (f=0x81bf6d0, bb=0x81b6e68)
at /usr/local/mod_proxy_html/mod_proxy_html.c:823
#1 0x283aece9 in ap_proxy_http_process_response (p=0x81b6018, r=0x81be050,
backend=0x8164050, origin=0x81b6698, conf=0x812c9d8,
server_portstr=0xbfbfe710 ":8000") at mod_proxy_http.c:1470
#2 0x283af78e in proxy_http_handler (r=0x81be050, worker=0x815e018,
conf=0x812c9d8, url=0x81b6690 "/", proxyname=0x0, proxyport=0)
at mod_proxy_http.c:1715
#3 0x283a2137 in proxy_run_scheme_handler (r=0x81be050, worker=0x815e018,
conf=0x812c9d8, url=0x81bf69e "http://backend_server/",
proxyhost=0x0, proxyport=3820) at mod_proxy.c:1936
#4 0x283a4bf4 in proxy_handler (r=0x81be050) at mod_proxy.c:739
#5 0x08076d42 in ap_run_handler (r=0x81be050) at config.c:157
#6 0x0807710d in ap_invoke_handler (r=0x81be050) at config.c:371
#7 0x0809b62d in ap_process_request (r=0x81be050) at http_request.c:258
#8 0x08099285 in ap_process_http_connection (c=0x81b6128) at
http_core.c:171
#9 0x0807c59a in ap_run_process_connection (c=0x81b6128) at connection.c:43
#10 0x080abf7b in child_main (child_num_arg=0) at prefork.c:640
#11 0x080ac1b2 in make_child (s=0xf, slot=1) at prefork.c:736
#12 0x080ac240 in startup_children (number_to_start=2) at prefork.c:754
#13 0x080aca32 in ap_mpm_run (_pconf=0xbfbfeaa0, plog=0x8126018,
s=0xbfbfeaa8)
at prefork.c:975
#14 0x08066f10 in main (argc=3, argv=0xbfbfeba4) at main.c:712


Apache was compiled with:

OPTIM="-g -ggdb3" ./configure \
--enable-so \
--enable-ssl \
--enable-mods-shared="proxy proxy_http proxy_ftp proxy_connect headers"

and after:

../apxs \
-c -I/usr/local/include/libxml2 \
-i /usr/local/mod_proxy_html/mod_proxy_html.c


Any idea what might cause this? I'm not experienced with Apache modules
developing so I better ask first before trying to fix it myself.

Is mod_proxy_html not yet ready for this version of Apache?

Also, please let me know if there is a better forum to post this problem
if this is not the right place.

TIA

Regards,
jm

Report this message