tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Problem with tomcat and jk module
Date Tue, 24 Jul 2012 18:58:46 GMT
Piotr Wąchała wrote:
> ok, thanks for advice, but I checked my "front end" enviroment.
> Before connection goes to front end apache, must go to firewall and next 
> to load balancer.
> I remove from this chain load balancer, and it was still the same.
> In firewall I dont observe teardown connecion or sth. like that. (I 
> can`t quit the firewall from this chain)
> I try to attach pid and tid form tomcat to apache(adding %P %{tid}P %D 
> to apache LogFormat) and search the problem, but I think it isent good 
> clue. I cant exactly correkate problem in jklogfile and apache access.log

I think that's normal.  The Apache access-log line only gets written when the request is 
complete (and the response sent, at least partially). But since here the client connection

is broken, there is no way to send anything to the client, and probably the access log 
line does not even get written then.
You may have more success with the error log, setting the LogLevel to "info" or so.

> The funny thing is the whole system works ok. for over 2y and in last 
> week just from day to another day it starts to work terrible.

That would then tend to indicate that the problem is due to some (new) element outside of

(apache+mod_jk+tomcat), no ?
If you cannot remove the firewall, can you look at the firewall logs ?

Alternatively, can you install some program like wget or curl, to simulate a client 
somewhere and tell you when the client connection is dropped ?
(This being an alternative to doing a real network trace at the client level)

Also maybe check this archived thread, there are some suggestions to try out :
(sound similar ? download the perl script that is mentioned and try it out as a client)

> I even change my isp, still no progress.
But the firewall remained the same ?

> Q: What is causing that connection to close, before the response can be 
> sent ?
> A: I will try to answer to this after 9pm.
> Piotr
> W dniu 2012-07-24 15:12, André Warnier pisze:
>> Hi.
>> Thanks for the very complete information about your environment.
>> Piotr Wąchała wrote:
>>> Hi,
>>> Maybe someone can help me with my tomcat problem.
>>> Hope that wont be a big problem for you.
>>> Im observing that our client are disconnected from server, that is 
>>> very bad situation.
>> In my experience, this kind of message :
>>> In jklogfile.log
>>> [Tue Jul 24 08:43:22 2012] [17466:47245693265248] [info] 
>>> jk_handler::mod_jk.c (2620): Aborting connection for worker=loadbalancer
>>> [Tue Jul 24 08:43:22 2012] [17023:47245693265248] [info] 
>>> ajp_process_callback::jk_ajp_common.c (1885): Writing to client 
>>> aborted or client network problems
>>> [Tue Jul 24 08:43:22 2012] [17023:47245693265248] [info] 
>>> ajp_service::jk_ajp_common.c (2543): (worker1) sending request to 
>>> tomcat failed (unrecoverable), because of client write error (attempt=1)
>> in 99% of the cases, indicates a problem that is NOT with Apache httpd 
>> or mod_jk or Tomcat.
>> It is that by the time (tomcat+mod_jk+apache) want to send a response 
>> back to the client (the user's browser), the eonnection to that user's 
>> browser does not exist anymore, so they cannot send it. (And all the 
>> other messages after that, are because after this error, things kind 
>> of get out of sync.)
>> This can happen
>> - either because the user in front of that browser decides that he has 
>> waited long enough, and clicks on another link (or closes the browser)
>> - or because some piece of equipment or software closes that 
>> connection before (tomcat+mod_jk+apache) had a chance to send back the 
>> response
>> (It happens that in-between routers/firewalls/gatewaysw/proxies, if 
>> they do not see anything happen on a client connection for a while, 
>> will close that connection - to gain on the number of connections that 
>> they must manage).
>> (Both either/or causes above are also more likely if your Tomcat 
>> requests are so that they take a long time to be processed and 
>> generate a response)
>> So the first place to look, is the link between your client 
>> (presumably a user browser) and the front-end Apache.  What is causing 
>> that connection to close, before the response can be sent ?
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message