Discussion:
mod_proxy warning - status line - please assist
Marco Muishout
2003-10-17 07:26:27 UTC
Permalink
Hi,

I have the following situation:

* Local client (IE5/6) connecting to a local site apache server (2.0.47),
serving local static content which is cached on the apache server.
* The local apache server is also running mod_proxy, which forwards all JSP
requests to a central site apache server (also 2.0.47).
* The central site apache server is connected to tomcat 4.1.24 using mod_jk2
(2.0.2).

So - Every time a local client calls upon a JSP page, the request is
forwarded by the local apache server to the central apache server, through
mod_jk, to tomcat. Then tomcat passes the reply back through mod_jk2, back
to the central apache server, back to the local apache server, back to the
client. The JSP application works fine, the client does not see any problem.

Here's my problem, though:
EVERY TIME a JSP page is requested by a client, I see a warning in the local
apache server error log file. It looks like mod_proxy does not completely
like the status reply it is receiving from the central apache server:

local apache server error_log:
*************************
[Thu Oct 09 17:57:40 2003] [debug] proxy_http.c(109): proxy: HTTP:
canonicalising URL //centralserver:7300/ematrix/emxLogin.jsp
[Thu Oct 09 17:57:40 2003] [debug] mod_proxy.c(459): Trying to run
scheme_handler
[Thu Oct 09 17:57:40 2003] [debug] proxy_http.c(1076): proxy: HTTP: serving
URL http://centralserver:7300/ematrix/emxLogin.jsp?js=yes&refresh=true
[Thu Oct 09 17:57:40 2003] [debug] proxy_http.c(221): proxy: HTTP connecting
http://centralserver:7300/ematrix/emxLogin.jsp?js=yes&refresh=true to
centralserver:7300
[Thu Oct 09 17:57:40 2003] [debug] proxy_util.c(1203): proxy: HTTP: fam 2
socket created to connect to centralserver
[Thu Oct 09 17:57:41 2003] [debug] proxy_http.c(370): proxy: socket is
connected
[Thu Oct 09 17:57:41 2003] [debug] proxy_http.c(404): proxy: connection
complete to xxx.xxx.xxx.xx:7300 (centralserver)
[Thu Oct 09 17:57:41 2003] [warn] proxy: bad HTTP/1.1 status line returned
by /ematrix/emxLogin.jsp (GET)


It seems that mod_proxy does not like the status line as returned by the
central apache server. Here's what the central server returned:
HTTP/1.1 200
Date: Fri, 17 Oct 2003 07:01:10 GMT
Server: Apache/2.0.47 (Win32) mod_jk2/2.0.2
Set-Cookie: JSESSIONID=5452BDF434A45FD1FED2CFA0A8DB9F62; Path=/ematrix
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked

There is a space behind the '200' status, which as far as I can tell should
be accepted by mod_proxy.

Since this has to do with an enterprise-wide application, we absolutely need
this warning to go away as it is clogging our log files. Does anyone have an
idea why mod_proxy does not accept this status line, or what I should do to
make the status line correct again?

I read somewhere that mod_jk2 'strips' the reason-phrase from the status
line, but I have not seen this confirmed.

Any help is highly appreciated.

Thanks,

Marco
Kaushal Jha, ZEDO
2003-10-17 09:38:55 UTC
Permalink
thats becoz the server above it sent a

"HTTP/1.1 200" instead of "HTTP/1.1 200 OK"

the after the status number 200 apache was expecting an "OK" :)
Post by Marco Muishout
Hi,
* Local client (IE5/6) connecting to a local site apache server (2.0.47),
serving local static content which is cached on the apache server.
* The local apache server is also running mod_proxy, which forwards all JSP
requests to a central site apache server (also 2.0.47).
* The central site apache server is connected to tomcat 4.1.24 using mod_jk2
(2.0.2).
So - Every time a local client calls upon a JSP page, the request is
forwarded by the local apache server to the central apache server, through
mod_jk, to tomcat. Then tomcat passes the reply back through mod_jk2, back
to the central apache server, back to the local apache server, back to the
client. The JSP application works fine, the client does not see any problem.
EVERY TIME a JSP page is requested by a client, I see a warning in the local
apache server error log file. It looks like mod_proxy does not completely
*************************
canonicalising URL //centralserver:7300/ematrix/emxLogin.jsp
[Thu Oct 09 17:57:40 2003] [debug] mod_proxy.c(459): Trying to run
scheme_handler
[Thu Oct 09 17:57:40 2003] [debug] proxy_http.c(1076): proxy: HTTP: serving
URL http://centralserver:7300/ematrix/emxLogin.jsp?js=yes&refresh=true
[Thu Oct 09 17:57:40 2003] [debug] proxy_http.c(221): proxy: HTTP connecting
http://centralserver:7300/ematrix/emxLogin.jsp?js=yes&refresh=true to
centralserver:7300
[Thu Oct 09 17:57:40 2003] [debug] proxy_util.c(1203): proxy: HTTP: fam 2
socket created to connect to centralserver
[Thu Oct 09 17:57:41 2003] [debug] proxy_http.c(370): proxy: socket is
connected
[Thu Oct 09 17:57:41 2003] [debug] proxy_http.c(404): proxy: connection
complete to xxx.xxx.xxx.xx:7300 (centralserver)
[Thu Oct 09 17:57:41 2003] [warn] proxy: bad HTTP/1.1 status line returned
by /ematrix/emxLogin.jsp (GET)
It seems that mod_proxy does not like the status line as returned by the
HTTP/1.1 200
Date: Fri, 17 Oct 2003 07:01:10 GMT
Server: Apache/2.0.47 (Win32) mod_jk2/2.0.2
Set-Cookie: JSESSIONID=5452BDF434A45FD1FED2CFA0A8DB9F62; Path=/ematrix
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
There is a space behind the '200' status, which as far as I can tell should
be accepted by mod_proxy.
Since this has to do with an enterprise-wide application, we absolutely need
this warning to go away as it is clogging our log files. Does anyone have an
idea why mod_proxy does not accept this status line, or what I should do to
make the status line correct again?
I read somewhere that mod_jk2 'strips' the reason-phrase from the status
line, but I have not seen this confirmed.
Any help is highly appreciated.
Thanks,
Marco
Graham Leggett
2003-10-17 11:33:07 UTC
Permalink
Post by Kaushal Jha, ZEDO
thats becoz the server above it sent a
"HTTP/1.1 200" instead of "HTTP/1.1 200 OK"
the after the status number 200 apache was expecting an "OK" :)
Not strictly true - the spec says the line must read
"HTTP/<major>.<minor> XXX <response string>", and the response string
can be "". The thing is the space after the XXX and before the possibly
empty result string must be there.

Apparently the space is there though according to the original post, so
it could be a problem with the way Apache handles empty result strings.

Regards,
Graham
--
Kaushal Jha
2003-10-17 12:51:57 UTC
Permalink
keepchar = buffer[12];
if (keepchar == '\0') {
ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
r->server, "proxy: bad HTTP/%d.%d status line "
"returned by %s (%s)", major, minor, r->uri,
r->method);

where char *buffer is the line of the server response "HTTP/#.# ###*"
yes true , to reframe , the apache proxy logs the error when it does not
see a space after the "200" in this case .

best of luck


----- Original Message -----
From: "Graham Leggett" <***@sharp.fm>
To: <modproxy-***@apache.org>
Cc: <***@hotmail.com>
Sent: Friday, October 17, 2003 5:03 PM
Subject: Re: mod_proxy warning - status line - please assist
Post by Graham Leggett
Post by Kaushal Jha, ZEDO
thats becoz the server above it sent a
"HTTP/1.1 200" instead of "HTTP/1.1 200 OK"
the after the status number 200 apache was expecting an "OK" :)
Not strictly true - the spec says the line must read
"HTTP/<major>.<minor> XXX <response string>", and the response string
can be "". The thing is the space after the XXX and before the possibly
empty result string must be there.
Apparently the space is there though according to the original post, so
it could be a problem with the way Apache handles empty result strings.
Regards,
Graham
--
Marco Muishout
2003-10-22 11:27:57 UTC
Permalink
I commented the stuff out and it works. I also submitted a bug report.

Thanks guys
Post by Kaushal Jha
keepchar = buffer[12];
if (keepchar == '\0') {
ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
r->server, "proxy: bad HTTP/%d.%d status
line " "returned by %s (%s)", major,
minor, r->uri, r->method);
where char *buffer is the line of the server response "HTTP/#.# ###*"
yes true , to reframe , the apache proxy logs the error when it does
not see a space after the "200" in this case .
best of luck
----- Original Message -----
Sent: Friday, October 17, 2003 5:03 PM
Subject: Re: mod_proxy warning - status line - please assist
Post by Graham Leggett
Post by Kaushal Jha, ZEDO
thats becoz the server above it sent a
"HTTP/1.1 200" instead of "HTTP/1.1 200 OK"
the after the status number 200 apache was expecting an "OK"
:)
Not strictly true - the spec says the line must read
"HTTP/<major>.<minor> XXX <response string>", and the response
string can be "". The thing is the space after the XXX and before
the possibly empty result string must be there.
Apparently the space is there though according to the original
post, so it could be a problem with the way Apache handles empty
result strings.
Regards,
Graham
--
Sean Farley
2003-10-19 01:41:18 UTC
Permalink
Post by Marco Muishout
Hi,
* Local client (IE5/6) connecting to a local site apache server
(2.0.47), serving local static content which is cached on the apache
server.
* The local apache server is also running mod_proxy, which forwards
all JSP requests to a central site apache server (also 2.0.47).
* The central site apache server is connected to tomcat 4.1.24 using
mod_jk2 (2.0.2).
So - Every time a local client calls upon a JSP page, the request is
forwarded by the local apache server to the central apache server,
through mod_jk, to tomcat. Then tomcat passes the reply back through
mod_jk2, back to the central apache server, back to the local apache
server, back to the client. The JSP application works fine, the client
does not see any problem.
EVERY TIME a JSP page is requested by a client, I see a warning in the
local apache server error log file. It looks like mod_proxy does not
completely like the status reply it is receiving from the central
*************************
canonicalising URL //centralserver:7300/ematrix/emxLogin.jsp
[Thu Oct 09 17:57:40 2003] [debug] mod_proxy.c(459): Trying to run
scheme_handler
[Thu Oct 09 17:57:40 2003] [debug] proxy_http.c(1076): proxy: HTTP: serving
URL http://centralserver:7300/ematrix/emxLogin.jsp?js=yes&refresh=true
[Thu Oct 09 17:57:40 2003] [debug] proxy_http.c(221): proxy: HTTP connecting
http://centralserver:7300/ematrix/emxLogin.jsp?js=yes&refresh=true to
centralserver:7300
[Thu Oct 09 17:57:40 2003] [debug] proxy_util.c(1203): proxy: HTTP: fam 2
socket created to connect to centralserver
[Thu Oct 09 17:57:41 2003] [debug] proxy_http.c(370): proxy: socket is
connected
[Thu Oct 09 17:57:41 2003] [debug] proxy_http.c(404): proxy: connection
complete to xxx.xxx.xxx.xx:7300 (centralserver)
[Thu Oct 09 17:57:41 2003] [warn] proxy: bad HTTP/1.1 status line returned
by /ematrix/emxLogin.jsp (GET)
It seems that mod_proxy does not like the status line as returned by the
HTTP/1.1 200
Date: Fri, 17 Oct 2003 07:01:10 GMT
Server: Apache/2.0.47 (Win32) mod_jk2/2.0.2
Set-Cookie: JSESSIONID=5452BDF434A45FD1FED2CFA0A8DB9F62; Path=/ematrix
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
There is a space behind the '200' status, which as far as I can tell should
be accepted by mod_proxy.
Since this has to do with an enterprise-wide application, we absolutely need
this warning to go away as it is clogging our log files. Does anyone have an
idea why mod_proxy does not accept this status line, or what I should do to
make the status line correct again?
I read somewhere that mod_jk2 'strips' the reason-phrase from the status
line, but I have not seen this confirmed.
Any help is highly appreciated.
Thanks,
Marco
On a persistent connection, the previous request may have an error in it
that upsets the module. I have seen a server returning a 304 with a
body which is against the standard. That can upset the module as the
body is not removed before the stream is read for the next request. You
would actually see all the headers and the body as text within the
browser.

This may not be the case here, yet it may be something like it.

Sean
----------------------
sean-***@farley.org
Loading...