tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: sending request to tomcat failed.....
Date Thu, 18 Feb 2010 14:47:50 GMT
Peter Crowther wrote:
> On 18 February 2010 13:55, Munirathinavel <munirathinavel@gmail.com> wrote:
>> I'm using apache2.2 + tomcat6.0.18 + mod_jk1.2.28 for my portal.While doing
>> load test with 20 & more users i'm getting the following message in
>> mod_jk.log....and in browser also page is not getting loaded...
> [...]
>> [Thu Feb 18 18:35:07 2010][1528:2244] [info] jk_ajp_common.c (1788): Writing
>> to client aborted or client network problems
>> [Thu Feb 18 18:35:07 2010][1528:2244] [info] jk_ajp_common.c (2447):
>> (worker1) sending request to tomcat failed (unrecoverable), because of
>> client write error (attempt=1)
>> [Thu Feb 18 18:35:07 2010]worker1 216.205.107.50 30.250000
>> [Thu Feb 18 18:35:07 2010][1528:2244] [info] mod_jk.c (2608): Aborting
>> connection for worker=worker1
>>
>>
>>  I'm suspecting this due to some improper configuration of
>> workers.properties & virtual host settings.....
>> can you please help me to proceed further.....
> 
> We probably could, but we are not telepaths. 
(apart from Pid)

  We cannot analyse your
> configuration given the information you have posted.  If you suspect
> the error is somewhere in workers.properties and virtual host
> settings, then why not post them plus your server.xml (with any
> sensitive bits replaced)?
> 

In addition to what Peter mentions above, I would suggest to read the 
log messages carefully.  As you can imagine, these are not produced 
randomly.  The developer of mod_jk put them in the code, and tried to 
indicate as clearly as possible what is happening.
And it does not sound as if this is some wrong parameter in the 
configuration.

This is a schema of how it works :

a) HTTP request :

Client (browser) ==> Apache httpd --> mod_jk ==> Tomcat

b) HTTP response :

Tomcat ==> mod_jk --> Apache httpd ==> Client (browser)

In the above, a "==" represents a real TCP/IP connection, and a "--" is 
just an internal "function call".
(Or another way to see this, is that mod_jk is really a part of the 
Apache httpd code; it is just a function called by Apache, so there is 
no "external" connection between them).

c) In the log of mod_jk, there are these messages :

 >> [Thu Feb 18 18:35:07 2010][1528:2244] [info] jk_ajp_common.c (1788): 
Writing to client aborted or client network problems
 >> [Thu Feb 18 18:35:07 2010][1528:2244] [info] jk_ajp_common.c (2447):
 >> (worker1) sending request to tomcat failed (unrecoverable), because 
of client write error (attempt=1)

So, mod_jk is saying : I cannot write to the client, because I do not 
have a connection with him anymore.
This happens during the response phase, when mod_jk has received some 
response bytes from Tomcat, and is trying to send them to the client 
(the browser).  But it cannot do that, because the TCP/IP connection 
with the client is already closed.

In other words :
- either the user lost patience, and clicked on another link in the 
browser page (or on the stop button in the browser, or closed the 
browser window).  In such cases, the browser will close the TCP/IP 
connection with Apache.
- or there is some network problem between the client and Apache, which 
causes the connection to be lost.
This can happen if there is some other element between Apache and the 
client that can close or lose the connection. (And of course there 
always is something : the internet, routers, firewalls,..).

A case like the above happens also regularly under normal circumstances. 
  There will always be users who cannot stop clicking all over on the 
page, or clicking again when they think that the server is too slow, and 
for a million other reasons.  It is normally nothing to worry about, 
except if it seems to happen too often, or users complain (and you can 
verify) that they just click once of the link, and they get incomplete 
pages or error messages.
But then, you should really analyse what happens, using a network 
monitoring tool like wireshark, and see what really happens to these 
lost connections.





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message