Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Unable to Configure Apache HTTP Server for Physical Load Balance's VIP

Unable to Configure Apache HTTP Server for Physical Load Balance's VIP

Unable to Configure Apache HTTP Server for Physical Load Balance's VIP

We we have two Apache WebServers (WebServerA & WebServerB) and Two Tomcat Servers (TomcatA & TomcatB)
F5 LB Connect Both WebServerA & WebServerB
WebServerA Connect TomcatA (using AJP1.3)
WebServerB Connect TomcatB (using AJP1.3)

If TomcatA failed and WebServerA is available then we are getting 503 Error Message. To avoid this Error Message & Failover, we created LB(VIP) for TamcatA & TomcatB and Port is 8080

On WebServer's workers.properties and VirtualHost conf file, we replaced TomcatA and TomcatB details to LB Server Name and Port 8080. But We are getting 503 Error while accessing the Site from WebServer. However, if I directly access LB then its working. Kindly please help to resolve this issue.

We need configuration help to get like this. Kindly please help on this.
WebServer (mod_jk) -> LB Pool (TomcatA & TomcatB :8080) -> TomcatA (AJP1.3) & TomcatB (AJP1.3)


RE: Unable to Configure Apache HTTP Server for Physical Load Balance's VIP

By 'AJP', are you referring "Apache JavaServer Pages" or something else??

And define what you mean by 'LB(VIP)' please. Sure one could guess at "A Load Balancer using a Virtual IP" but that may not be what you mean.


Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.

RE: Unable to Configure Apache HTTP Server for Physical Load Balance's VIP

ChrisHisrt, AJP is an Apache protocol to talk directly to JVMs.

jponnusa, It's not clear what your setup is. But...

You just need to create a workers properties file on both Apache servers that defines both Tomcat servers as workers. That means both Apache servers will be sending traffic to both Tomcats. That also means if one Tomcat fails, both Apache servers will send traffic to the remaining Tomcat server.

You should also have a physical loadbalancer in front of both Apache servers. This will give you fault tolerance on the Apache layer. Something like a Cisco CSS, Citrix Netscaler, or similar. This physical loadbalancer is where your VIP and vanity URL for your APP will be. Your physical loadbalancer will balance between the two Apaches at port 8080 (or whatever you choose). Both Apaches will load balance to both Tomcats using AJP to port 8009 (or whateevr the AJP port is configured to).

Your workers.properties file should look something like this...


# Define list of workers that will be used
# for mapping requests

# Define TomcatA
# Use port listed in server.xml

# Define TomcatB
# Use port listed in server.xml

# Load-balancing behaviour

# Status worker for managing load balancer

Your AJP port will not be 8080. That's an HTTP port on the Tomcat JVM. Your AJP port is listed in the server's server.xml file.


<!-- Define an AJP 1.3 Connector on port 8989 -->
<Connector port="8989" protocol="AJP/1.3" redirectPort="443" /> 

Also, on each Tomcat server, you'll need to define the "jvmroute". This identifies the "worker". In each server's server.xml file, you'll need to make a line like this. Each Tomcat server needs to have a different name that matches the worker name...


<!-- You should set jvmRoute to support load-balancing via AJP ie : -->
    <Engine name="Catalina" defaultHost="tomcatserverA.your.domain.com" jvmRoute="TomcatA"> 

This configuration also defines a jkstatus page to let you check the load balancing from a browser.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close