RE: Multiple tomcat Instances on Same Server and One Apache Instance
¿dos casos del tomcat en Cluster? 2 TC instances in Cluster? Saludos desde EEUU, Martín __ Porfavor ..no altere esta communicacion..Gracias Please..do not alter this communication..Thank You Date: Wed, 16 May 2012 00:32:43 +0200 From: miguel_3_gonza...@yahoo.es To: users@tomcat.apache.org Subject: Re: Multiple tomcat Instances on Same Server and One Apache Instance On 15/05/2012 17:22, André Warnier wrote: Vickie Troy-McKoy wrote: ... Thank you Andre for your help. After I configured it as you specified, the behavior was the same as before I inquired on this forum. Well, it doesn't sound as if we really helped a lot then, or am I misunderstanding this too ? :-) Note also for the record (and maybe a later enquiry) that it should not really be necessary to have 2 separate Apache httpd instances. At least if we now understand properly what you are really trying to achieve.. Just wondering. With a 64 bits OS, how much RAM can you handle in a JVM and therefore with each instance of Tomcat? For a 12 Gb of RAM machine, it would be wise if you want to have this kind of setup (Apache and two Tomcat instances in the same machine) if you need more than 400-500 concurrent users? Miguel - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple tomcat Instances on Same Server and One Apache Instance
On 15/05/2012 23:32, Miguel González Castaños wrote: On 15/05/2012 17:22, André Warnier wrote: Vickie Troy-McKoy wrote: ... Thank you Andre for your help. After I configured it as you specified, the behavior was the same as before I inquired on this forum. Well, it doesn't sound as if we really helped a lot then, or am I misunderstanding this too ? :-) Note also for the record (and maybe a later enquiry) that it should not really be necessary to have 2 separate Apache httpd instances. At least if we now understand properly what you are really trying to achieve.. Just wondering. With a 64 bits OS, how much RAM can you handle in a JVM and therefore with each instance of Tomcat? For a 12 Gb of RAM machine, it would be wise if you want to have this kind of setup (Apache and two Tomcat instances in the same machine) if you need more than 400-500 concurrent users? If this is a new question, please post it in a completely* new thread, rather than hijacking someone else's. p * ie, no editing of subject body from a reply to an existing thread. -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Multiple tomcat Instances on Same Server and One Apache Instance
Well, I thought It was somehow related, trying to make sense of having two instances of Tomcat in the same machine and when this kind of setup is applicable (like the one I'm suggesting). Miguel De: Pid p...@pidster.com Para: Tomcat Users List users@tomcat.apache.org Enviado: Miércoles 16 de Mayo de 2012 10:49 Asunto: Re: Multiple tomcat Instances on Same Server and One Apache Instance On 15/05/2012 23:32, Miguel González Castaños wrote: On 15/05/2012 17:22, André Warnier wrote: Vickie Troy-McKoy wrote: ... Thank you Andre for your help. After I configured it as you specified, the behavior was the same as before I inquired on this forum. Well, it doesn't sound as if we really helped a lot then, or am I misunderstanding this too ? :-) Note also for the record (and maybe a later enquiry) that it should not really be necessary to have 2 separate Apache httpd instances. At least if we now understand properly what you are really trying to achieve.. Just wondering. With a 64 bits OS, how much RAM can you handle in a JVM and therefore with each instance of Tomcat? For a 12 Gb of RAM machine, it would be wise if you want to have this kind of setup (Apache and two Tomcat instances in the same machine) if you need more than 400-500 concurrent users? If this is a new question, please post it in a completely* new thread, rather than hijacking someone else's. p * ie, no editing of subject body from a reply to an existing thread. -- [key:62590808] - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple tomcat Instances on Same Server and One Apache Instance
On 16/05/2012 10:10, Miguel Gonzalez wrote: Well, I thought It was somehow related, trying to make sense of having two instances of Tomcat in the same machine and when this kind of setup is applicable (like the one I'm suggesting). Not really, no. p De: Pid p...@pidster.com Para: Tomcat Users List users@tomcat.apache.org Enviado: Miércoles 16 de Mayo de 2012 10:49 Asunto: Re: Multiple tomcat Instances on Same Server and One Apache Instance On 15/05/2012 23:32, Miguel González Castaños wrote: On 15/05/2012 17:22, André Warnier wrote: Vickie Troy-McKoy wrote: ... Thank you Andre for your help. After I configured it as you specified, the behavior was the same as before I inquired on this forum. Well, it doesn't sound as if we really helped a lot then, or am I misunderstanding this too ? :-) Note also for the record (and maybe a later enquiry) that it should not really be necessary to have 2 separate Apache httpd instances. At least if we now understand properly what you are really trying to achieve.. Just wondering. With a 64 bits OS, how much RAM can you handle in a JVM and therefore with each instance of Tomcat? For a 12 Gb of RAM machine, it would be wise if you want to have this kind of setup (Apache and two Tomcat instances in the same machine) if you need more than 400-500 concurrent users? If this is a new question, please post it in a completely* new thread, rather than hijacking someone else's. p * ie, no editing of subject body from a reply to an existing thread. -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Multiple tomcat Instances on Same Server and One Apache Instance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pid, On 5/15/12 6:07 PM, Pid wrote: On 15/05/2012 16:16, Christopher Schultz wrote: Vickie, (Bringing this back on-list). On 5/15/12 10:21 AM, Vickie Troy-McKoy wrote: Date: Tue, 15 May 2012 10:04:33 -0400 From: ch...@christopherschultz.net Subject: Re: Multiple tomcat Instances on Same Server and One Apache Instance Try to express your requirements in simpler language. For instance, you have two versions of your software: one one port 8009 and one on port 7009. Under what conditions should a particular user be sent to either of those versions? If you are using sessions, the load-balancer will keep a client associated with the right version *after* the first request, but you still need to decide under which circumstances a *new* client should be sent to one or the other. Once you can answer that, we can help you configure it. Chris, I beg to differ. I know EXACTLY what I want. When I explained exactly what I wanted, I was told about the the loadbalancer worker, which I have never used before. However, when I configured it as Andre (so graciously) explained it, I am receiving the same results as my simple workers list configuration. EXACTLY what I wanted to do was explained initially and clarified in my 5/14/12 9:54 PM post. This one? (quoted from here on out) I just want to forward based on the port that the Tomcat instance is running on. Sadly, the client doesn't know the port number of the backend Tomcat. So, how do you propose that httpd make the decision on which backend Tomcat to contact? This is why I said you didn't have your requirements straight. The 2 tomcat instances running on the same server is really the same application--but different versions. And, I thought that I could use the existing Apache instance to forward requests to the new version of the app running on tomcat as well. You can, you just need to express the rules for choosing which backend. I don't see that anywhere in the description of your problem. But, if I want (e.g. the tsademo app) the tomcat instance running on port 8009; and tsademo is being forwarded to both ports--how can I be sure that I would get the tsademo running on port 8009 and not the one running on 7009? There needs to be some external factor. That's what I'm asking you to provide: some way of telling which backend should be chosen. If you don't care, then you can use the lb to randomly-assign new clients to a backend. That seems unlikely to be the desired outcome: you want some clients to go to one version and others to go to the other. But which ones go where? That's the question you haven't answered. Really, the requirement was achievable in a simple way. Same context-path on two different servers running two different versions of the same webapp? That doesn't sound trivial to me unless there is some trigger (usually a separate URL). - -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+zrGAACgkQ9CaO5/Lv0PBAlQCfaKXSnaTx5Nqu4XnjD2kaafip d6cAn06jytRgUmyykFoqtTnx0b9JbW2p =djii -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple tomcat Instances on Same Server and One Apache Instance
On 16/05/2012 14:32, Christopher Schultz wrote: Pid, On 5/15/12 6:07 PM, Pid wrote: On 15/05/2012 16:16, Christopher Schultz wrote: Vickie, (Bringing this back on-list). On 5/15/12 10:21 AM, Vickie Troy-McKoy wrote: Date: Tue, 15 May 2012 10:04:33 -0400 From: ch...@christopherschultz.net Subject: Re: Multiple tomcat Instances on Same Server and One Apache Instance Try to express your requirements in simpler language. For instance, you have two versions of your software: one one port 8009 and one on port 7009. Under what conditions should a particular user be sent to either of those versions? If you are using sessions, the load-balancer will keep a client associated with the right version *after* the first request, but you still need to decide under which circumstances a *new* client should be sent to one or the other. Once you can answer that, we can help you configure it. Chris, I beg to differ. I know EXACTLY what I want. When I explained exactly what I wanted, I was told about the the loadbalancer worker, which I have never used before. However, when I configured it as Andre (so graciously) explained it, I am receiving the same results as my simple workers list configuration. EXACTLY what I wanted to do was explained initially and clarified in my 5/14/12 9:54 PM post. This one? (quoted from here on out) I just want to forward based on the port that the Tomcat instance is running on. Sadly, the client doesn't know the port number of the backend Tomcat. So, how do you propose that httpd make the decision on which backend Tomcat to contact? This is why I said you didn't have your requirements straight. The 2 tomcat instances running on the same server is really the same application--but different versions. And, I thought that I could use the existing Apache instance to forward requests to the new version of the app running on tomcat as well. You can, you just need to express the rules for choosing which backend. I don't see that anywhere in the description of your problem. But, if I want (e.g. the tsademo app) the tomcat instance running on port 8009; and tsademo is being forwarded to both ports--how can I be sure that I would get the tsademo running on port 8009 and not the one running on 7009? There needs to be some external factor. That's what I'm asking you to provide: some way of telling which backend should be chosen. If you don't care, then you can use the lb to randomly-assign new clients to a backend. That seems unlikely to be the desired outcome: you want some clients to go to one version and others to go to the other. But which ones go where? That's the question you haven't answered. Really, the requirement was achievable in a simple way. Same context-path on two different servers running two different versions of the same webapp? That doesn't sound trivial to me unless there is some trigger (usually a separate URL). Exactly as you say: /v1/appname /v2/appname Of course that's not what the OP asked for, as you also said. p -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Multiple tomcat Instances on Same Server and One Apache Instance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vickie, On 5/14/12 9:54 PM, Vickie Troy-McKoy wrote: I just want to forward based on the port that the Tomcat instance is running on. The 2 tomcat instances running on the same server is really the same application--but different versions. And, I thought that I could use the existing Apache instance to forward requests to the new version of the app running on tomcat as well. But, if I want (e.g. the tsademo app) the tomcat instance running on port 8009; and tsademo is being forwarded to both ports--how can I be sure that I would get the tsademo running on port 8009 and not the one running on 7009? I tried using the Virtual host in Apache; but, ran into issues with that. Or, should I just go ahead and create an entirely new apache instance for the new tomcat instance? It sounds like you really don't have a good idea of what your requirements really are. Around here, we call that do-what-I-mean semantics: you want the software to do the right thing but you can't explain what the right thing actually is. Try to express your requirements in simpler language. For instance, you have two versions of your software: one one port 8009 and one on port 7009. Under what conditions should a particular user be sent to either of those versions? If you are using sessions, the load-balancer will keep a client associated with the right version *after* the first request, but you still need to decide under which circumstances a *new* client should be sent to one or the other. Once you can answer that, we can help you configure it. - -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+yYnEACgkQ9CaO5/Lv0PCdggCgjckvGEXFbsF3DNoWTHSGfxQ+ NR4AoLlRzQx0rFtOQj229kkikXTFS0hP =YLUn -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Multiple tomcat Instances on Same Server and One Apache Instance
From: vtmc...@hotmail.com To: users@tomcat.apache.org Subject: RE: Multiple tomcat Instances on Same Server and One Apache Instance Date: Mon, 14 May 2012 21:54:31 -0400 Date: Tue, 15 May 2012 01:18:06 +0200 From: a...@ice-sa.com To: users@tomcat.apache.org Subject: Re: Multiple tomcat Instances on Same Server and One Apache Instance Apologies, I probably confused you too. See below. Vickie Troy-McKoy wrote: ... When I call abc*, it goes to instance1; and when I call xyz*, it goes to instance2. However, both instances have apps that start with tsa. How do I configure the apache webserver to service the tsa app for both tomcat instances? configure a load balancer (worker) that uses the (other) two workers, in addition to the two workers, and add it to the worker list. I think that rather than be added to the workers list, the load-balancer worker must be the only one in the list. You then tell the balancer to balance the two other workers. Then the two individual apps won't work, as they're not present on both servers. Oh. I did not read the OP's requirements carefully enough. Apologies, your instructions were correct for the OP. --- Thank you all for your suggestions. I tried configuring a load balancer worker; however, I'm getting HTTP 500 messages--Internal Server Error. I reviewed the reference page; however, apparently, I'm missing something. Also in the mod_jk.log, there's an error stating: Could not find worker with name 'instance2' in uri map post processing. Any ideas? Thank you... On the apache server in httpd.conf, I changed the JKMount statements because I wanted to access all content. Listen 80 . . . LoadModule jk_module modules/mod_jk.so # JkWorkersFile conf/workers.properties JkMount /* instance1 JkMount /* instance2 That is probably not what you want (and the one contradicts the other). You should probably have instead : # forward /abc* requests to Tomcat instance1 only JkMount /abc instance1 JkMount /abc* instance1 # forward /xyz* requests to Tomcat instance2 only JkMount /xyz instance2 JkMount /xyz* instance2 # forward /tsa* requests to either Tomcat, as selected by the balancer worker JkMount /tsa balance1 JkMount /tsa* balance1 Note: if you really want to forward everything to Tomcat, and it doesn't matter which Tomcat, and you want to let the balancer decide when to forward any request to either Tomcat-1 or Tomcat-2, then just use the single line : JkMount /* balance1 In workers.properties, added the load balancer information; it reflects the following: You seem to be missing : workers.list=instance1,instance2,balance1 (as per Pid's earlier instructions, not as per my erroneous comment) worker.balance1.type=lb worker.balance1.balance_workers=instance1, instance2 -- mod_jk may not like the space after comma # worker.instance1.port=8009 worker.instance1.host=server..com worker.instance1.type=ajp13 # worker.instance2.port=7009 worker.instance2.host=server..com worker.instance2.type=ajp13 On the tomcat server (which is the same server), I added the jvmRoute setting in server.xml. For instance one, I added: Engine name=Catalina defaultHost=localhost jvmRoute=instance1 For instance two, I added: Engine name=Catalina defaultHost=localhost jvmRoute=instance2 - Thanks again. I'll try this tomorrow. I just want to forward based on the port that the Tomcat instance is running on. The 2 tomcat instances running on the same server is really the same application--but different versions. And, I thought that I could use the existing Apache instance to forward requests to the new version of the app running on tomcat as well. But, if I want (e.g. the tsademo app) the tomcat instance running on port 8009; and tsademo is being forwarded to both ports--how can I be sure that I would get the tsademo running on port 8009 and not the one running on 7009? I tried using the Virtual host in Apache; but, ran into issues with that. Or, should I just go ahead and create an entirely new apache instance for the new tomcat instance? Regards, Thank you Andre for your help. After I configured it as you specified, the behavior was the same as before I inquired on this forum. To avoid additonal delay, I just went ahead and created another apache2 instance and kept both configurations separate. Thanks again for your suggestions. Regards...
Re: Multiple tomcat Instances on Same Server and One Apache Instance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vickie, (Bringing this back on-list). On 5/15/12 10:21 AM, Vickie Troy-McKoy wrote: Date: Tue, 15 May 2012 10:04:33 -0400 From: ch...@christopherschultz.net Subject: Re: Multiple tomcat Instances on Same Server and One Apache Instance Try to express your requirements in simpler language. For instance, you have two versions of your software: one one port 8009 and one on port 7009. Under what conditions should a particular user be sent to either of those versions? If you are using sessions, the load-balancer will keep a client associated with the right version *after* the first request, but you still need to decide under which circumstances a *new* client should be sent to one or the other. Once you can answer that, we can help you configure it. Chris, I beg to differ. I know EXACTLY what I want. When I explained exactly what I wanted, I was told about the the loadbalancer worker, which I have never used before. However, when I configured it as Andre (so graciously) explained it, I am receiving the same results as my simple workers list configuration. EXACTLY what I wanted to do was explained initially and clarified in my 5/14/12 9:54 PM post. This one? (quoted from here on out) I just want to forward based on the port that the Tomcat instance is running on. Sadly, the client doesn't know the port number of the backend Tomcat. So, how do you propose that httpd make the decision on which backend Tomcat to contact? This is why I said you didn't have your requirements straight. The 2 tomcat instances running on the same server is really the same application--but different versions. And, I thought that I could use the existing Apache instance to forward requests to the new version of the app running on tomcat as well. You can, you just need to express the rules for choosing which backend. I don't see that anywhere in the description of your problem. But, if I want (e.g. the tsademo app) the tomcat instance running on port 8009; and tsademo is being forwarded to both ports--how can I be sure that I would get the tsademo running on port 8009 and not the one running on 7009? There needs to be some external factor. That's what I'm asking you to provide: some way of telling which backend should be chosen. If you don't care, then you can use the lb to randomly-assign new clients to a backend. That seems unlikely to be the desired outcome: you want some clients to go to one version and others to go to the other. But which ones go where? That's the question you haven't answered. I tried using the Virtual host in Apache; but, ran into issues with that. Or, should I just go ahead and create an entirely new apache instance for the new tomcat instance? Maybe I've misunderstood something: do you have httpd listening on two ports (say, 80 and 81) and two backend Tomcats (8009 and 7009) and you want to connect (for example) 80 - 8009 and 81 - 7009? That can easily be done with VirtualHost configuration, but you have to include the port number in the VirtualHost. I would be surprised if that last bit is what you really have because you haven't said anything about multi-port httpd yet. You also didn't post your VirtualHost configuration so I suspect it's not relevant. - -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+yczAACgkQ9CaO5/Lv0PCMogCgl54jfy29XCSD19T/s3DJBgFJ 9pQAoIZNc1P/sG9Vb28Zi1yppVTEKmeg =Q/ZV -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple tomcat Instances on Same Server and One Apache Instance
Vickie Troy-McKoy wrote: ... Thank you Andre for your help. After I configured it as you specified, the behavior was the same as before I inquired on this forum. Well, it doesn't sound as if we really helped a lot then, or am I misunderstanding this too ? :-) Note also for the record (and maybe a later enquiry) that it should not really be necessary to have 2 separate Apache httpd instances. At least if we now understand properly what you are really trying to achieve.. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple tomcat Instances on Same Server and One Apache Instance
On 15/05/2012 16:16, Christopher Schultz wrote: Vickie, (Bringing this back on-list). On 5/15/12 10:21 AM, Vickie Troy-McKoy wrote: Date: Tue, 15 May 2012 10:04:33 -0400 From: ch...@christopherschultz.net Subject: Re: Multiple tomcat Instances on Same Server and One Apache Instance Try to express your requirements in simpler language. For instance, you have two versions of your software: one one port 8009 and one on port 7009. Under what conditions should a particular user be sent to either of those versions? If you are using sessions, the load-balancer will keep a client associated with the right version *after* the first request, but you still need to decide under which circumstances a *new* client should be sent to one or the other. Once you can answer that, we can help you configure it. Chris, I beg to differ. I know EXACTLY what I want. When I explained exactly what I wanted, I was told about the the loadbalancer worker, which I have never used before. However, when I configured it as Andre (so graciously) explained it, I am receiving the same results as my simple workers list configuration. EXACTLY what I wanted to do was explained initially and clarified in my 5/14/12 9:54 PM post. This one? (quoted from here on out) I just want to forward based on the port that the Tomcat instance is running on. Sadly, the client doesn't know the port number of the backend Tomcat. So, how do you propose that httpd make the decision on which backend Tomcat to contact? This is why I said you didn't have your requirements straight. The 2 tomcat instances running on the same server is really the same application--but different versions. And, I thought that I could use the existing Apache instance to forward requests to the new version of the app running on tomcat as well. You can, you just need to express the rules for choosing which backend. I don't see that anywhere in the description of your problem. But, if I want (e.g. the tsademo app) the tomcat instance running on port 8009; and tsademo is being forwarded to both ports--how can I be sure that I would get the tsademo running on port 8009 and not the one running on 7009? There needs to be some external factor. That's what I'm asking you to provide: some way of telling which backend should be chosen. If you don't care, then you can use the lb to randomly-assign new clients to a backend. That seems unlikely to be the desired outcome: you want some clients to go to one version and others to go to the other. But which ones go where? That's the question you haven't answered. Really, the requirement was achievable in a simple way. p I tried using the Virtual host in Apache; but, ran into issues with that. Or, should I just go ahead and create an entirely new apache instance for the new tomcat instance? Maybe I've misunderstood something: do you have httpd listening on two ports (say, 80 and 81) and two backend Tomcats (8009 and 7009) and you want to connect (for example) 80 - 8009 and 81 - 7009? That can easily be done with VirtualHost configuration, but you have to include the port number in the VirtualHost. I would be surprised if that last bit is what you really have because you haven't said anything about multi-port httpd yet. You also didn't post your VirtualHost configuration so I suspect it's not relevant. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Multiple tomcat Instances on Same Server and One Apache Instance
On 15/05/2012 17:22, André Warnier wrote: Vickie Troy-McKoy wrote: ... Thank you Andre for your help. After I configured it as you specified, the behavior was the same as before I inquired on this forum. Well, it doesn't sound as if we really helped a lot then, or am I misunderstanding this too ? :-) Note also for the record (and maybe a later enquiry) that it should not really be necessary to have 2 separate Apache httpd instances. At least if we now understand properly what you are really trying to achieve.. Just wondering. With a 64 bits OS, how much RAM can you handle in a JVM and therefore with each instance of Tomcat? For a 12 Gb of RAM machine, it would be wise if you want to have this kind of setup (Apache and two Tomcat instances in the same machine) if you need more than 400-500 concurrent users? Miguel - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple tomcat Instances on Same Server and One Apache Instance
Pid * wrote: On 13 May 2012, at 20:33, André Warnier a...@ice-sa.com wrote: Pid wrote: On 11/05/2012 18:53, Vickie Troy-McKoy wrote: Hi, I am in need of a little help. I have 2 tomcat instances running on the same machine and one apache instance running on a different machine. I configured jk_mod to access the 1st tomcat instance. Now, I have a second tomcat instance running on the same server as the 1st instance. I would like to access both tomcat instances via the one apache webserver instance. Because some requests are referenced by the same name, there is a conflict. On the tomcat server in server.xml, one instance is running on port 8009 and the 2nd instance (in another directory structure) is running on 7009. On the apache server in httpd.conf, I have the following: Listen 80 . . . LoadModule jk_module modules/mod_jk.so # JkWorkersFile conf/workers.properties JkMount /abc* instance1 JkMount /xyz* instance2 In workers.properties, I have the following: worker.list=instance1, instance2 # worker.instance1.port=8009 worker.instance1.host=server..com worker.instance1.type=ajp13 worker.instance1.lbfactor=1 worker.instance1.socket_keepalive=1 # worker.instance2.port=7009 worker.instance2.host=server..com worker.instance2.type=ajp13 worker.instance2.lbfactor=1 worker.instance2.socket_keepalive=1 When I call abc*, it goes to instance1; and when I call xyz*, it goes to instance2. However, both instances have apps that start with tsa. How do I configure the apache webserver to service the tsa app for both tomcat instances? configure a load balancer (worker) that uses the (other) two workers, in addition to the two workers, and add it to the worker list. I think that rather than be added to the workers list, the load-balancer worker must be the only one in the list. You then tell the balancer to balance the two other workers. Then the two individual apps won't work, as they're not present on both servers. Oh. I did not read the OP's requirements carefully enough. Apologies, your instructions were correct for the OP. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Multiple tomcat Instances on Same Server and One Apache Instance
Date: Mon, 14 May 2012 10:37:07 +0200 From: a...@ice-sa.com To: users@tomcat.apache.org Subject: Re: Multiple tomcat Instances on Same Server and One Apache Instance Pid * wrote: On 13 May 2012, at 20:33, André Warnier a...@ice-sa.com wrote: Pid wrote: On 11/05/2012 18:53, Vickie Troy-McKoy wrote: Hi, I am in need of a little help. I have 2 tomcat instances running on the same machine and one apache instance running on a different machine. I configured jk_mod to access the 1st tomcat instance. Now, I have a second tomcat instance running on the same server as the 1st instance. I would like to access both tomcat instances via the one apache webserver instance. Because some requests are referenced by the same name, there is a conflict. On the tomcat server in server.xml, one instance is running on port 8009 and the 2nd instance (in another directory structure) is running on 7009. On the apache server in httpd.conf, I have the following: Listen 80 . . . LoadModule jk_module modules/mod_jk.so # JkWorkersFile conf/workers.properties JkMount /abc* instance1 JkMount /xyz* instance2 In workers.properties, I have the following: worker.list=instance1, instance2 # worker.instance1.port=8009 worker.instance1.host=server..com worker.instance1.type=ajp13 worker.instance1.lbfactor=1 worker.instance1.socket_keepalive=1 # worker.instance2.port=7009 worker.instance2.host=server..com worker.instance2.type=ajp13 worker.instance2.lbfactor=1 worker.instance2.socket_keepalive=1 When I call abc*, it goes to instance1; and when I call xyz*, it goes to instance2. However, both instances have apps that start with tsa. How do I configure the apache webserver to service the tsa app for both tomcat instances? configure a load balancer (worker) that uses the (other) two workers, in addition to the two workers, and add it to the worker list. I think that rather than be added to the workers list, the load-balancer worker must be the only one in the list. You then tell the balancer to balance the two other workers. Then the two individual apps won't work, as they're not present on both servers. Oh. I did not read the OP's requirements carefully enough. Apologies, your instructions were correct for the OP. --- Thank you all for your suggestions. I tried configuring a load balancer worker; however, I'm getting HTTP 500 messages--Internal Server Error. I reviewed the reference page; however, apparently, I'm missing something. Also in the mod_jk.log, there's an error stating: Could not find worker with name 'instance2' in uri map post processing. Any ideas? Thank you... On the apache server in httpd.conf, I changed the JKMount statements because I wanted to access all content. Listen 80 . . . LoadModule jk_module modules/mod_jk.so # JkWorkersFile conf/workers.properties JkMount /* instance1 JkMount /* instance2 In workers.properties, added the load balancer information; it reflects the following: worker.balance1.type=lb worker.balance1.balance_workers=instance1, instance2 # worker.instance1.port=8009 worker.instance1.host=server..com worker.instance1.type=ajp13 # worker.instance2.port=7009 worker.instance2.host=server..com worker.instance2.type=ajp13 On the tomcat server (which is the same server), I added the jvmRoute setting in server.xml. For instance one, I added: Engine name=Catalina defaultHost=localhost jvmRoute=instance1 For instance two, I added: Engine name=Catalina defaultHost=localhost jvmRoute=instance2
Re: Multiple tomcat Instances on Same Server and One Apache Instance
Apologies, I probably confused you too. See below. Vickie Troy-McKoy wrote: ... When I call abc*, it goes to instance1; and when I call xyz*, it goes to instance2. However, both instances have apps that start with tsa. How do I configure the apache webserver to service the tsa app for both tomcat instances? configure a load balancer (worker) that uses the (other) two workers, in addition to the two workers, and add it to the worker list. I think that rather than be added to the workers list, the load-balancer worker must be the only one in the list. You then tell the balancer to balance the two other workers. Then the two individual apps won't work, as they're not present on both servers. Oh. I did not read the OP's requirements carefully enough. Apologies, your instructions were correct for the OP. --- Thank you all for your suggestions. I tried configuring a load balancer worker; however, I'm getting HTTP 500 messages--Internal Server Error. I reviewed the reference page; however, apparently, I'm missing something. Also in the mod_jk.log, there's an error stating: Could not find worker with name 'instance2' in uri map post processing. Any ideas? Thank you... On the apache server in httpd.conf, I changed the JKMount statements because I wanted to access all content. Listen 80 . . . LoadModule jk_module modules/mod_jk.so # JkWorkersFile conf/workers.properties JkMount /* instance1 JkMount /* instance2 That is probably not what you want (and the one contradicts the other). You should probably have instead : # forward /abc* requests to Tomcat instance1 only JkMount /abc instance1 JkMount /abc* instance1 # forward /xyz* requests to Tomcat instance2 only JkMount /xyz instance2 JkMount /xyz* instance2 # forward /tsa* requests to either Tomcat, as selected by the balancer worker JkMount /tsa balance1 JkMount /tsa* balance1 Note: if you really want to forward everything to Tomcat, and it doesn't matter which Tomcat, and you want to let the balancer decide when to forward any request to either Tomcat-1 or Tomcat-2, then just use the single line : JkMount /* balance1 In workers.properties, added the load balancer information; it reflects the following: You seem to be missing : workers.list=instance1,instance2,balance1 (as per Pid's earlier instructions, not as per my erroneous comment) worker.balance1.type=lb worker.balance1.balance_workers=instance1, instance2 -- mod_jk may not like the space after comma # worker.instance1.port=8009 worker.instance1.host=server..com worker.instance1.type=ajp13 # worker.instance2.port=7009 worker.instance2.host=server..com worker.instance2.type=ajp13 On the tomcat server (which is the same server), I added the jvmRoute setting in server.xml. For instance one, I added: Engine name=Catalina defaultHost=localhost jvmRoute=instance1 For instance two, I added: Engine name=Catalina defaultHost=localhost jvmRoute=instance2 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Multiple tomcat Instances on Same Server and One Apache Instance
Date: Tue, 15 May 2012 01:18:06 +0200 From: a...@ice-sa.com To: users@tomcat.apache.org Subject: Re: Multiple tomcat Instances on Same Server and One Apache Instance Apologies, I probably confused you too. See below. Vickie Troy-McKoy wrote: ... When I call abc*, it goes to instance1; and when I call xyz*, it goes to instance2. However, both instances have apps that start with tsa. How do I configure the apache webserver to service the tsa app for both tomcat instances? configure a load balancer (worker) that uses the (other) two workers, in addition to the two workers, and add it to the worker list. I think that rather than be added to the workers list, the load-balancer worker must be the only one in the list. You then tell the balancer to balance the two other workers. Then the two individual apps won't work, as they're not present on both servers. Oh. I did not read the OP's requirements carefully enough. Apologies, your instructions were correct for the OP. --- Thank you all for your suggestions. I tried configuring a load balancer worker; however, I'm getting HTTP 500 messages--Internal Server Error. I reviewed the reference page; however, apparently, I'm missing something. Also in the mod_jk.log, there's an error stating: Could not find worker with name 'instance2' in uri map post processing. Any ideas? Thank you... On the apache server in httpd.conf, I changed the JKMount statements because I wanted to access all content. Listen 80 . . . LoadModule jk_module modules/mod_jk.so # JkWorkersFile conf/workers.properties JkMount /* instance1 JkMount /* instance2 That is probably not what you want (and the one contradicts the other). You should probably have instead : # forward /abc* requests to Tomcat instance1 only JkMount /abc instance1 JkMount /abc* instance1 # forward /xyz* requests to Tomcat instance2 only JkMount /xyz instance2 JkMount /xyz* instance2 # forward /tsa* requests to either Tomcat, as selected by the balancer worker JkMount /tsa balance1 JkMount /tsa* balance1 Note: if you really want to forward everything to Tomcat, and it doesn't matter which Tomcat, and you want to let the balancer decide when to forward any request to either Tomcat-1 or Tomcat-2, then just use the single line : JkMount /* balance1 In workers.properties, added the load balancer information; it reflects the following: You seem to be missing : workers.list=instance1,instance2,balance1 (as per Pid's earlier instructions, not as per my erroneous comment) worker.balance1.type=lb worker.balance1.balance_workers=instance1, instance2 -- mod_jk may not like the space after comma # worker.instance1.port=8009 worker.instance1.host=server..com worker.instance1.type=ajp13 # worker.instance2.port=7009 worker.instance2.host=server..com worker.instance2.type=ajp13 On the tomcat server (which is the same server), I added the jvmRoute setting in server.xml. For instance one, I added: Engine name=Catalina defaultHost=localhost jvmRoute=instance1 For instance two, I added: Engine name=Catalina defaultHost=localhost jvmRoute=instance2 - Thanks again. I'll try this tomorrow. I just want to forward based on the port that the Tomcat instance is running on. The 2 tomcat instances running on the same server is really the same application--but different versions. And, I thought that I could use the existing Apache instance to forward requests to the new version of the app running on tomcat as well. But, if I want (e.g. the tsademo app) the tomcat instance running on port 8009; and tsademo is being forwarded to both ports--how can I be sure that I would get the tsademo running on port 8009 and not the one running on 7009? I tried using the Virtual host in Apache; but, ran into issues with that. Or, should I just go ahead and create an entirely new apache instance for the new tomcat instance? Regards,
Re: Multiple tomcat Instances on Same Server and One Apache Instance
On 11/05/2012 18:53, Vickie Troy-McKoy wrote: Hi, I am in need of a little help. I have 2 tomcat instances running on the same machine and one apache instance running on a different machine. I configured jk_mod to access the 1st tomcat instance. Now, I have a second tomcat instance running on the same server as the 1st instance. I would like to access both tomcat instances via the one apache webserver instance. Because some requests are referenced by the same name, there is a conflict. On the tomcat server in server.xml, one instance is running on port 8009 and the 2nd instance (in another directory structure) is running on 7009. On the apache server in httpd.conf, I have the following: Listen 80 . . . LoadModule jk_module modules/mod_jk.so # JkWorkersFile conf/workers.properties JkMount /abc* instance1 JkMount /xyz* instance2 In workers.properties, I have the following: worker.list=instance1, instance2 # worker.instance1.port=8009 worker.instance1.host=server..com worker.instance1.type=ajp13 worker.instance1.lbfactor=1 worker.instance1.socket_keepalive=1 # worker.instance2.port=7009 worker.instance2.host=server..com worker.instance2.type=ajp13 worker.instance2.lbfactor=1 worker.instance2.socket_keepalive=1 When I call abc*, it goes to instance1; and when I call xyz*, it goes to instance2. However, both instances have apps that start with tsa. How do I configure the apache webserver to service the tsa app for both tomcat instances? configure a load balancer that uses the two workers, in addition to the two workers, and add it to the worker list. http://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html p Thank you... ___ Regards, -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Multiple tomcat Instances on Same Server and One Apache Instance
Pid wrote: On 11/05/2012 18:53, Vickie Troy-McKoy wrote: Hi, I am in need of a little help. I have 2 tomcat instances running on the same machine and one apache instance running on a different machine. I configured jk_mod to access the 1st tomcat instance. Now, I have a second tomcat instance running on the same server as the 1st instance. I would like to access both tomcat instances via the one apache webserver instance. Because some requests are referenced by the same name, there is a conflict. On the tomcat server in server.xml, one instance is running on port 8009 and the 2nd instance (in another directory structure) is running on 7009. On the apache server in httpd.conf, I have the following: Listen 80 . . . LoadModule jk_module modules/mod_jk.so # JkWorkersFile conf/workers.properties JkMount /abc* instance1 JkMount /xyz* instance2 In workers.properties, I have the following: worker.list=instance1, instance2 # worker.instance1.port=8009 worker.instance1.host=server..com worker.instance1.type=ajp13 worker.instance1.lbfactor=1 worker.instance1.socket_keepalive=1 # worker.instance2.port=7009 worker.instance2.host=server..com worker.instance2.type=ajp13 worker.instance2.lbfactor=1 worker.instance2.socket_keepalive=1 When I call abc*, it goes to instance1; and when I call xyz*, it goes to instance2. However, both instances have apps that start with tsa. How do I configure the apache webserver to service the tsa app for both tomcat instances? configure a load balancer (worker) that uses the (other) two workers, in addition to the two workers, and add it to the worker list. I think that rather than be added to the workers list, the load-balancer worker must be the only one in the list. You then tell the balancer to balance the two other workers. http://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html p Thank you... ___ Regards, - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple tomcat Instances on Same Server and One Apache Instance
On 13 May 2012, at 20:33, André Warnier a...@ice-sa.com wrote: Pid wrote: On 11/05/2012 18:53, Vickie Troy-McKoy wrote: Hi, I am in need of a little help. I have 2 tomcat instances running on the same machine and one apache instance running on a different machine. I configured jk_mod to access the 1st tomcat instance. Now, I have a second tomcat instance running on the same server as the 1st instance. I would like to access both tomcat instances via the one apache webserver instance. Because some requests are referenced by the same name, there is a conflict. On the tomcat server in server.xml, one instance is running on port 8009 and the 2nd instance (in another directory structure) is running on 7009. On the apache server in httpd.conf, I have the following: Listen 80 . . . LoadModule jk_module modules/mod_jk.so # JkWorkersFile conf/workers.properties JkMount /abc* instance1 JkMount /xyz* instance2 In workers.properties, I have the following: worker.list=instance1, instance2 # worker.instance1.port=8009 worker.instance1.host=server..com worker.instance1.type=ajp13 worker.instance1.lbfactor=1 worker.instance1.socket_keepalive=1 # worker.instance2.port=7009 worker.instance2.host=server..com worker.instance2.type=ajp13 worker.instance2.lbfactor=1 worker.instance2.socket_keepalive=1 When I call abc*, it goes to instance1; and when I call xyz*, it goes to instance2. However, both instances have apps that start with tsa. How do I configure the apache webserver to service the tsa app for both tomcat instances? configure a load balancer (worker) that uses the (other) two workers, in addition to the two workers, and add it to the worker list. I think that rather than be added to the workers list, the load-balancer worker must be the only one in the list. You then tell the balancer to balance the two other workers. Then the two individual apps won't work, as they're not present on both servers. p http://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html p Thank you... ___ Regards, - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org