tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mirek Kopriva <mirek1...@gmail.com>
Subject Re: Load balancing with apache + mod_jk
Date Thu, 17 Nov 2005 09:27:55 GMT
Ok, so i got the solution. There was some config missing
in tomcat's server.xml
The Engine needs to have jvmRoute set to the name of the worker
and the default one needs to be commented out.
Anyway, thanks to everybody for help.
Mirek

<!-- You should set jvmRoute to support load-balancing via AJP ie : -->
<Engine name="Standalone" defaultHost="localhost" jvmRoute="ajp131">

<!-- Define the top level container in our container hierarchy
<Engine name="Catalina" defaultHost="localhost">
-->

On 11/16/05, Mirek Kopriva <mirek1977@gmail.com> wrote:
>
> Hi Guys,
> Thanks for the quick reply.
> I did the changes you suggested and still have the problem.
> I would like to mention that the loadbalancing works
> with tomcat's example application. But not with ours.
>  The difference is taht we are using struts and this together with using
> html frames means that one user request is actually more
> separate requests to the server. Some of those requests
> are loadbalanced incorrectly (they should all go to the one tomcat
> instance) which together, with the fact that it's
> a login page and user credentials must be in the session, is causing
> redirection back to the login page.
>  Thanks a lot for help again,
> Mirek
>   On 11/16/05, Mirek Kopriva <mirek1977@gmail.com> wrote:
> >
> >
> >
> > ---------- Forwarded message ----------
> > From: Olve Hansen < olve.hansen@intermedia.uib.no>
> > Date: Nov 16, 2005 10:07 AM
> > Subject: Re: Load balancing with apache + mod_jk
> > To: users@tomcat.apache.org
> >
> > In addition to Mladens post, you have several errors in in your
> > workers.properties .
> > You should read the docs:
> > http://tomcat.apache.org/connectors-doc/config/workers.html
> > I have spent some hours deciphering these (they have gotten much better
> > lately).
> >
> > ons, 16,.11.2005 kl. 09.29 +0200, skrev Mirek Kopriva:
> > >
> > > #properties
> > > workers.ajp13.1.host=127.0.0.1
> > > workers.ajp13.1.port=8009
> > > workers.ajp13.2.host=xx.xx.xx.xx (other server IP)
> > > workers.ajp13.2.port=8009
> > These should be 'worker.' not 'workers.'
> > >
> > > worker.list=loadbalancer, ajp13.1, ajp13.2
> >
> > The balanced workers must not be part of worker.list
> > (See doc )
> >
> > >
> > > worker.loadbalancer.type=lb
> > > worker.loadbalancer.balanced_workers=ajp13.1 , ajp13.2
> > It should read 'worker.loadbalancer.balance_workers'.
> >
> >
> > > worker.loadbalancer.sticky_session=True
> > >
> > > # Workers
> > > worker.ajp13.1.port=$(workers.ajp13.1.port)
> > > worker.ajp13.1.host=$ (workers.ajp13.1.host)
> >
> > My default workers.properties also says:
> > # As a general note, the characters $( and ) are used internally to
> > define
> > # macros. Do not use them in your own configuration!!!
> >
> > So you might change the above config as well.
> >
> > Hope this helps
> >
> > Olve
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.1 (GNU/Linux)
> >
> > iD8DBQBDeuikAtZqQquHhqARAoSjAJ9QVdpiEykrbYSNA3/OyKS/CE/mywCgh1vm
> > jvHsc475olqPhzAUJFe6G+E=
> > =A949
> > -----END PGP SIGNATURE-----
> >
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message