You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Shantanu Pavgi <pa...@uab.edu> on 2010/12/15 23:45:11 UTC

Re: http-tomcat - AJP ilink receive failed - 500/503 errors

Sorry for the late reply. But it might help someone having similar issue. 

There was a firewall between two systems (distinct from CentOS iptables), which dropped (idle) connections after some time. Not sure about exact firewall config here. The Apache web server would throw an 500/503 error when it tried to reuse an open connection which firewall had already closed.  The issue was resolved by using disablereuse parameter in ProxyPass directive.   http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass 

Thanks for the suggestions. 

--
Shantanu Pavgi. 

On Sep 28, 2010, at 4:25 PM, Christopher Schultz wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Pid,
> 
> On 9/17/2010 4:42 PM, Pid wrote:
>> On 17/09/2010 16:57, Shantanu Pavgi wrote:
>>> 
>>> Hi,
>>> 
>>> I have a Apache http server and a Tomcat server configured using AJP connector (mod_proxy_ajp). The http server serves HTML/PHP pages and also proxies Java webapp requests to back-end Tomcat server. 
>>> System config: 
>>> * Both servers are running as Virtual Machines
>>> * CentOS 5.4
>>> * Apache Tomcat 6.0.26 and Sun JDK 1.6
>>> * Apache http: 2.2.3 (it's old, but that's what comes with default CentOS repo)
>> 
>> If you really have 2.2.3 and not a 2.2.3 that's been patched
>> subsequently, then you're at risk of running into bugs in mod_proxy_ajp
>> that have already been patched.
> 
> +1
> 
>> 2.2.3 was the first release version containing that module and it was
>> definitely buggy, so you really need to look at upgrading HTTPD before
>> expending more time trying to solve the problem.
> 
> +1
> 
> Another option would be to use mod_jk, which uses the same protocol
> (though wildly different configuration), and might be easier to install
> than trying to get an httpd upgrade accomplished. It's also much more
> well-tested and has more options for tweaking than mod_proxy_ajp (from
> my limited reading).
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkyiXVYACgkQ9CaO5/Lv0PAgqQCffT3C2bTbkje+zQDjSrm8GVZy
> RHsAoMH8nwfLhi05oHsnRQ8knR1lEfac
> =OdvG
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


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


Re: http-tomcat - AJP ilink receive failed - 500/503 errors

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Shantanu,

On 12/21/2010 11:11 AM, Shantanu Pavgi wrote:
> I had tried AJP PING/PONG options which worked for a while, but not
> consistently. Seems like a better solution would be to work with
> network folks regarding firewall config.

It's always good to avoid errors than to recover from them. If the
CPING/CPONGs weren't working well, you should have posted here: Rainer
and Mladen can usually give inspect your configuration and give you some
tips.

> Just want to mention a nice Perl script that I found during
> debugging: http://www.perlmonks.org/?node_id=766945 , useful for
> sending AJP ping requests to Tomcat independent of web server.

Go ahead and add that link to the Tomcat Wiki: sounds like a very useful
tool.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0RIYIACgkQ9CaO5/Lv0PDpzwCeObz3ngrxexgbk57o3pp8jF19
0DMAnA7fKrZmyGyfv3jZiILjlgzGdmMT
=lTS2
-----END PGP SIGNATURE-----

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


Re: http-tomcat - AJP ilink receive failed - 500/503 errors

Posted by Shantanu Pavgi <pa...@uab.edu>.
Thanks for the tips Chris. 

I had tried AJP PING/PONG options which worked for a while, but not consistently. Seems like a better solution would be to work with network folks regarding firewall config. 

Just want to mention a nice Perl script that I found during debugging: http://www.perlmonks.org/?node_id=766945 , useful for sending AJP ping requests to Tomcat independent of web server. 

--
Shantanu.


On Dec 16, 2010, at 1:54 PM, Christopher Schultz wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Shantanu,
> 
> On 12/15/2010 5:45 PM, Shantanu Pavgi wrote:
>> There was a firewall between two systems (distinct from CentOS
>> iptables), which dropped (idle) connections after some time. Not sure
>> about exact firewall config here. The Apache web server would throw
>> an 500/503 error when it tried to reuse an open connection which
>> firewall had already closed.  The issue was resolved by using
>> disablereuse parameter in ProxyPass directive.
>> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass
> 
> mod_jk (and therefore AJP) supports a ping operation in order to keep
> the channels open but validate them (and re-connect if necessary) before
> using them. You might want to look for those options in mod_proxy_ajp to
> improve performance.
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk0Kbn4ACgkQ9CaO5/Lv0PBZGACfVg8rodAPEAn7bhqm3OGJrifC
> SrkAoIeWVDqZ+3Q0i4g8hcJ/10HXLrxY
> =9H2n
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


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


Re: http-tomcat - AJP ilink receive failed - 500/503 errors

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Shantanu,

On 12/15/2010 5:45 PM, Shantanu Pavgi wrote:
> There was a firewall between two systems (distinct from CentOS
> iptables), which dropped (idle) connections after some time. Not sure
> about exact firewall config here. The Apache web server would throw
> an 500/503 error when it tried to reuse an open connection which
> firewall had already closed.  The issue was resolved by using
> disablereuse parameter in ProxyPass directive.
> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass

mod_jk (and therefore AJP) supports a ping operation in order to keep
the channels open but validate them (and re-connect if necessary) before
using them. You might want to look for those options in mod_proxy_ajp to
improve performance.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0Kbn4ACgkQ9CaO5/Lv0PBZGACfVg8rodAPEAn7bhqm3OGJrifC
SrkAoIeWVDqZ+3Q0i4g8hcJ/10HXLrxY
=9H2n
-----END PGP SIGNATURE-----

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