-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aman,

On 5/25/12 1:25 AM, Aman Arora wrote:
> I'm trying to do a setup of tomcat clustering in which one tomcat
> is on port 8080 and other one is on 8081.

Sounds reasonable.

> i have downloaded the tomcat-connector in the modules folder of my
> apache.i built it using build-unix.sh by downloading the script
> from net as it was nt already there in the downloaded
> tomcat-connector.

What is build-unix.sh and why did you have to "download it from [the]
net"? Other than apxs (which implies you have the httpd dev tools
available), you don't need anything else to build mod_jk for your
environment. Read the README.txt file in the root of the tarball and
follow the directions.

> it buit mod_jk.so

That's good. Since I don't know what build-unix.sh does, I'm happy it
didn't delete your kernel.

> which i have placed inside modules folder as 
> /usr/local/apache2/modules/mod_jk.so then i created
> workers.properties file and gave the description of workers there

What's in there (see below)?

> .and included it in httpd.cong file .

How?

> still when i type http://localhost/jsp-pages which are in my
> webapps / it is not passing requast to tomcat which is holding the
> js pages.

What do you get in the response instead?

> you may hav a look at the conf files to get a better fel of the
> problem ! the link is 
> http://www.coderanch.com/t/581294/Tomcat/Tomcat-Clustering#2648034

So I have to follow one link to get to 4 other links?

For those less-willing to put up with this kind of crap, here's the
important part of httpd.conf:

Include /usr/local/apache2/conf/mod_jk.conf

(*Not inside a VirtualHost definition*)

Here's the mod_jk.conf:

    LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
    JkWorkersFile /usr/local/apache2/conf/workers.properties
    JkLogFile /usr/local/apache2/logs/mod_jk.log
    JkLogLevel info
    #JkMount /sample/* loadbalancer
    #JkMount /* loadbalancer
    JkMount /examples/*.jsp default

And finally, here's the workers.properties:

    workers.tomcat_home=/usr/local/tomcat/apache-tomcat-7.0.27/
    workers.java_home=/usr/java/jdk1.7.0_04/
    ps=/
    worker.list=tomcatnode1, tomcatnode2, loadbalancer
    worker.tomcatnode1.port=8009
    worker.tomcatnode1.host=localhost
    worker.tomcatnode1.type=ajp13
    worker.tomcatnode1.lbfactor=1
    worker.tomcatnode2.port=8010
    worker.tomcatnode2.host=localhost
    worker.tomcatnode2.type=ajp13
    worker.tomcatnode2.lbfactor=1
    worker.loadbalancer.type=lb
    worker.loadbalancer.balanced_workers=tomcatnode1, tomcatnode2
    worker.loadbalancer.sticky_session=1


So, I can see a bunch of problems. Let's start at the top.

1. You put your JkMount directives in your mod_jk.conf file,
   which is included in your the top-level httpd.conf file.
   Your JkMounts will not be copied into your VirtualHosts
   and so you essentially have no mappings at all.

2. You are mapping /examples/*.jsp and trying to access /jsp-pages,
   so that's not going to work.

3. You are mapping /examples/*.jsp to the "default" worker, which
   has not been defined.

4. You have an old mod_jk config that contains these irrelevant
   settings: workers.tomcat_home, workers.java_home, ps

5. You have defined your 2 "node" workers to be on ports 8009 and 8010
   but you said that you have your Tomcats running on 8080 and 8081.
   Perhaps you have AJP/1.3 connectors defined for 8009 and 8010 but
   I'm not going to enter /yet another/ CAPTCHA just to see your
   configuration files which I'm sure are completely full of comments
   and other crap I don't feel like reading.

I suspect that #1, #2, and #3 are your real problems. Fix those and
try again.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+/tQIACgkQ9CaO5/Lv0PAqXQCeLCHjYQAtRJH8FQ78+x9e0xf4
v1gAoJLdYNCS/HErJbQr2bm47AUYSczC
=y+SX
-----END PGP SIGNATURE-----

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

Reply via email to