503 Errors with Apache httpd and Tomcat and mod_spdy - apache

I run a server which uses httpd and an AJP proxy to Tomcat.
I switched on mod_spdy on my server yesterday and I started seeing some 503 errors. I have read something that because of the number of parallels connections through mod_spdy it may cause an issue. Is this the case and how do you resolve this?

Related

How to configure tomcat and apache

I have to configure Apache httpd server with Tomcat. I have followed this tutorial and I am getting this error
D:\myproject\apache\bin>httpd -k start
httpd: Syntax error on line 560 of D:/myproject/apache/conf/httpd.conf: Syntax e
rror on line 3 of D:/myproject/tomcat/conf/mod_jk.conf: Cannot load D:/myproject
/apache/modules/mod_jk.so into server: The specified procedure could not be foun
d.
I couldn't sort out first, that I was getting version error. Most probably I am trying to insert 32 bit mod_jk to 64 bit OS. If any one have well-configured Apache httpd server and tomcat please share it.
mod_jk obliges two substances:
mod_jk.xxx - The Apache HTTP Server module, contingent upon your working framework, it will be mod_jk.so, mod_jk.nlm or MOD_JK.SRVPGM (see the fabricate segment).
workers.properties - A record that portrays the host(s) and port(s) utilized by the specialists (Tomcat forms). A specimen workers.properties can be found under the conf registry in the source download.
Additionally as with other Apache HTTP Server modules, mod_jk ought to be initially introduced on the modules catalog of your Apache webserver, ie :/usr/lib/apache and you ought to overhaul your httpd.conf record. For More Visit http://www.pillenpalast.com/

How to stop tomcat and start apache2?

I have this server, that i have not installed personally. There are Apache2 and Tomcat6 running together. I want to stop Tomcat6 and use Apache2 but when i do
sudo service tomcat6 stop
sudo service apache2 restart
if i type 'localhost' in my browser i get a '503 service unavailable' error. So how i can get Apache2 'take control'? I mean i want the default site of Apache2 to be displayed on 'localhost' instead of tomcat'one.
(If i type locahost with Tomcat running i get an "it works" welcome page.)
Apache2 will have control when Tomcat is stopped and you start Apache. With Tomcat running on same port, you are unable to start Apache. Solution to 503 error is in Apache logs.

Apache proxy caching "service temporarily unavailable" response when target is down

I have apache sitting in front of my node server. Node is running on certain port, I am using apache to proxy to that port and also have apache configured for https.
When I start apache and then start my node server everything runs great. If I bring down the node server and try to hit my service apache says 'Service Temporarily Unavailable'. This is expected as my node server is down.
However when I bring my server back up without touching apache and try to hit me service again apache still says 'Service Temporarily Unavailable'. Its like apache is not trying again. If I bounce apache all is well again.
Since I am running with forever there is a chance my server could be down for a few second if a fatal happens. I don't want to have to bounce apache if that happens.
Is there anyway to get apache to always try and not cache the fact that a Service it recently tried to hit was unavailable?
You need to add retry=0 to ProxyPass directive.
So it will be something like:
ProxyPass /example http://backend.example.com retry=0
Check some info here: http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass

apache + tomcat using mod_proxy ajp randomly stops working

I am using apache and mod_proxy (via ajp) to send traffic to my tomcat instance. Everything works fine and then it randomly breaks. I see a 408 in the tomcat logs and apache is returning a 503.
Has anyone seen this before? Any reason this would occur?
Do you have a firewall between Apache and Tomcat? I've had problems in the past while setting up AJP when a firewall was present. If it is your problem, take a look:
http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html
This ended up being due to the way amazon's load balancer does health checks. I ended up switching to mod_jk and using a random port for the health check to occur where normal traffic does not occur.

Passenger with apache and nginx on the same development box

I've got Apache and passenger on my notebook. I want to test Nginx and passenger on the same machine. I can install Nginx on 8080 and apache on 80. But can I install passenger with both the same server on the same machine?
Yes, simply install the apache module and then the nginx module. You'll probably need to make sure each server has a different PassengerTempDir setting too.
I had both Apache and Nginx with passenger installed and working fine on the same Arch Linux machine, serving a Rails app. Once, with apache running and listening on port 80, I started nginx listening on the same port and got an (expected) error about the port being already bound. I stopped apache and nginx, restarted nginx and started getting Bad Gateway errors whenever I tried to access the Rails app under Nginx. I still haven't figured out what the problems is and how to fix it. Rebooting doesn't seem to help.