Re: Multiple instances of Tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Arghya, On 4/27/16 12:37 AM, Arghya Das wrote: > I am using JSP as the language and Tomcat 7 as the Server to deploy > Web applications and Using ECLIPSE as the IDE to build the apps on > Windows 7 platform.. > > I have installed Tomcat as a service in Windows and also linked the > Tomcat server with Eclipse. but the tomcat is behaving in two > different ways. when i try to run the webapp by starting tomcat > through Eclipse it behaves like a standalone instance. and when i > try to start it through windows service it behaves like a different > instance. > > Like when i am trying to place a database config, file in Tomcat > directory and call it in a servlet file by using "catalina.base" > running Tomcat through Eclipse the changes don't take effect. > > while when i manually build the war file and upload and run Tomcat > as a windows service it works fine. When Eclipse deploys a web application onto Tomcat, it (I believe) always uses a split-configuration, with a separate catalina.home and catalina.base. So the catalina.base being used by Eclipse may not be the one that you expect. Try dumping the value of the "catalina.base" system property from one of your JSPs, and compare the values you get from the Eclipse-launched webapp and the Windows-Service-launched webapp. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlcg3I0ACgkQ9CaO5/Lv0PBDXwCfVQI+iQsDp9T+EEUskM9YFl6Q vUwAninfh09KKK0o0nZTnoMpvs9LG6D2 =X/z1 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Multiple instances of Tomcat
Hi all, I am using JSP as the language and Tomcat 7 as the Server to deploy Web applications and Using ECLIPSE as the IDE to build the apps on Windows 7 platform.. I have installed Tomcat as a service in Windows and also linked the Tomcat server with Eclipse. but the tomcat is behaving in two different ways. when i try to run the webapp by starting tomcat through Eclipse it behaves like a standalone instance. and when i try to start it through windows service it behaves like a different instance. Like when i am trying to place a database config, file in Tomcat directory and call it in a servlet file by using "catalina.base" running Tomcat through Eclipse the changes don't take effect. while when i manually build the war file and upload and run Tomcat as a windows service it works fine. Please help. regards, Arghya
Re: Multiple instances?
On 26/01/2015 16:13, Billy Bones wrote: Hi Markt, my wiki alias username is ArKam and my Real username is GaelTherond, thank you very much. You should have access now. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple instances?
Hi guys, thank for your informations regarding the Wiki, I've finally managed to create my account ^^ (later is better than never as we said over there :D) and as expected to add a new entry on the FAQ/HowTo I need to be whitelisted or granted to edit mode, so if a moderator could add me it would be nice. PS: I've found something bizarre on the systemd init process regarding Tomcat, if I set the CONNECTOR_PORT variable to something (let said 8081) on the /etc/sysconfig/tomcat-${SERVICE_NAME} it is not use but rather overrided by the tomcat server.xml file. Until now, nothing strange, the weird part is that if I disable the HTTP-BIO or AJP-BIO connectors values on this file tomcat load the unit without binding any network port at all. Shouldn't it be suppose tu use the one specified by the CONNECTOR_PORT variable or did I missed something? 2014-12-23 20:47 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 12/19/14 1:37 PM, Billy Bones wrote: For sure, do I need an account or something special? You can sign-up yourself. Could you send me the wiki link? http://wiki.apache.org/tomcat/ Choose login at the top of the page and then choose the you can create one now at the bottom of the page login page. Once you have an account, I think you'll need to be white-listed to actually make modifications. Just email a moderator or the whole list to request write access to the Wiki. - -chris 2014-12-19 17:05 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : Billy, On 12/19/14 4:46 AM, Billy Bones wrote: hum OK many thanks for your hints, I got it, I understand what is going on now. Ok, I now have a clean and multiple instances running !! Thanks to everyone! @Mark Eggers: CentOS systemd units are not quite so far from the Fedora ones. Personally I do love the way fedora and CentOS are working but I have to confess that sometimes, and especially with tomcat everything is a pain in the ass as they scatter the components everywhere in the system without any (apparent) logics. WTH with all this /usr/share/blabla ?? @Christopher: Many thanks for your advices, obviously it make more sens to keep the catalina_base and derivate the catalina_home. I love this method!! Once again, many thanks to everyone, I now have a clean and working server! Great. Care to post your systemd script template to the wiki? It will likely help others trying to do the same thing. -chris 2014-12-18 19:46 GMT+01:00 Mark Eggers its_toas...@yahoo.com.invalid: On 12/18/2014 10:07 AM, Christopher Schultz wrote: Billy, On 12/18/14 9:25 AM, Billy Bones wrote: Ok s, here is a small update. I've finally found what does this SERVICE_NAME mean, indeed you have to copy the original unit, then add the Systemd's directive named Environment like this: Environment=SERVICE_NAME=YOUROWNSERVICENAMEHERE then you will copy the default tomcat config file found on the /etc/sysconfig directory. And as you supposed it Cristophe and Daniel, you then have to copy the whole CATALINA_{HOME/BASE} or update the previous config file to point out to another tomcat installation. You should not have to copy the whole CATALINA_HOME. Instead, create a CATALINA_BASE (which is basically just a few directories and a few configuration files) for each service and then set the CATALINA_BASE environment variable to point to each one for each service, set CATALINA_HOME to point to where the full installation of Tomcat is (with no web applications installed in it), and each service should operate independently. So you should be able to have something like this: SERVICE_NAME=tomcat-one CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-one SERVICE_NAME=tomcat-two CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-two Then you configure /opt/tomcat/tomcat-(one|two) to have the configuration and applications you want. You should be able to start tomcat-one and tomcat-two independently of each other. I don't know exactly what systemd does with all of this, but once you end up calling catalina.sh with the right environment variables set, Tomcat will do the right thing. -chris Fedora 21 has a relatively nice systemd script for Tomcat. It's designed for running multiple Tomcat instances. If you have a copy of Fedora 21 and yumdownloader (by installing yum-utils), you can take a look at the system with: mkdir Temp cd Temp yumdownloader tomcat.noarch rpm2cpio tomcat-7.0.54-3.fc21.noarch.rpm | cpio -idmv All of the files are then accessible in the Temp directory. I've never liked how Fedora / RedHat / CentOS scatter the components all over the landscape. I'm thinking of adapting the Fedora systemd scripts to work with Tomcats installed under
Re: Multiple instances?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 1/26/15 8:57 AM, Billy Bones wrote: PS: I've found something bizarre on the systemd init process regarding Tomcat, if I set the CONNECTOR_PORT variable to something (let said 8081) on the /etc/sysconfig/tomcat-${SERVICE_NAME} it is not use but rather overrided by the tomcat server.xml file. That's not surprising, since Tomcat uses the contents of server.xml to configure the connectors, and does not look at any environment variables for anything. Where is CONNECTOR_PORT documented? I suspect it's something supported by the systemd scripts simply to differentiate between various Tomcat servers but doesn't have any bearing on the actual runtime configuration. Remember that Tomcat can bind to an arbitrary number of ports, so having a single CONNECTOR_PORT doesn't really make much sense. Until now, nothing strange, the weird part is that if I disable the HTTP-BIO or AJP-BIO connectors values on this file tomcat load the unit without binding any network port at all. That's expected behavior: it's possible that Tomcat is coming up with no Connectors configured, and that some other software component will then configure the connectors after the server is running. Think of an embedded use-case and it becomes easier to understand how this would not be an error. Shouldn't it be [using] the one specified by the CONNECTOR_PORT variable or did I missed something? No, Tomcat doesn't use environment variables for anything. The launch scripts use a handful of environment variables to set up various system properties when launching the JVM, and Tomcat uses those if necessary. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUxlopAAoJEBzwKT+lPKRYwcUP/0UYgfDJ8XaETTjPkvvN8j08 mqLeXkP+Mr84MCGtBMTytF9XYi1XXE5FdHdXhtWOScoe+IdYtuM42E4/YubJm7g3 V99mVbaiw9O5tFm9lDFYUaNhG3r0jLYmbMNGWxNAoWiCL18RKcVQ6tgu74DpBzgH XmWaRSB20xAp3iCYP25dRQpwVTmwrCTHeYLOmbeHKqQGRTeA37dQSuisz1SYptgp iQs/CXlkumHDRRGmXiihcbUQiMmULmmAZUGyjl3jex9eHfQcDXIZ34edBgh5fMwW w6FMUfUTmqVAeZbceCZdoBDtifNkFUbCr0f3eMNGV4oSHrA7fJv/xxi9kUoLpiuG 5/9j1wK3eOsBKPCVEJkuQ79zQXgI9bOW4/c5mAp3Coq6z8Me8AbYYAuiLhPjaCec oBtHc13Lr8HqZW/kdJCNgwN1Y4YDxwYwaNODh966M6ZF3Gsk8aZ6a8P2YI7u5jaW ixMxft7lSpNrQWdwHy4DDlPtuwGk3n8ERaxk8d37YOGRxSjk9jS+9Bgdz/Dxznkd NQ0IRqwZ9LIuFt/VjYdPPRJDmOm9oIclEDq97aKp2cP3kz7s+JkUBZyLKefynW2Y A24ha+4d5Mi8RCj6TTkdFm7mB9WpUQhuSFEw79NpsToz5jv0D43ZsiFdehdukOwc fY8+Fsy+LWIwpbIdpM/N =9SDP -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple instances?
Hi Markt, my wiki alias username is ArKam and my Real username is GaelTherond, thank you very much. @Chris: Ok, thanks a lot for your explanations, it's crystal clear to me now, as you said, it should be something specific to systemd as it reside under the /etc/sysconfig/tomcat file which is use to set some variables to start the JVM. I'm working on a RHEL 7 right now instead of the CentOS from my first mail as I'm cooking a new PROD server, the two distro use exactly the same configs. 2015-01-26 16:15 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 1/26/15 8:57 AM, Billy Bones wrote: PS: I've found something bizarre on the systemd init process regarding Tomcat, if I set the CONNECTOR_PORT variable to something (let said 8081) on the /etc/sysconfig/tomcat-${SERVICE_NAME} it is not use but rather overrided by the tomcat server.xml file. That's not surprising, since Tomcat uses the contents of server.xml to configure the connectors, and does not look at any environment variables for anything. Where is CONNECTOR_PORT documented? I suspect it's something supported by the systemd scripts simply to differentiate between various Tomcat servers but doesn't have any bearing on the actual runtime configuration. Remember that Tomcat can bind to an arbitrary number of ports, so having a single CONNECTOR_PORT doesn't really make much sense. Until now, nothing strange, the weird part is that if I disable the HTTP-BIO or AJP-BIO connectors values on this file tomcat load the unit without binding any network port at all. That's expected behavior: it's possible that Tomcat is coming up with no Connectors configured, and that some other software component will then configure the connectors after the server is running. Think of an embedded use-case and it becomes easier to understand how this would not be an error. Shouldn't it be [using] the one specified by the CONNECTOR_PORT variable or did I missed something? No, Tomcat doesn't use environment variables for anything. The launch scripts use a handful of environment variables to set up various system properties when launching the JVM, and Tomcat uses those if necessary. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUxlopAAoJEBzwKT+lPKRYwcUP/0UYgfDJ8XaETTjPkvvN8j08 mqLeXkP+Mr84MCGtBMTytF9XYi1XXE5FdHdXhtWOScoe+IdYtuM42E4/YubJm7g3 V99mVbaiw9O5tFm9lDFYUaNhG3r0jLYmbMNGWxNAoWiCL18RKcVQ6tgu74DpBzgH XmWaRSB20xAp3iCYP25dRQpwVTmwrCTHeYLOmbeHKqQGRTeA37dQSuisz1SYptgp iQs/CXlkumHDRRGmXiihcbUQiMmULmmAZUGyjl3jex9eHfQcDXIZ34edBgh5fMwW w6FMUfUTmqVAeZbceCZdoBDtifNkFUbCr0f3eMNGV4oSHrA7fJv/xxi9kUoLpiuG 5/9j1wK3eOsBKPCVEJkuQ79zQXgI9bOW4/c5mAp3Coq6z8Me8AbYYAuiLhPjaCec oBtHc13Lr8HqZW/kdJCNgwN1Y4YDxwYwaNODh966M6ZF3Gsk8aZ6a8P2YI7u5jaW ixMxft7lSpNrQWdwHy4DDlPtuwGk3n8ERaxk8d37YOGRxSjk9jS+9Bgdz/Dxznkd NQ0IRqwZ9LIuFt/VjYdPPRJDmOm9oIclEDq97aKp2cP3kz7s+JkUBZyLKefynW2Y A24ha+4d5Mi8RCj6TTkdFm7mB9WpUQhuSFEw79NpsToz5jv0D43ZsiFdehdukOwc fY8+Fsy+LWIwpbIdpM/N =9SDP -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple instances?
On 26/01/2015 13:57, Billy Bones wrote: Hi guys, thank for your informations regarding the Wiki, I've finally managed to create my account ^^ (later is better than never as we said over there :D) and as expected to add a new entry on the FAQ/HowTo I need to be whitelisted or granted to edit mode, so if a moderator could add me it would be nice. And your wiki user name is ... ? Mark PS: I've found something bizarre on the systemd init process regarding Tomcat, if I set the CONNECTOR_PORT variable to something (let said 8081) on the /etc/sysconfig/tomcat-${SERVICE_NAME} it is not use but rather overrided by the tomcat server.xml file. Until now, nothing strange, the weird part is that if I disable the HTTP-BIO or AJP-BIO connectors values on this file tomcat load the unit without binding any network port at all. Shouldn't it be suppose tu use the one specified by the CONNECTOR_PORT variable or did I missed something? 2014-12-23 20:47 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : Billy, On 12/19/14 1:37 PM, Billy Bones wrote: For sure, do I need an account or something special? You can sign-up yourself. Could you send me the wiki link? http://wiki.apache.org/tomcat/ Choose login at the top of the page and then choose the you can create one now at the bottom of the page login page. Once you have an account, I think you'll need to be white-listed to actually make modifications. Just email a moderator or the whole list to request write access to the Wiki. -chris 2014-12-19 17:05 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : Billy, On 12/19/14 4:46 AM, Billy Bones wrote: hum OK many thanks for your hints, I got it, I understand what is going on now. Ok, I now have a clean and multiple instances running !! Thanks to everyone! @Mark Eggers: CentOS systemd units are not quite so far from the Fedora ones. Personally I do love the way fedora and CentOS are working but I have to confess that sometimes, and especially with tomcat everything is a pain in the ass as they scatter the components everywhere in the system without any (apparent) logics. WTH with all this /usr/share/blabla ?? @Christopher: Many thanks for your advices, obviously it make more sens to keep the catalina_base and derivate the catalina_home. I love this method!! Once again, many thanks to everyone, I now have a clean and working server! Great. Care to post your systemd script template to the wiki? It will likely help others trying to do the same thing. -chris 2014-12-18 19:46 GMT+01:00 Mark Eggers its_toas...@yahoo.com.invalid: On 12/18/2014 10:07 AM, Christopher Schultz wrote: Billy, On 12/18/14 9:25 AM, Billy Bones wrote: Ok s, here is a small update. I've finally found what does this SERVICE_NAME mean, indeed you have to copy the original unit, then add the Systemd's directive named Environment like this: Environment=SERVICE_NAME=YOUROWNSERVICENAMEHERE then you will copy the default tomcat config file found on the /etc/sysconfig directory. And as you supposed it Cristophe and Daniel, you then have to copy the whole CATALINA_{HOME/BASE} or update the previous config file to point out to another tomcat installation. You should not have to copy the whole CATALINA_HOME. Instead, create a CATALINA_BASE (which is basically just a few directories and a few configuration files) for each service and then set the CATALINA_BASE environment variable to point to each one for each service, set CATALINA_HOME to point to where the full installation of Tomcat is (with no web applications installed in it), and each service should operate independently. So you should be able to have something like this: SERVICE_NAME=tomcat-one CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-one SERVICE_NAME=tomcat-two CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-two Then you configure /opt/tomcat/tomcat-(one|two) to have the configuration and applications you want. You should be able to start tomcat-one and tomcat-two independently of each other. I don't know exactly what systemd does with all of this, but once you end up calling catalina.sh with the right environment variables set, Tomcat will do the right thing. -chris Fedora 21 has a relatively nice systemd script for Tomcat. It's designed for running multiple Tomcat instances. If you have a copy of Fedora 21 and yumdownloader (by installing yum-utils), you can take a look at the system with: mkdir Temp cd Temp yumdownloader tomcat.noarch rpm2cpio tomcat-7.0.54-3.fc21.noarch.rpm | cpio -idmv All of the files are then accessible in the Temp directory. I've never liked how Fedora / RedHat / CentOS scatter the components all over the landscape. I'm thinking of adapting the Fedora systemd scripts to work with Tomcats installed under a particular user. The only issue seems
Re: Multiple instances?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 12/19/14 1:37 PM, Billy Bones wrote: For sure, do I need an account or something special? You can sign-up yourself. Could you send me the wiki link? http://wiki.apache.org/tomcat/ Choose login at the top of the page and then choose the you can create one now at the bottom of the page login page. Once you have an account, I think you'll need to be white-listed to actually make modifications. Just email a moderator or the whole list to request write access to the Wiki. - -chris 2014-12-19 17:05 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : Billy, On 12/19/14 4:46 AM, Billy Bones wrote: hum OK many thanks for your hints, I got it, I understand what is going on now. Ok, I now have a clean and multiple instances running !! Thanks to everyone! @Mark Eggers: CentOS systemd units are not quite so far from the Fedora ones. Personally I do love the way fedora and CentOS are working but I have to confess that sometimes, and especially with tomcat everything is a pain in the ass as they scatter the components everywhere in the system without any (apparent) logics. WTH with all this /usr/share/blabla ?? @Christopher: Many thanks for your advices, obviously it make more sens to keep the catalina_base and derivate the catalina_home. I love this method!! Once again, many thanks to everyone, I now have a clean and working server! Great. Care to post your systemd script template to the wiki? It will likely help others trying to do the same thing. -chris 2014-12-18 19:46 GMT+01:00 Mark Eggers its_toas...@yahoo.com.invalid: On 12/18/2014 10:07 AM, Christopher Schultz wrote: Billy, On 12/18/14 9:25 AM, Billy Bones wrote: Ok s, here is a small update. I've finally found what does this SERVICE_NAME mean, indeed you have to copy the original unit, then add the Systemd's directive named Environment like this: Environment=SERVICE_NAME=YOUROWNSERVICENAMEHERE then you will copy the default tomcat config file found on the /etc/sysconfig directory. And as you supposed it Cristophe and Daniel, you then have to copy the whole CATALINA_{HOME/BASE} or update the previous config file to point out to another tomcat installation. You should not have to copy the whole CATALINA_HOME. Instead, create a CATALINA_BASE (which is basically just a few directories and a few configuration files) for each service and then set the CATALINA_BASE environment variable to point to each one for each service, set CATALINA_HOME to point to where the full installation of Tomcat is (with no web applications installed in it), and each service should operate independently. So you should be able to have something like this: SERVICE_NAME=tomcat-one CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-one SERVICE_NAME=tomcat-two CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-two Then you configure /opt/tomcat/tomcat-(one|two) to have the configuration and applications you want. You should be able to start tomcat-one and tomcat-two independently of each other. I don't know exactly what systemd does with all of this, but once you end up calling catalina.sh with the right environment variables set, Tomcat will do the right thing. -chris Fedora 21 has a relatively nice systemd script for Tomcat. It's designed for running multiple Tomcat instances. If you have a copy of Fedora 21 and yumdownloader (by installing yum-utils), you can take a look at the system with: mkdir Temp cd Temp yumdownloader tomcat.noarch rpm2cpio tomcat-7.0.54-3.fc21.noarch.rpm | cpio -idmv All of the files are then accessible in the Temp directory. I've never liked how Fedora / RedHat / CentOS scatter the components all over the landscape. I'm thinking of adapting the Fedora systemd scripts to work with Tomcats installed under a particular user. The only issue seems to be that the SHUTDOWN_WAIT (time to wait in seconds before killing the process) is documented not to work. Sadly, I have some truly misbehaving applications that sometime need a kill -9 on the underlying Tomcat. Those misbehaving applications are unlikely to be fixed. My init scripts take care of this by issuing an orderly shutdown command, waiting up to SHUTDOWN_WAIT seconds (checking every second), then issuing a kill -9 if the process still exists. . . . better late than never (mostly) /mde/ --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com - 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
Re: Multiple instances?
hum OK many thanks for your hints, I got it, I understand what is going on now. Ok, I now have a clean and multiple instances running !! Thanks to everyone! @Mark Eggers: CentOS systemd units are not quite so far from the Fedora ones. Personally I do love the way fedora and CentOS are working but I have to confess that sometimes, and especially with tomcat everything is a pain in the ass as they scatter the components everywhere in the system without any (apparent) logics. WTH with all this /usr/share/blabla ?? @Christopher: Many thanks for your advices, obviously it make more sens to keep the catalina_base and derivate the catalina_home. I love this method!! Once again, many thanks to everyone, I now have a clean and working server! 2014-12-18 19:46 GMT+01:00 Mark Eggers its_toas...@yahoo.com.invalid: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/18/2014 10:07 AM, Christopher Schultz wrote: Billy, On 12/18/14 9:25 AM, Billy Bones wrote: Ok s, here is a small update. I've finally found what does this SERVICE_NAME mean, indeed you have to copy the original unit, then add the Systemd's directive named Environment like this: Environment=SERVICE_NAME=YOUROWNSERVICENAMEHERE then you will copy the default tomcat config file found on the /etc/sysconfig directory. And as you supposed it Cristophe and Daniel, you then have to copy the whole CATALINA_{HOME/BASE} or update the previous config file to point out to another tomcat installation. You should not have to copy the whole CATALINA_HOME. Instead, create a CATALINA_BASE (which is basically just a few directories and a few configuration files) for each service and then set the CATALINA_BASE environment variable to point to each one for each service, set CATALINA_HOME to point to where the full installation of Tomcat is (with no web applications installed in it), and each service should operate independently. So you should be able to have something like this: SERVICE_NAME=tomcat-one CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-one SERVICE_NAME=tomcat-two CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-two Then you configure /opt/tomcat/tomcat-(one|two) to have the configuration and applications you want. You should be able to start tomcat-one and tomcat-two independently of each other. I don't know exactly what systemd does with all of this, but once you end up calling catalina.sh with the right environment variables set, Tomcat will do the right thing. -chris Fedora 21 has a relatively nice systemd script for Tomcat. It's designed for running multiple Tomcat instances. If you have a copy of Fedora 21 and yumdownloader (by installing yum-utils), you can take a look at the system with: mkdir Temp cd Temp yumdownloader tomcat.noarch rpm2cpio tomcat-7.0.54-3.fc21.noarch.rpm | cpio -idmv All of the files are then accessible in the Temp directory. I've never liked how Fedora / RedHat / CentOS scatter the components all over the landscape. I'm thinking of adapting the Fedora systemd scripts to work with Tomcats installed under a particular user. The only issue seems to be that the SHUTDOWN_WAIT (time to wait in seconds before killing the process) is documented not to work. Sadly, I have some truly misbehaving applications that sometime need a kill -9 on the underlying Tomcat. Those misbehaving applications are unlikely to be fixed. My init scripts take care of this by issuing an orderly shutdown command, waiting up to SHUTDOWN_WAIT seconds (checking every second), then issuing a kill -9 if the process still exists. . . . better late than never (mostly) /mde/ -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQEcBAEBAgAGBQJUkyEAAAoJEEFGbsYNeTwtxbEH/jsc5+ywzGWZneOU5eRDt6I6 k5DWaP0S7OeAEU4FIGN5IK2zGE5ioYITxxQQ+QtWn61QkqkOR4mb6fMe7wNERiP7 0hX4fs1SXA13H3MdeO1PXRGi0T9f0bnqPmSstpCLHVy7kavy/ywgammOir87moje bw58Ga62iM/QhZIAcMksi2V255j+GdKOAgMG0Q9TKapMeDY1t3ywi/HJziTw8NAW du/3eniAjM6SGi74GsYTkY44hM4yB7uXko3RDeU+A0I20gz9umWkRf5u39PiRUPL RYMP8JAorjI8p4jt9ZnCPAwTrwrnvHLMnTFYYG10xQAkV9j22xgc0Hf49IMOq0k= =1cES -END PGP SIGNATURE- --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple instances?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 12/19/14 4:46 AM, Billy Bones wrote: hum OK many thanks for your hints, I got it, I understand what is going on now. Ok, I now have a clean and multiple instances running !! Thanks to everyone! @Mark Eggers: CentOS systemd units are not quite so far from the Fedora ones. Personally I do love the way fedora and CentOS are working but I have to confess that sometimes, and especially with tomcat everything is a pain in the ass as they scatter the components everywhere in the system without any (apparent) logics. WTH with all this /usr/share/blabla ?? @Christopher: Many thanks for your advices, obviously it make more sens to keep the catalina_base and derivate the catalina_home. I love this method!! Once again, many thanks to everyone, I now have a clean and working server! Great. Care to post your systemd script template to the wiki? It will likely help others trying to do the same thing. - -chris 2014-12-18 19:46 GMT+01:00 Mark Eggers its_toas...@yahoo.com.invalid: On 12/18/2014 10:07 AM, Christopher Schultz wrote: Billy, On 12/18/14 9:25 AM, Billy Bones wrote: Ok s, here is a small update. I've finally found what does this SERVICE_NAME mean, indeed you have to copy the original unit, then add the Systemd's directive named Environment like this: Environment=SERVICE_NAME=YOUROWNSERVICENAMEHERE then you will copy the default tomcat config file found on the /etc/sysconfig directory. And as you supposed it Cristophe and Daniel, you then have to copy the whole CATALINA_{HOME/BASE} or update the previous config file to point out to another tomcat installation. You should not have to copy the whole CATALINA_HOME. Instead, create a CATALINA_BASE (which is basically just a few directories and a few configuration files) for each service and then set the CATALINA_BASE environment variable to point to each one for each service, set CATALINA_HOME to point to where the full installation of Tomcat is (with no web applications installed in it), and each service should operate independently. So you should be able to have something like this: SERVICE_NAME=tomcat-one CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-one SERVICE_NAME=tomcat-two CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-two Then you configure /opt/tomcat/tomcat-(one|two) to have the configuration and applications you want. You should be able to start tomcat-one and tomcat-two independently of each other. I don't know exactly what systemd does with all of this, but once you end up calling catalina.sh with the right environment variables set, Tomcat will do the right thing. -chris Fedora 21 has a relatively nice systemd script for Tomcat. It's designed for running multiple Tomcat instances. If you have a copy of Fedora 21 and yumdownloader (by installing yum-utils), you can take a look at the system with: mkdir Temp cd Temp yumdownloader tomcat.noarch rpm2cpio tomcat-7.0.54-3.fc21.noarch.rpm | cpio -idmv All of the files are then accessible in the Temp directory. I've never liked how Fedora / RedHat / CentOS scatter the components all over the landscape. I'm thinking of adapting the Fedora systemd scripts to work with Tomcats installed under a particular user. The only issue seems to be that the SHUTDOWN_WAIT (time to wait in seconds before killing the process) is documented not to work. Sadly, I have some truly misbehaving applications that sometime need a kill -9 on the underlying Tomcat. Those misbehaving applications are unlikely to be fixed. My init scripts take care of this by issuing an orderly shutdown command, waiting up to SHUTDOWN_WAIT seconds (checking every second), then issuing a kill -9 if the process still exists. . . . better late than never (mostly) /mde/ --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUlEzdAAoJEBzwKT+lPKRYDcUP/j4pL9nN2SJp6A16T6f8HhEC uXRd+10RRZOtiwen0+h/M6h/YKhvWarCnVeGiBEWz82LvvfKTxMnGzNdHSMHBi2a nLdCWWEPYDCHWxwX+VpjyMwvanyK0Dl2zjeEfu0XGz4kf8Q0y+hPbMCa0bUUjHIQ B+3UcPvss2YmaZUAb+FKodFVUJNSLBKYCNTtRJL/+LO6TlriQIIa18kNujNk3ric W/cQAdreCd3HOjpopa/U0Bsxvplt+DLU2JAU+ooquupzIRR7+9/Z6JlyKX8Q+5du o9pjiDAYneRr1NWMVGFjAyxIqK2HNS1ARKn/0onsft8RRLXEGJrDSQCdSM4AMSPj 5e7pRNlYUMqkAYCIKRV66GBuWBO9eGIeHTh1BsKYhlnlwTLANghwAD1XlFgo/hVF d63WALimBV2VZwt0eNwuYN7OjrLVNAv5LeVM4je+6fEvqmMyGAizhz+g1jxLhJjt MIDnafQ75YJ4gCXnMP1gPsp+pvK6/OxGH76/T4k2BcbwiDwpWVMrZC4NbI6UQHV8 i6PpZLU2P0HmsC6aIZyVIJYoAi
Re: Multiple instances?
For sure, do I need an account or something special? Could you send me the wiki link? 2014-12-19 17:05 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 12/19/14 4:46 AM, Billy Bones wrote: hum OK many thanks for your hints, I got it, I understand what is going on now. Ok, I now have a clean and multiple instances running !! Thanks to everyone! @Mark Eggers: CentOS systemd units are not quite so far from the Fedora ones. Personally I do love the way fedora and CentOS are working but I have to confess that sometimes, and especially with tomcat everything is a pain in the ass as they scatter the components everywhere in the system without any (apparent) logics. WTH with all this /usr/share/blabla ?? @Christopher: Many thanks for your advices, obviously it make more sens to keep the catalina_base and derivate the catalina_home. I love this method!! Once again, many thanks to everyone, I now have a clean and working server! Great. Care to post your systemd script template to the wiki? It will likely help others trying to do the same thing. - -chris 2014-12-18 19:46 GMT+01:00 Mark Eggers its_toas...@yahoo.com.invalid: On 12/18/2014 10:07 AM, Christopher Schultz wrote: Billy, On 12/18/14 9:25 AM, Billy Bones wrote: Ok s, here is a small update. I've finally found what does this SERVICE_NAME mean, indeed you have to copy the original unit, then add the Systemd's directive named Environment like this: Environment=SERVICE_NAME=YOUROWNSERVICENAMEHERE then you will copy the default tomcat config file found on the /etc/sysconfig directory. And as you supposed it Cristophe and Daniel, you then have to copy the whole CATALINA_{HOME/BASE} or update the previous config file to point out to another tomcat installation. You should not have to copy the whole CATALINA_HOME. Instead, create a CATALINA_BASE (which is basically just a few directories and a few configuration files) for each service and then set the CATALINA_BASE environment variable to point to each one for each service, set CATALINA_HOME to point to where the full installation of Tomcat is (with no web applications installed in it), and each service should operate independently. So you should be able to have something like this: SERVICE_NAME=tomcat-one CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-one SERVICE_NAME=tomcat-two CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-two Then you configure /opt/tomcat/tomcat-(one|two) to have the configuration and applications you want. You should be able to start tomcat-one and tomcat-two independently of each other. I don't know exactly what systemd does with all of this, but once you end up calling catalina.sh with the right environment variables set, Tomcat will do the right thing. -chris Fedora 21 has a relatively nice systemd script for Tomcat. It's designed for running multiple Tomcat instances. If you have a copy of Fedora 21 and yumdownloader (by installing yum-utils), you can take a look at the system with: mkdir Temp cd Temp yumdownloader tomcat.noarch rpm2cpio tomcat-7.0.54-3.fc21.noarch.rpm | cpio -idmv All of the files are then accessible in the Temp directory. I've never liked how Fedora / RedHat / CentOS scatter the components all over the landscape. I'm thinking of adapting the Fedora systemd scripts to work with Tomcats installed under a particular user. The only issue seems to be that the SHUTDOWN_WAIT (time to wait in seconds before killing the process) is documented not to work. Sadly, I have some truly misbehaving applications that sometime need a kill -9 on the underlying Tomcat. Those misbehaving applications are unlikely to be fixed. My init scripts take care of this by issuing an orderly shutdown command, waiting up to SHUTDOWN_WAIT seconds (checking every second), then issuing a kill -9 if the process still exists. . . . better late than never (mostly) /mde/ --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUlEzdAAoJEBzwKT+lPKRYDcUP/j4pL9nN2SJp6A16T6f8HhEC uXRd+10RRZOtiwen0+h/M6h/YKhvWarCnVeGiBEWz82LvvfKTxMnGzNdHSMHBi2a nLdCWWEPYDCHWxwX+VpjyMwvanyK0Dl2zjeEfu0XGz4kf8Q0y+hPbMCa0bUUjHIQ B+3UcPvss2YmaZUAb+FKodFVUJNSLBKYCNTtRJL/+LO6TlriQIIa18kNujNk3ric W/cQAdreCd3HOjpopa/U0Bsxvplt+DLU2JAU+ooquupzIRR7+9/Z6JlyKX8Q+5du o9pjiDAYneRr1NWMVGFjAyxIqK2HNS1ARKn
Re: Multiple instances?
Ok s, here is a small update. I've finally found what does this SERVICE_NAME mean, indeed you have to copy the original unit, then add the Systemd's directive named Environment like this: Environment=SERVICE_NAME=YOUROWNSERVICENAMEHERE then you will copy the default tomcat config file found on the /etc/sysconfig directory. And as you supposed it Cristophe and Daniel, you then have to copy the whole CATALINA_{HOME/BASE} or update the previous config file to point out to another tomcat installation. I hope it would help someone ;-) 2014-12-11 17:58 GMT+01:00 Billy Bones gael.ther...@gmail.com: No problems, I'll keep you updated ;-) Thanks for your answers. 2014-12-11 15:24 GMT+01:00 Daniel Mikusa dmik...@pivotal.io: On Thu, Dec 11, 2014 at 3:45 AM, Billy Bones gael.ther...@gmail.com wrote: Ok, then I'll completly wright another systemd unit derivated from the one provided by CentOS. Yup, that what I thought about the CATALINA_HOME and BASE, so as you suggested, I'll test to run individual units and saw how it's going on. Many thanks guys. When you get something working, please share your solution :) I'm interested to see what you work out and I'm sure others will be as well. Dan 2014-12-10 18:10 GMT+01:00 Daniel Mikusa dmik...@pivotal.io: On Wed, Dec 10, 2014 at 10:35 AM, Billy Bones gael.ther...@gmail.com wrote: Hi Christopher, Many thanks for your answer, well, I'm pretty comfortable with systemd myself as I rely on it for my Fedora box for a long time ago, but on this particular topic regarding tomcat, I don't really understand the purpose of this special sentence. As you pointed it, for me too usually caps names == env variables but as on the tomcat-sysd script it's simply called without futher sources I'm not quite sure for now. Well, lets see if another *NIX Admin already had started multi-instances tomcat on systemd distributions :D Starting different instances of Tomcat is mostly just a matter of setting the CATALINA_HOME and CATALINA_BASE environment variables to the right locations. I'm sure systemd has a way for you to set environment variables, so that should be sufficient to start different instances. For more details on CATALINA_HOME and CATALINA_BASE, check out the RUNNING.txt file in your download or look here. http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/RUNNING.txt?view=markup I'd suggest getting everything working with multiple instance first. Once you can start the instances from the command line then worry about starting them with systemd. Another way would be to completly duplicate the tomcat directory and service unit and start both at runtime but... doesn't seems too shiny for a new server :D Also an option, but not as efficient. Dan 2014-12-10 16:27 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 12/10/14 9:57 AM, Billy Bones wrote: Hi guys, I'm currently preparing a migration of our Operating System which handle our current tomcat installation from an OLD Linux using init scripts to a CentOS7 release using sytemd. Hrm. Good luck getting help with systemd. The ASF doesn't even support init.d scripts, though I'm sure many *NIX admins here can help with init.d scripts (including myself). systemd is a bit new, to ... we'll see. Because I don't want to disturb the way the old server handle the webapps (not yet :-) ), I have to start 2 separated instances of tomcat on the new machine. Using init script to boot multiples instance is quite easy, but know I'll use systemd and I have to adapt. I installed my OS and Tomcat from the CentOS repos, take a look at the tomcat.service unit and tomcat-sysd script to see how the things work. But now I'm a little bit disappointed, I don't understand how to have multiple instances. I created a tomcat@jcr.service unit file on my systemd directory and read about the steps to achieve. The first step said that *by default SERVICE_NAME=tomcat. and must be defined BEFORE tomcat-sysd is called* Well, OK, but how am I suppose to do that? Using environnement variables? PreStartExec directive? Environnement directive? I have no idea. Generally, whenever I see something in ALL_CAPS that needs to be set to a value, it's an environment variable. With systemd, it could mean just about anything. I really don't get it, even looking at the tomcat-sysd wrapper script which indicate me HOW the system run multiple instance don't help me to understand WHERE am I suppose to put
Re: Multiple instances?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 12/18/14 9:25 AM, Billy Bones wrote: Ok s, here is a small update. I've finally found what does this SERVICE_NAME mean, indeed you have to copy the original unit, then add the Systemd's directive named Environment like this: Environment=SERVICE_NAME=YOUROWNSERVICENAMEHERE then you will copy the default tomcat config file found on the /etc/sysconfig directory. And as you supposed it Cristophe and Daniel, you then have to copy the whole CATALINA_{HOME/BASE} or update the previous config file to point out to another tomcat installation. You should not have to copy the whole CATALINA_HOME. Instead, create a CATALINA_BASE (which is basically just a few directories and a few configuration files) for each service and then set the CATALINA_BASE environment variable to point to each one for each service, set CATALINA_HOME to point to where the full installation of Tomcat is (with no web applications installed in it), and each service should operate independently. So you should be able to have something like this: SERVICE_NAME=tomcat-one CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-one SERVICE_NAME=tomcat-two CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-two Then you configure /opt/tomcat/tomcat-(one|two) to have the configuration and applications you want. You should be able to start tomcat-one and tomcat-two independently of each other. I don't know exactly what systemd does with all of this, but once you end up calling catalina.sh with the right environment variables set, Tomcat will do the right thing. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUkxfSAAoJEBzwKT+lPKRYrMkP/1afPF9gZXKIFRFlp0NKRFDx If1VuhuhbOG8pUexfwEtZ06KzMkwL7zCj80Q6adGoF+uZrwSkiZD1ls2qtPKhNPF 3J24gSZtLmuWVfrRcUCqSbk0H92B/PnNA/d7Cio15FDaTgbplkE1x/WDEVoJgieA 1F0j5BOjzW5TyWGjUmnW79X0hWmlxl+8hVA9rW2KkmI1RaaMZluE9zU8cNrX6Px0 Pwb0SXmYqxUhFiLaolpbMZyIyj7lhRN+NjcT6I+xa8KJ1hjoEcfEeO8CKijFRXWK 4aaNbuJuxzcoxCNjFSb2QsEzqjReI15x4P+puruYSIhgbV9YP68mmLizAQz8+4Tm nitP9Ke3fs8prJdvwtnN7KLHpctOdDAmBplgmj/GgOwB+khh/XTGYYIy3xG1xbH5 UQJAOSMFPpD0AfaZWB4C2fpQ9triTrPd2YsnAY/6Xq5rFyRj2CEO31bbAf2DXSpp GauhU6dbrKRlUPhbizIDSM4FdXq8pb22O3qbW+xqNQklzwFZ5eUWJ80IyXfXxA/E U6+fHiCoBm5KOVjDZVFmU+V9bd4cnhw1kCZgEH5Mwcahne0Uw7MSdoe/5V0yz1a1 ZnH0R3VR03UpHR7WhDy6SAYqHjulgReHnIv1U12M/c/guSoRWyEYuBrPH2SauYbK up3fP9xZSZKSyNlPv+Xm =Lztv -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple instances?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/18/2014 10:07 AM, Christopher Schultz wrote: Billy, On 12/18/14 9:25 AM, Billy Bones wrote: Ok s, here is a small update. I've finally found what does this SERVICE_NAME mean, indeed you have to copy the original unit, then add the Systemd's directive named Environment like this: Environment=SERVICE_NAME=YOUROWNSERVICENAMEHERE then you will copy the default tomcat config file found on the /etc/sysconfig directory. And as you supposed it Cristophe and Daniel, you then have to copy the whole CATALINA_{HOME/BASE} or update the previous config file to point out to another tomcat installation. You should not have to copy the whole CATALINA_HOME. Instead, create a CATALINA_BASE (which is basically just a few directories and a few configuration files) for each service and then set the CATALINA_BASE environment variable to point to each one for each service, set CATALINA_HOME to point to where the full installation of Tomcat is (with no web applications installed in it), and each service should operate independently. So you should be able to have something like this: SERVICE_NAME=tomcat-one CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-one SERVICE_NAME=tomcat-two CATALINA_HOME=/opt/apache-tomcat-7.0.57 CATALINA_BASE=/opt/tomcat/tomcat-two Then you configure /opt/tomcat/tomcat-(one|two) to have the configuration and applications you want. You should be able to start tomcat-one and tomcat-two independently of each other. I don't know exactly what systemd does with all of this, but once you end up calling catalina.sh with the right environment variables set, Tomcat will do the right thing. -chris Fedora 21 has a relatively nice systemd script for Tomcat. It's designed for running multiple Tomcat instances. If you have a copy of Fedora 21 and yumdownloader (by installing yum-utils), you can take a look at the system with: mkdir Temp cd Temp yumdownloader tomcat.noarch rpm2cpio tomcat-7.0.54-3.fc21.noarch.rpm | cpio -idmv All of the files are then accessible in the Temp directory. I've never liked how Fedora / RedHat / CentOS scatter the components all over the landscape. I'm thinking of adapting the Fedora systemd scripts to work with Tomcats installed under a particular user. The only issue seems to be that the SHUTDOWN_WAIT (time to wait in seconds before killing the process) is documented not to work. Sadly, I have some truly misbehaving applications that sometime need a kill -9 on the underlying Tomcat. Those misbehaving applications are unlikely to be fixed. My init scripts take care of this by issuing an orderly shutdown command, waiting up to SHUTDOWN_WAIT seconds (checking every second), then issuing a kill -9 if the process still exists. . . . better late than never (mostly) /mde/ -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQEcBAEBAgAGBQJUkyEAAAoJEEFGbsYNeTwtxbEH/jsc5+ywzGWZneOU5eRDt6I6 k5DWaP0S7OeAEU4FIGN5IK2zGE5ioYITxxQQ+QtWn61QkqkOR4mb6fMe7wNERiP7 0hX4fs1SXA13H3MdeO1PXRGi0T9f0bnqPmSstpCLHVy7kavy/ywgammOir87moje bw58Ga62iM/QhZIAcMksi2V255j+GdKOAgMG0Q9TKapMeDY1t3ywi/HJziTw8NAW du/3eniAjM6SGi74GsYTkY44hM4yB7uXko3RDeU+A0I20gz9umWkRf5u39PiRUPL RYMP8JAorjI8p4jt9ZnCPAwTrwrnvHLMnTFYYG10xQAkV9j22xgc0Hf49IMOq0k= =1cES -END PGP SIGNATURE- --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple instances?
Ok, then I'll completly wright another systemd unit derivated from the one provided by CentOS. Yup, that what I thought about the CATALINA_HOME and BASE, so as you suggested, I'll test to run individual units and saw how it's going on. Many thanks guys. 2014-12-10 18:10 GMT+01:00 Daniel Mikusa dmik...@pivotal.io: On Wed, Dec 10, 2014 at 10:35 AM, Billy Bones gael.ther...@gmail.com wrote: Hi Christopher, Many thanks for your answer, well, I'm pretty comfortable with systemd myself as I rely on it for my Fedora box for a long time ago, but on this particular topic regarding tomcat, I don't really understand the purpose of this special sentence. As you pointed it, for me too usually caps names == env variables but as on the tomcat-sysd script it's simply called without futher sources I'm not quite sure for now. Well, lets see if another *NIX Admin already had started multi-instances tomcat on systemd distributions :D Starting different instances of Tomcat is mostly just a matter of setting the CATALINA_HOME and CATALINA_BASE environment variables to the right locations. I'm sure systemd has a way for you to set environment variables, so that should be sufficient to start different instances. For more details on CATALINA_HOME and CATALINA_BASE, check out the RUNNING.txt file in your download or look here. http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/RUNNING.txt?view=markup I'd suggest getting everything working with multiple instance first. Once you can start the instances from the command line then worry about starting them with systemd. Another way would be to completly duplicate the tomcat directory and service unit and start both at runtime but... doesn't seems too shiny for a new server :D Also an option, but not as efficient. Dan 2014-12-10 16:27 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 12/10/14 9:57 AM, Billy Bones wrote: Hi guys, I'm currently preparing a migration of our Operating System which handle our current tomcat installation from an OLD Linux using init scripts to a CentOS7 release using sytemd. Hrm. Good luck getting help with systemd. The ASF doesn't even support init.d scripts, though I'm sure many *NIX admins here can help with init.d scripts (including myself). systemd is a bit new, to ... we'll see. Because I don't want to disturb the way the old server handle the webapps (not yet :-) ), I have to start 2 separated instances of tomcat on the new machine. Using init script to boot multiples instance is quite easy, but know I'll use systemd and I have to adapt. I installed my OS and Tomcat from the CentOS repos, take a look at the tomcat.service unit and tomcat-sysd script to see how the things work. But now I'm a little bit disappointed, I don't understand how to have multiple instances. I created a tomcat@jcr.service unit file on my systemd directory and read about the steps to achieve. The first step said that *by default SERVICE_NAME=tomcat. and must be defined BEFORE tomcat-sysd is called* Well, OK, but how am I suppose to do that? Using environnement variables? PreStartExec directive? Environnement directive? I have no idea. Generally, whenever I see something in ALL_CAPS that needs to be set to a value, it's an environment variable. With systemd, it could mean just about anything. I really don't get it, even looking at the tomcat-sysd wrapper script which indicate me HOW the system run multiple instance don't help me to understand WHERE am I suppose to put that information. I understand that I have to create a new unit file, a new /etc/sysconfig/tomcat file named according to the systemd unit, but I don't get it about the SERVICE_NAME. So if someone could help me a little bit, I'll be happy ^^ Ultimately, it will all boil down to CATALINA_BASE and CATALINA_HOME as far as Tomcat is concerned. The SERVICE_NAME is probably a systemd-only thing. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUiGZWAAoJEBzwKT+lPKRYsI0QAMI0IOCB2PjgBFKKb7Q1KtfF EpplWZmWEg7FL20HzTTjWM41r0IX5jZv1zFVBI8Na2mjtQ0v1KUUzPWnWo2+mGus nyrHl7HcY80LL9t4v3XwIpY0wE5pNgmTtnH+6JdHsahNNTN6NceK/j1IJoUPUFBj 9tdWHCM+bM6rP49nYBvBV3XPClw7nEc+NO3ddMeAY+zli71TuTnwIyC3Dp1v6ONW iNxheXHfDGACU1Qo7t9xL33g8cng06RD+LOjV/0d7JX3YJh5okoLL2m6ACHrQI7c knlon9yX0skzLhesZnkPeePli7Atk0s54SdH71MZe41ZJvlb/DAYmIqlkg1H7CGA fJlWmCfU0RwwNDdNq9prfQt/LFePnKQJ6PNO75afkfROKqnklYBe4imqpGqg1ij1 vRMyemYobM83m2/xpZ3l5FWwk+DoJiWBC9MdAJ/M6TYXU8y3ERPtyzEfVfsTRnzu Q6XQ5wcJzJmazA3SK4h743auSbNLp9iVrAH5Rhh5iAxCZTtf5Et1zgBfocpTh12X
Re: Multiple instances?
On Thu, Dec 11, 2014 at 3:45 AM, Billy Bones gael.ther...@gmail.com wrote: Ok, then I'll completly wright another systemd unit derivated from the one provided by CentOS. Yup, that what I thought about the CATALINA_HOME and BASE, so as you suggested, I'll test to run individual units and saw how it's going on. Many thanks guys. When you get something working, please share your solution :) I'm interested to see what you work out and I'm sure others will be as well. Dan 2014-12-10 18:10 GMT+01:00 Daniel Mikusa dmik...@pivotal.io: On Wed, Dec 10, 2014 at 10:35 AM, Billy Bones gael.ther...@gmail.com wrote: Hi Christopher, Many thanks for your answer, well, I'm pretty comfortable with systemd myself as I rely on it for my Fedora box for a long time ago, but on this particular topic regarding tomcat, I don't really understand the purpose of this special sentence. As you pointed it, for me too usually caps names == env variables but as on the tomcat-sysd script it's simply called without futher sources I'm not quite sure for now. Well, lets see if another *NIX Admin already had started multi-instances tomcat on systemd distributions :D Starting different instances of Tomcat is mostly just a matter of setting the CATALINA_HOME and CATALINA_BASE environment variables to the right locations. I'm sure systemd has a way for you to set environment variables, so that should be sufficient to start different instances. For more details on CATALINA_HOME and CATALINA_BASE, check out the RUNNING.txt file in your download or look here. http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/RUNNING.txt?view=markup I'd suggest getting everything working with multiple instance first. Once you can start the instances from the command line then worry about starting them with systemd. Another way would be to completly duplicate the tomcat directory and service unit and start both at runtime but... doesn't seems too shiny for a new server :D Also an option, but not as efficient. Dan 2014-12-10 16:27 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 12/10/14 9:57 AM, Billy Bones wrote: Hi guys, I'm currently preparing a migration of our Operating System which handle our current tomcat installation from an OLD Linux using init scripts to a CentOS7 release using sytemd. Hrm. Good luck getting help with systemd. The ASF doesn't even support init.d scripts, though I'm sure many *NIX admins here can help with init.d scripts (including myself). systemd is a bit new, to ... we'll see. Because I don't want to disturb the way the old server handle the webapps (not yet :-) ), I have to start 2 separated instances of tomcat on the new machine. Using init script to boot multiples instance is quite easy, but know I'll use systemd and I have to adapt. I installed my OS and Tomcat from the CentOS repos, take a look at the tomcat.service unit and tomcat-sysd script to see how the things work. But now I'm a little bit disappointed, I don't understand how to have multiple instances. I created a tomcat@jcr.service unit file on my systemd directory and read about the steps to achieve. The first step said that *by default SERVICE_NAME=tomcat. and must be defined BEFORE tomcat-sysd is called* Well, OK, but how am I suppose to do that? Using environnement variables? PreStartExec directive? Environnement directive? I have no idea. Generally, whenever I see something in ALL_CAPS that needs to be set to a value, it's an environment variable. With systemd, it could mean just about anything. I really don't get it, even looking at the tomcat-sysd wrapper script which indicate me HOW the system run multiple instance don't help me to understand WHERE am I suppose to put that information. I understand that I have to create a new unit file, a new /etc/sysconfig/tomcat file named according to the systemd unit, but I don't get it about the SERVICE_NAME. So if someone could help me a little bit, I'll be happy ^^ Ultimately, it will all boil down to CATALINA_BASE and CATALINA_HOME as far as Tomcat is concerned. The SERVICE_NAME is probably a systemd-only thing. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUiGZWAAoJEBzwKT+lPKRYsI0QAMI0IOCB2PjgBFKKb7Q1KtfF EpplWZmWEg7FL20HzTTjWM41r0IX5jZv1zFVBI8Na2mjtQ0v1KUUzPWnWo2+mGus nyrHl7HcY80LL9t4v3XwIpY0wE5pNgmTtnH+6JdHsahNNTN6NceK/j1IJoUPUFBj 9tdWHCM+bM6rP49nYBvBV3XPClw7nEc+NO3ddMeAY+zli71TuTnwIyC3Dp1v6ONW iNxheXHfDGACU1Qo7t9xL33g8cng06RD+LOjV
Re: Multiple instances?
No problems, I'll keep you updated ;-) Thanks for your answers. 2014-12-11 15:24 GMT+01:00 Daniel Mikusa dmik...@pivotal.io: On Thu, Dec 11, 2014 at 3:45 AM, Billy Bones gael.ther...@gmail.com wrote: Ok, then I'll completly wright another systemd unit derivated from the one provided by CentOS. Yup, that what I thought about the CATALINA_HOME and BASE, so as you suggested, I'll test to run individual units and saw how it's going on. Many thanks guys. When you get something working, please share your solution :) I'm interested to see what you work out and I'm sure others will be as well. Dan 2014-12-10 18:10 GMT+01:00 Daniel Mikusa dmik...@pivotal.io: On Wed, Dec 10, 2014 at 10:35 AM, Billy Bones gael.ther...@gmail.com wrote: Hi Christopher, Many thanks for your answer, well, I'm pretty comfortable with systemd myself as I rely on it for my Fedora box for a long time ago, but on this particular topic regarding tomcat, I don't really understand the purpose of this special sentence. As you pointed it, for me too usually caps names == env variables but as on the tomcat-sysd script it's simply called without futher sources I'm not quite sure for now. Well, lets see if another *NIX Admin already had started multi-instances tomcat on systemd distributions :D Starting different instances of Tomcat is mostly just a matter of setting the CATALINA_HOME and CATALINA_BASE environment variables to the right locations. I'm sure systemd has a way for you to set environment variables, so that should be sufficient to start different instances. For more details on CATALINA_HOME and CATALINA_BASE, check out the RUNNING.txt file in your download or look here. http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/RUNNING.txt?view=markup I'd suggest getting everything working with multiple instance first. Once you can start the instances from the command line then worry about starting them with systemd. Another way would be to completly duplicate the tomcat directory and service unit and start both at runtime but... doesn't seems too shiny for a new server :D Also an option, but not as efficient. Dan 2014-12-10 16:27 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 12/10/14 9:57 AM, Billy Bones wrote: Hi guys, I'm currently preparing a migration of our Operating System which handle our current tomcat installation from an OLD Linux using init scripts to a CentOS7 release using sytemd. Hrm. Good luck getting help with systemd. The ASF doesn't even support init.d scripts, though I'm sure many *NIX admins here can help with init.d scripts (including myself). systemd is a bit new, to ... we'll see. Because I don't want to disturb the way the old server handle the webapps (not yet :-) ), I have to start 2 separated instances of tomcat on the new machine. Using init script to boot multiples instance is quite easy, but know I'll use systemd and I have to adapt. I installed my OS and Tomcat from the CentOS repos, take a look at the tomcat.service unit and tomcat-sysd script to see how the things work. But now I'm a little bit disappointed, I don't understand how to have multiple instances. I created a tomcat@jcr.service unit file on my systemd directory and read about the steps to achieve. The first step said that *by default SERVICE_NAME=tomcat. and must be defined BEFORE tomcat-sysd is called* Well, OK, but how am I suppose to do that? Using environnement variables? PreStartExec directive? Environnement directive? I have no idea. Generally, whenever I see something in ALL_CAPS that needs to be set to a value, it's an environment variable. With systemd, it could mean just about anything. I really don't get it, even looking at the tomcat-sysd wrapper script which indicate me HOW the system run multiple instance don't help me to understand WHERE am I suppose to put that information. I understand that I have to create a new unit file, a new /etc/sysconfig/tomcat file named according to the systemd unit, but I don't get it about the SERVICE_NAME. So if someone could help me a little bit, I'll be happy ^^ Ultimately, it will all boil down to CATALINA_BASE and CATALINA_HOME as far as Tomcat is concerned. The SERVICE_NAME is probably a systemd-only thing. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUiGZWAAoJEBzwKT
Multiple instances?
Hi guys, I'm currently preparing a migration of our Operating System which handle our current tomcat installation from an OLD Linux using init scripts to a CentOS7 release using sytemd. Because I don't want to disturb the way the old server handle the webapps (not yet :-) ), I have to start 2 separated instances of tomcat on the new machine. Using init script to boot multiples instance is quite easy, but know I'll use systemd and I have to adapt. I installed my OS and Tomcat from the CentOS repos, take a look at the tomcat.service unit and tomcat-sysd script to see how the things work. But now I'm a little bit disappointed, I don't understand how to have multiple instances. I created a tomcat@jcr.service unit file on my systemd directory and read about the steps to achieve. The first step said that *by default SERVICE_NAME=tomcat. and must be defined BEFORE tomcat-sysd is called* Well, OK, but how am I suppose to do that? Using environnement variables? PreStartExec directive? Environnement directive? I really don't get it, even looking at the tomcat-sysd wrapper script which indicate me HOW the system run multiple instance don't help me to understand WHERE am I suppose to put that information. I understand that I have to create a new unit file, a new /etc/sysconfig/tomcat file named according to the systemd unit, but I don't get it about the SERVICE_NAME. So if someone could help me a little bit, I'll be happy ^^
Re: Multiple instances?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 12/10/14 9:57 AM, Billy Bones wrote: Hi guys, I'm currently preparing a migration of our Operating System which handle our current tomcat installation from an OLD Linux using init scripts to a CentOS7 release using sytemd. Hrm. Good luck getting help with systemd. The ASF doesn't even support init.d scripts, though I'm sure many *NIX admins here can help with init.d scripts (including myself). systemd is a bit new, to ... we'll see. Because I don't want to disturb the way the old server handle the webapps (not yet :-) ), I have to start 2 separated instances of tomcat on the new machine. Using init script to boot multiples instance is quite easy, but know I'll use systemd and I have to adapt. I installed my OS and Tomcat from the CentOS repos, take a look at the tomcat.service unit and tomcat-sysd script to see how the things work. But now I'm a little bit disappointed, I don't understand how to have multiple instances. I created a tomcat@jcr.service unit file on my systemd directory and read about the steps to achieve. The first step said that *by default SERVICE_NAME=tomcat. and must be defined BEFORE tomcat-sysd is called* Well, OK, but how am I suppose to do that? Using environnement variables? PreStartExec directive? Environnement directive? I have no idea. Generally, whenever I see something in ALL_CAPS that needs to be set to a value, it's an environment variable. With systemd, it could mean just about anything. I really don't get it, even looking at the tomcat-sysd wrapper script which indicate me HOW the system run multiple instance don't help me to understand WHERE am I suppose to put that information. I understand that I have to create a new unit file, a new /etc/sysconfig/tomcat file named according to the systemd unit, but I don't get it about the SERVICE_NAME. So if someone could help me a little bit, I'll be happy ^^ Ultimately, it will all boil down to CATALINA_BASE and CATALINA_HOME as far as Tomcat is concerned. The SERVICE_NAME is probably a systemd-only thing. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUiGZWAAoJEBzwKT+lPKRYsI0QAMI0IOCB2PjgBFKKb7Q1KtfF EpplWZmWEg7FL20HzTTjWM41r0IX5jZv1zFVBI8Na2mjtQ0v1KUUzPWnWo2+mGus nyrHl7HcY80LL9t4v3XwIpY0wE5pNgmTtnH+6JdHsahNNTN6NceK/j1IJoUPUFBj 9tdWHCM+bM6rP49nYBvBV3XPClw7nEc+NO3ddMeAY+zli71TuTnwIyC3Dp1v6ONW iNxheXHfDGACU1Qo7t9xL33g8cng06RD+LOjV/0d7JX3YJh5okoLL2m6ACHrQI7c knlon9yX0skzLhesZnkPeePli7Atk0s54SdH71MZe41ZJvlb/DAYmIqlkg1H7CGA fJlWmCfU0RwwNDdNq9prfQt/LFePnKQJ6PNO75afkfROKqnklYBe4imqpGqg1ij1 vRMyemYobM83m2/xpZ3l5FWwk+DoJiWBC9MdAJ/M6TYXU8y3ERPtyzEfVfsTRnzu Q6XQ5wcJzJmazA3SK4h743auSbNLp9iVrAH5Rhh5iAxCZTtf5Et1zgBfocpTh12X xmgnsJtLTZ3jKNxdx9wD8zsXK0JYtWCYwisXRj6fGQuUU7INLDqRL7dVdl8VrHRQ ra4UXRhg8cKLd8YFbd78UxJK66TP/EyQqv1cIwTGF+XSS87pvAnR1T36cQ4e5KIB xwylVvlwSd9BvhatJtJw =w7Y2 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple instances?
Hi Christopher, Many thanks for your answer, well, I'm pretty comfortable with systemd myself as I rely on it for my Fedora box for a long time ago, but on this particular topic regarding tomcat, I don't really understand the purpose of this special sentence. As you pointed it, for me too usually caps names == env variables but as on the tomcat-sysd script it's simply called without futher sources I'm not quite sure for now. Well, lets see if another *NIX Admin already had started multi-instances tomcat on systemd distributions :D Another way would be to completly duplicate the tomcat directory and service unit and start both at runtime but... doesn't seems too shiny for a new server :D 2014-12-10 16:27 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 12/10/14 9:57 AM, Billy Bones wrote: Hi guys, I'm currently preparing a migration of our Operating System which handle our current tomcat installation from an OLD Linux using init scripts to a CentOS7 release using sytemd. Hrm. Good luck getting help with systemd. The ASF doesn't even support init.d scripts, though I'm sure many *NIX admins here can help with init.d scripts (including myself). systemd is a bit new, to ... we'll see. Because I don't want to disturb the way the old server handle the webapps (not yet :-) ), I have to start 2 separated instances of tomcat on the new machine. Using init script to boot multiples instance is quite easy, but know I'll use systemd and I have to adapt. I installed my OS and Tomcat from the CentOS repos, take a look at the tomcat.service unit and tomcat-sysd script to see how the things work. But now I'm a little bit disappointed, I don't understand how to have multiple instances. I created a tomcat@jcr.service unit file on my systemd directory and read about the steps to achieve. The first step said that *by default SERVICE_NAME=tomcat. and must be defined BEFORE tomcat-sysd is called* Well, OK, but how am I suppose to do that? Using environnement variables? PreStartExec directive? Environnement directive? I have no idea. Generally, whenever I see something in ALL_CAPS that needs to be set to a value, it's an environment variable. With systemd, it could mean just about anything. I really don't get it, even looking at the tomcat-sysd wrapper script which indicate me HOW the system run multiple instance don't help me to understand WHERE am I suppose to put that information. I understand that I have to create a new unit file, a new /etc/sysconfig/tomcat file named according to the systemd unit, but I don't get it about the SERVICE_NAME. So if someone could help me a little bit, I'll be happy ^^ Ultimately, it will all boil down to CATALINA_BASE and CATALINA_HOME as far as Tomcat is concerned. The SERVICE_NAME is probably a systemd-only thing. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUiGZWAAoJEBzwKT+lPKRYsI0QAMI0IOCB2PjgBFKKb7Q1KtfF EpplWZmWEg7FL20HzTTjWM41r0IX5jZv1zFVBI8Na2mjtQ0v1KUUzPWnWo2+mGus nyrHl7HcY80LL9t4v3XwIpY0wE5pNgmTtnH+6JdHsahNNTN6NceK/j1IJoUPUFBj 9tdWHCM+bM6rP49nYBvBV3XPClw7nEc+NO3ddMeAY+zli71TuTnwIyC3Dp1v6ONW iNxheXHfDGACU1Qo7t9xL33g8cng06RD+LOjV/0d7JX3YJh5okoLL2m6ACHrQI7c knlon9yX0skzLhesZnkPeePli7Atk0s54SdH71MZe41ZJvlb/DAYmIqlkg1H7CGA fJlWmCfU0RwwNDdNq9prfQt/LFePnKQJ6PNO75afkfROKqnklYBe4imqpGqg1ij1 vRMyemYobM83m2/xpZ3l5FWwk+DoJiWBC9MdAJ/M6TYXU8y3ERPtyzEfVfsTRnzu Q6XQ5wcJzJmazA3SK4h743auSbNLp9iVrAH5Rhh5iAxCZTtf5Et1zgBfocpTh12X xmgnsJtLTZ3jKNxdx9wD8zsXK0JYtWCYwisXRj6fGQuUU7INLDqRL7dVdl8VrHRQ ra4UXRhg8cKLd8YFbd78UxJK66TP/EyQqv1cIwTGF+XSS87pvAnR1T36cQ4e5KIB xwylVvlwSd9BvhatJtJw =w7Y2 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple instances?
On Wed, Dec 10, 2014 at 10:35 AM, Billy Bones gael.ther...@gmail.com wrote: Hi Christopher, Many thanks for your answer, well, I'm pretty comfortable with systemd myself as I rely on it for my Fedora box for a long time ago, but on this particular topic regarding tomcat, I don't really understand the purpose of this special sentence. As you pointed it, for me too usually caps names == env variables but as on the tomcat-sysd script it's simply called without futher sources I'm not quite sure for now. Well, lets see if another *NIX Admin already had started multi-instances tomcat on systemd distributions :D Starting different instances of Tomcat is mostly just a matter of setting the CATALINA_HOME and CATALINA_BASE environment variables to the right locations. I'm sure systemd has a way for you to set environment variables, so that should be sufficient to start different instances. For more details on CATALINA_HOME and CATALINA_BASE, check out the RUNNING.txt file in your download or look here. http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/RUNNING.txt?view=markup I'd suggest getting everything working with multiple instance first. Once you can start the instances from the command line then worry about starting them with systemd. Another way would be to completly duplicate the tomcat directory and service unit and start both at runtime but... doesn't seems too shiny for a new server :D Also an option, but not as efficient. Dan 2014-12-10 16:27 GMT+01:00 Christopher Schultz ch...@christopherschultz.net : -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Billy, On 12/10/14 9:57 AM, Billy Bones wrote: Hi guys, I'm currently preparing a migration of our Operating System which handle our current tomcat installation from an OLD Linux using init scripts to a CentOS7 release using sytemd. Hrm. Good luck getting help with systemd. The ASF doesn't even support init.d scripts, though I'm sure many *NIX admins here can help with init.d scripts (including myself). systemd is a bit new, to ... we'll see. Because I don't want to disturb the way the old server handle the webapps (not yet :-) ), I have to start 2 separated instances of tomcat on the new machine. Using init script to boot multiples instance is quite easy, but know I'll use systemd and I have to adapt. I installed my OS and Tomcat from the CentOS repos, take a look at the tomcat.service unit and tomcat-sysd script to see how the things work. But now I'm a little bit disappointed, I don't understand how to have multiple instances. I created a tomcat@jcr.service unit file on my systemd directory and read about the steps to achieve. The first step said that *by default SERVICE_NAME=tomcat. and must be defined BEFORE tomcat-sysd is called* Well, OK, but how am I suppose to do that? Using environnement variables? PreStartExec directive? Environnement directive? I have no idea. Generally, whenever I see something in ALL_CAPS that needs to be set to a value, it's an environment variable. With systemd, it could mean just about anything. I really don't get it, even looking at the tomcat-sysd wrapper script which indicate me HOW the system run multiple instance don't help me to understand WHERE am I suppose to put that information. I understand that I have to create a new unit file, a new /etc/sysconfig/tomcat file named according to the systemd unit, but I don't get it about the SERVICE_NAME. So if someone could help me a little bit, I'll be happy ^^ Ultimately, it will all boil down to CATALINA_BASE and CATALINA_HOME as far as Tomcat is concerned. The SERVICE_NAME is probably a systemd-only thing. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUiGZWAAoJEBzwKT+lPKRYsI0QAMI0IOCB2PjgBFKKb7Q1KtfF EpplWZmWEg7FL20HzTTjWM41r0IX5jZv1zFVBI8Na2mjtQ0v1KUUzPWnWo2+mGus nyrHl7HcY80LL9t4v3XwIpY0wE5pNgmTtnH+6JdHsahNNTN6NceK/j1IJoUPUFBj 9tdWHCM+bM6rP49nYBvBV3XPClw7nEc+NO3ddMeAY+zli71TuTnwIyC3Dp1v6ONW iNxheXHfDGACU1Qo7t9xL33g8cng06RD+LOjV/0d7JX3YJh5okoLL2m6ACHrQI7c knlon9yX0skzLhesZnkPeePli7Atk0s54SdH71MZe41ZJvlb/DAYmIqlkg1H7CGA fJlWmCfU0RwwNDdNq9prfQt/LFePnKQJ6PNO75afkfROKqnklYBe4imqpGqg1ij1 vRMyemYobM83m2/xpZ3l5FWwk+DoJiWBC9MdAJ/M6TYXU8y3ERPtyzEfVfsTRnzu Q6XQ5wcJzJmazA3SK4h743auSbNLp9iVrAH5Rhh5iAxCZTtf5Et1zgBfocpTh12X xmgnsJtLTZ3jKNxdx9wD8zsXK0JYtWCYwisXRj6fGQuUU7INLDqRL7dVdl8VrHRQ ra4UXRhg8cKLd8YFbd78UxJK66TP/EyQqv1cIwTGF+XSS87pvAnR1T36cQ4e5KIB xwylVvlwSd9BvhatJtJw =w7Y2 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Scripting Tomcat installation versus multiple instances
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 3/26/14, 3:35 PM, André Warnier wrote: Despite your name, you are too quick (and not lazy enough). You could have waited an hour, to get that solution right here. ;-) Please don't top-post. - -chris (Sorry... just had to do that) -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTNE0BAAoJEBzwKT+lPKRYZRYQAKaYJRoB4M4Fm4NnIW3Q2Ng/ Fs1dk96Ad1HdIPWgYUjnzRS3oOXXW+2ocOnn1LXUctjQRsdkruY0PmwrYThUZ8zB lZmJgSFBoi3w1c+HJ3KTchnx8+VQUDOeR0r++hmpvl0j92yNQz0a4mr7muyvoMs2 e7TAM3dRMAkcCX/W8In0SsOweHaSpUTOAnEkzGG4tGZKaPvAJ4fIEQ2Jra7bcHqQ U/u2VRlcXBemIoeOFYGANek1v/hvu7NelhDLwMLHgJYFoktxjSyWKpZ187OOkuU9 g/WOM2WIa/TzCMEPtA8QhD45biJmE+l4vvR4ScVgeC3eIxT0F6jNwvvcflEDEo0/ +SWonwmrKGvKbgvgBLM0VRXfbNXbFmaw1Vo8liT077BsmYNFrSP7eN51iiePH025 0O7dGAJQyi5fe3w6JP4WHh1rbYKOzmJMyyMQjKItSzy6Y07fK6qpbekb4VxnLrev Rvq0Xh/xpqgj1mtKip7JFBbJl1m/wu6suJCGuUOukm4sCqjcTYNUCBL67Md/ilR+ 6baBdUvNriznVxJsY7AOqAa5rCnU6iyBTOdBvduuw25+gED45aLpJUuL+OuHl5Ij 2U8s2rKWdrvIKWLpdRl8BYZksbQr7yMV5JJrh5ce679GHrduJv1xLkggdQRr5HMu kpvX512awxPkrnJ0xGkX =UxeD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Scripting Tomcat installation versus multiple instances
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 David, On 3/26/14, 3:35 PM, David kerber wrote: On 3/26/2014 3:25 PM, André Warnier wrote: Leo Donahue wrote: On Wed, Mar 26, 2014 at 11:32 AM, Sebastien Tardif sebastien.tardif.contrac...@gmo.com wrote: I'm confused by the commands given by Tomcat documentation about creating different instances, it says: service install instance1 but service is not a command provided by Tomcat or Windows, see http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html#Multiple_Instances Almost everything I'm trying to automate using that page is not working, maybe it's rare people automate installation on Windows? The service command is located here: \apache-tomcat-7.0.52\bin change directories to this location and run that command. Maybe also the OP did not download the correct package to have that command. For some reason which is still mysterious to me, the Service Installer package does not contain all the files which the ZIP package contains. And bin/service.bat is probably among the ones missing. Yes, it is. When I am setting up a new install, I do the windows install and then unzip the .zip package on top of it, so I have all the .bat files as well. I don't fully automate my installations, but I do some scripting to make it easier to be consistent with my naming and configuration. https://issues.apache.org/bugzilla/show_bug.cgi?id=56323 Vote for it. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTNE2VAAoJEBzwKT+lPKRYicoP/0wJYICuyIYTdbWeNEaxAVbA SPyrBpoiXRPZAMFm/tW0Epk2ruiVh/9SCqT3M1nbCM+ThBzMEYjaWf38v1zaGVgb HQUSww/2Vz7D3ZuuQz9GHA4OD9+5l+FFkTE6qAMZf6q9oEyzu6/ySGGyzWYVSRdw T+Buy6ZQHCVgbgB9wzZbGyHgwULEKnf/GUbCIlpx+kAiHhqnTPl/6QiXJpBaUPoE ZO7HPUNZFG/P2yjORalP/xsU0l2R/74pmySFUd8lP5oLevMNt3hoqjWHV1rVROuV pFpnaNPnbo2aeCHh1RNXNPP57ieiTmSdHgm+LghfPG7aVXPW1vsw5T10VqlxuEWN mf+GAmlpVzQl0NkqoIW4T0A0yjrVJHXqMmPnzQEE5xc7wwL86h/B2A+Gs47tXVrQ lvuicmQkqKJOyanriJ+dvP5ddDPKDlPPf4/oeLqZoPqpajpWI4/uAL4AhV24I7Lt sls4pR/rMc23ytujodKu3A+alANL6cz/279aHOUqkkpNOe5NuPqr9T1Vn/c4fPKr PXwzEmtVOLX4VRkB+bohqya5xwsb7lkDmzrS7LPAQj9/pd0lnVDd+2P0O02yvDM5 kaZIeRK4qa6RGJIcGv81hpiskbT3dcv23ALfYuQu87/MMeiNkDspY0OoZIRJS/qO jB6BBGKGgYLQYsIHUDVu =Amxm -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: {OT] Scripting Tomcat installation versus multiple instances
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 3/26/14, 3:35 PM, André Warnier wrote: Despite your name, you are too quick (and not lazy enough). You could have waited an hour, to get that solution right here. ;-) Please don't top-post. - -chris (Sorry... just had to do that) Well, you top-post all the time ! (see above) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: {OT] Scripting Tomcat installation versus multiple instances
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 3/27/14, 12:13 PM, André Warnier wrote: Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 3/26/14, 3:35 PM, André Warnier wrote: Despite your name, you are too quick (and not lazy enough). You could have waited an hour, to get that solution right here. ;-) Please don't top-post. - -chris (Sorry... just had to do that) Well, you top-post all the time ! (see above) Do I? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTNE/7AAoJEBzwKT+lPKRYy2oP/0+krojpRSJWrukMOU1wb3ET D0ssGvojcv2vrr7zoSeGTvEV0Y+OxxalDNSOKMZsDaLwj9AkBnfGRYrMBDahnyNq cifzB3kK2G826sCg6owGv6gsd+YFJ03tqB9nuPpNtt/jTmafjDRSEEnBdj2VK3xr ZTnUSMz+jZ1EAy/OQAd4oIa5jOh5CxBsZa9Dux7MbGLV2UudqoKxTCjLx7I7FpWp p2zUuh3vNiF1XWNvxXnkLYB9xNHyPwPbfv6eRBXj9v5G993K6EalKMFPMoQcgw1k vzpboDVidjNHetWdIXbYDSIhFdgqhcZX7Gz0YrZ/yUDv77Mxr+Uu7xUAV3E+J2Z/ 9Sxx87C+dHGhatj8Q4SZScoDOHq+uInJLULq5KS18tprcDf6wOD4EBx2oTGw0npa pzZQaL5JXK/36K0ZpbkGQZWoxdh5ztPU25P6+HIOyo5EEeLvFNFWP2pClvaZcy4S 98S8G1OZvQpJrzc1RvBzd4a5Uxt+Jr0+KJCXqZAB976Wg8QwtaqGOAox0nvZpXqz /S6yRl/FOGskiXbNMrTeB9lztWECwZLA+WOhdyqERyElvbKNAr2aI9rZIs829QjF Xtb9VVkoa55otSmnNmIKE1DNClm44uOJhcLeMAZu8gEPCNqfs3wG7R0Sis67BlRL 6oTQlJto6mAzgscr8rg6 =9d0b -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Scripting Tomcat installation versus multiple instances
On 3/27/2014 12:11 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 David, ... Yes, it is. When I am setting up a new install, I do the windows install and then unzip the .zip package on top of it, so I have all the .bat files as well. I don't fully automate my installations, but I do some scripting to make it easier to be consistent with my naming and configuration. https://issues.apache.org/bugzilla/show_bug.cgi?id=56323 Vote for it. done - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Scripting Tomcat installation versus multiple instances
I'm confused by the commands given by Tomcat documentation about creating different instances, it says: service install instance1 but service is not a command provided by Tomcat or Windows, see http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html#Multiple_Instances Almost everything I'm trying to automate using that page is not working, maybe it's rare people automate installation on Windows?
Re: Scripting Tomcat installation versus multiple instances
On Wed, Mar 26, 2014 at 11:32 AM, Sebastien Tardif sebastien.tardif.contrac...@gmo.com wrote: I'm confused by the commands given by Tomcat documentation about creating different instances, it says: service install instance1 but service is not a command provided by Tomcat or Windows, see http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html#Multiple_Instances Almost everything I'm trying to automate using that page is not working, maybe it's rare people automate installation on Windows? The service command is located here: \apache-tomcat-7.0.52\bin change directories to this location and run that command.
RE: Scripting Tomcat installation versus multiple instances
Ok, I got it. When I installed Tomcat on Windows, I used the Windows Service Installer, the executable, not the zip. It seems the installation will rename the executables to whatever name you give to your instance, but that executable can be used like service.bat for that command. The executables are renamed so that when you execute them they default to match the Windows service with the same name. Also, the same Tomcat documentation mentions a batch file called service.bat, that file doesn't exist in the executable installer but does exists in the zip file for Windows. To debug installation of Tomcat's services, it's useful to know that the registry location that persist all the settings is under: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0 -Original Message- From: Leo Donahue [mailto:donahu...@gmail.com] Sent: Wednesday, March 26, 2014 2:54 PM To: Tomcat Users List Subject: Re: Scripting Tomcat installation versus multiple instances On Wed, Mar 26, 2014 at 11:32 AM, Sebastien Tardif sebastien.tardif.contrac...@gmo.com wrote: I'm confused by the commands given by Tomcat documentation about creating different instances, it says: service install instance1 but service is not a command provided by Tomcat or Windows, see http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html#Mul tiple_Instances Almost everything I'm trying to automate using that page is not working, maybe it's rare people automate installation on Windows? The service command is located here: \apache-tomcat-7.0.52\bin change directories to this location and run that command. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Scripting Tomcat installation versus multiple instances
Leo Donahue wrote: On Wed, Mar 26, 2014 at 11:32 AM, Sebastien Tardif sebastien.tardif.contrac...@gmo.com wrote: I'm confused by the commands given by Tomcat documentation about creating different instances, it says: service install instance1 but service is not a command provided by Tomcat or Windows, see http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html#Multiple_Instances Almost everything I'm trying to automate using that page is not working, maybe it's rare people automate installation on Windows? The service command is located here: \apache-tomcat-7.0.52\bin change directories to this location and run that command. Maybe also the OP did not download the correct package to have that command. For some reason which is still mysterious to me, the Service Installer package does not contain all the files which the ZIP package contains. And bin/service.bat is probably among the ones missing. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Scripting Tomcat installation versus multiple instances
On 3/26/2014 3:25 PM, André Warnier wrote: Leo Donahue wrote: On Wed, Mar 26, 2014 at 11:32 AM, Sebastien Tardif sebastien.tardif.contrac...@gmo.com wrote: I'm confused by the commands given by Tomcat documentation about creating different instances, it says: service install instance1 but service is not a command provided by Tomcat or Windows, see http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html#Multiple_Instances Almost everything I'm trying to automate using that page is not working, maybe it's rare people automate installation on Windows? The service command is located here: \apache-tomcat-7.0.52\bin change directories to this location and run that command. Maybe also the OP did not download the correct package to have that command. For some reason which is still mysterious to me, the Service Installer package does not contain all the files which the ZIP package contains. And bin/service.bat is probably among the ones missing. Yes, it is. When I am setting up a new install, I do the windows install and then unzip the .zip package on top of it, so I have all the .bat files as well. I don't fully automate my installations, but I do some scripting to make it easier to be consistent with my naming and configuration. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Scripting Tomcat installation versus multiple instances
Despite your name, you are too quick (and not lazy enough). You could have waited an hour, to get that solution right here. ;-) Sebastien Tardif wrote: Ok, I got it. When I installed Tomcat on Windows, I used the Windows Service Installer, the executable, not the zip. It seems the installation will rename the executables to whatever name you give to your instance, but that executable can be used like service.bat for that command. The executables are renamed so that when you execute them they default to match the Windows service with the same name. Also, the same Tomcat documentation mentions a batch file called service.bat, that file doesn't exist in the executable installer but does exists in the zip file for Windows. To debug installation of Tomcat's services, it's useful to know that the registry location that persist all the settings is under: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0 -Original Message- From: Leo Donahue [mailto:donahu...@gmail.com] Sent: Wednesday, March 26, 2014 2:54 PM To: Tomcat Users List Subject: Re: Scripting Tomcat installation versus multiple instances On Wed, Mar 26, 2014 at 11:32 AM, Sebastien Tardif sebastien.tardif.contrac...@gmo.com wrote: I'm confused by the commands given by Tomcat documentation about creating different instances, it says: service install instance1 but service is not a command provided by Tomcat or Windows, see http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html#Mul tiple_Instances Almost everything I'm trying to automate using that page is not working, maybe it's rare people automate installation on Windows? The service command is located here: \apache-tomcat-7.0.52\bin change directories to this location and run that command. - 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
Re: Scripting Tomcat installation versus multiple instances
On Wed, Mar 26, 2014 at 12:35 PM, André Warnier a...@ice-sa.com wrote: Despite your name, you are too quick (and not lazy enough). You could have waited an hour, to get that solution right here. ;-) Sebastien Tardif wrote: Oh no you didn't, just top post. ?
Re: [OT] Scripting Tomcat installation versus multiple instances
Leo Donahue wrote: On Wed, Mar 26, 2014 at 12:35 PM, André Warnier a...@ice-sa.com wrote: Despite your name, you are too quick (and not lazy enough). You could have waited an hour, to get that solution right here. ;-) Sebastien Tardif wrote: Oh no you didn't, just top post. ? Well, you see, it's all about the context. It's a rather subtle thing really, and one needs a bit of feeling to do this just right. If you are answering some particular question in the original text, or you are commenting on a particular section, then it makes it much easier for everyone (or at least Western readers), if you keep questions and answers in sequence. See Mark's previous post in Re: tomcat 5.5.26 misses a jar contaning org.apache.tomcat.core.BaseInterceptor . . . and imagine this all top-posted.. However, if you were to make a general comment or observation not really related to any section in particular, but to the message as a whole, then why not place it where it is easiest to read without scrolling ? Now let's not allow this to spread unduly; I suggest that only long-time contributors to the list (3 years or more), would have the proper appreciation and restraint to be allowed to flaunt the general rules once in a while. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Scripting Tomcat installation versus multiple instances
-Original Message- From: David kerber [mailto:dcker...@verizon.net] Sent: Wednesday, March 26, 2014 2:35 PM To: Tomcat Users List Subject: Re: Scripting Tomcat installation versus multiple instances On 3/26/2014 3:25 PM, André Warnier wrote: Leo Donahue wrote: On Wed, Mar 26, 2014 at 11:32 AM, Sebastien Tardif sebastien.tardif.contrac...@gmo.com wrote: I'm confused by the commands given by Tomcat documentation about creating different instances, it says: service install instance1 but service is not a command provided by Tomcat or Windows, see http://tomcat.apache.org/tomcat-7.0-doc/windows-service- howto.html#M ultiple_Instances Almost everything I'm trying to automate using that page is not working, maybe it's rare people automate installation on Windows? The service command is located here: \apache-tomcat-7.0.52\bin change directories to this location and run that command. Maybe also the OP did not download the correct package to have that command. For some reason which is still mysterious to me, the Service Installer package does not contain all the files which the ZIP package contains. And bin/service.bat is probably among the ones missing. Yes, it is. When I am setting up a new install, I do the windows install and then unzip the .zip package on top of it, so I have all the .bat files as well. I don't fully automate my installations, but I do some scripting to make it easier to be consistent with my naming and configuration. I've found with the Windows service installer that I've never needed the *.bat files that come with the zip file. However, one thing I'm not sure about is if the WSI has a -silent mode. It would be great if it did. It really would help out in scripting the install as part of another install, etc. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple instances of Tomcat 7.0 on one server
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 To whom it mat concern, On 7/19/13 1:37 PM, Tomcat Random wrote: We currently are setting a site that receives fairly heavy traffic (5000 simultaneous users). We have two physical servers. As a general idea, is there performance to be gained by running multiple instances of Tomcat 7.0? For example, two instances on one physical server and two instances on the other physical server? Assume all are running the same webapp. You are unlikely to see a performance benefit by running two (or more) Tomcat instances on the same server. There are other benefits, though. For instance, you can configure Tomcat for load-balancing and then use a fronting server like httpd to direct traffic to a subset of your instances in order to, for instance, upgrade each instance individually with no (perceived) downtime. You can of course do this with separate physical servers, too. Separate Tomcat instances means that you can run separate Tomcat versions and separate JVM versions in parallel. We find this very valuable at $WORK and so we run each webapp in a separate JVM even when multiple webapps are deployed on a single physical server. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJR7XVKAAoJEBzwKT+lPKRYaWgP/2ClDW8TF8bOCQPgisyDZ+JB tufmVcz5TZnmenvT2Tk9W8Qf9a/f37Ttv3u4h4OPmoUZLc4XmsPsLjQcRSNN3p76 xd401Ngj7WhuVxL+KescDxO0HApG/TDTNbcGeMgLXpYorAaqlVQZW3ADoQ0+vJGY KujBdlGYqmgoQETtd2ewqzn5OsLWiuNsgwnm9CiI1P658Ljaik/0Upr18rhP4uno eSkAH/y6Ojxd0pqQIoyrKPoW7xbcX476VIBc7VabSSQwV2MmEBm02SaJ4eq+Ms0/ nCosx8nt6DDwzeWEI4dzC3eGpJZ9bZoclpfjQyLEvHkODkTmds54YRvuzzlwlKus 59s3lckIL+WOmPTrCv5Jam6ReyuB/aCWlRNVOEBiiBiB40SN+yNwm878m4ALWmfK sr0zwMofJjFc/j3q3XCZzknvnga5MdBVaNYddOyWYcwILCK4ODrA6SxIkJ0X2Pah 0/MMQvkNYVN1HYm7z9IAKlN/SMoLiz+hmruCv/xnYpZKO0dxiX34fP++nnJFdpa3 gfu1U+7HJFWeY3xtBePDuoyVYhxK4tP3WKbG+gRr3d56k7mb8XkHqSguhvl5VlvN Y4h+VW1UOfem7swv8Y63ey9AykZamY/t+9dI9N88+hTDQCO4+UB/uEQn5ks5qsx6 qJvHUTt6zYIVhus6DiWj =F6ZA -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple instances of Tomcat 7.0 on one server
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Leon, On 7/19/13 3:48 PM, Leon Rosenberg wrote: * you have multiple physical resources your app can't use properly. For example if you could give each instance its own database or its own file system. Related: if you are running on a 32-bit OS, you can't use huge heaps. You can load-balance between several JVM instances on the same physical machine and effectively use more heap space (across the cluster, not in a single JVM, of course). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJR7XWnAAoJEBzwKT+lPKRYaVMQAMpUfnxEHG+CsG7fA6qAVEAj q7Nfc/zVy4wJS0vYJ3KIgzHVL0fh1chPdjEfCr193eNXifyYb+KK4QCN5XsbZGm4 MIqK9i5iws5r9lHMr91ZnYdPVi+1E70RLLe5a05K9nZIBinS9yqmsLCqvR0WVHS+ 7VlROJCJK62O/fabP3CQsODSmtr1egG/CQudYfm9BcITwYuuuAplzrY+j3J1RxcP sYGw0TVE6HmS2O7tDZAbt1v3egmA/vTh2At6q73/qREWYOLt3u3R4w0g7j4jlvdi 7J8R/WjdHGRdVzdTZhhwAeSW1O3YYr1EiWrrRIcQ0c7l6KeVfG0R4YhDa46s8ldK 87cycV3v4IHwt+7qwWvKdwoMupX27dQQDX0NraLnvIMlIRfDpKOjDNm+GDCrkrfv a3nFmaK+jxit3enOd4qcfL5muqI9EgB0rMmL66+lPnzaH54NAlUN5AKPLCs+/dDj q+3D6E8+phWdp3pwdqO3StgUwgqvnLhXP1F/VjBxzBaJvJFSobcDvHaDm0A1PzQw m34r72uszhUfiOvyjyJyar+LJNiNWhmQfbhSm1o5wqsHhWcp1A8rPMGZblRrut/n +FCMBESzLAbRjFSCqBAy5FSO9U1HwlehWUSfyL9fNh0asFLll6FHkzBc32qrw1+Z ztyc45cuzp2lP86/ljvg =vuwi -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Multiple instances of Tomcat 7.0 on one server
We currently are setting a site that receives fairly heavy traffic (5000 simultaneous users). We have two physical servers. As a general idea, is there performance to be gained by running multiple instances of Tomcat 7.0? For example, two instances on one physical server and two instances on the other physical server? Assume all are running the same webapp. TIA
Re: Multiple instances of Tomcat 7.0 on one server
Hello Mr. Random, as usual there is no easy answer here. I think the most correct answer would be RATHER NOT. There is rather no performance to be gained but running multiple instances of the same app in multiple tomcats on the same physical machine except for: * you need a lot of heap per session. In this case you will probably be able to save gc time and performance. So in case you need more than 12 Gb Heap separation would make sense. * you have multiple physical resources your app can't use properly. For example if you could give each instance its own database or its own file system. * you have concurrency issues in your application. Drawbacks: - Database. If you have one. You will have more connections and evtl. more locks. And both are limited resources. If you want a more detailed answer, you should tell us a bit about your app. Or, better, you start to monitor your app, run one physical server with one instance and another one with two and compare. By using a monitoring tool like moskito: http://www.moskito.org. regards Leon On Fri, Jul 19, 2013 at 7:37 PM, Tomcat Random tomcat.ran...@gmail.comwrote: We currently are setting a site that receives fairly heavy traffic (5000 simultaneous users). We have two physical servers. As a general idea, is there performance to be gained by running multiple instances of Tomcat 7.0? For example, two instances on one physical server and two instances on the other physical server? Assume all are running the same webapp. TIA
multiple instances of tomcat daemon
Hi I am using a tomcat server on a Linux machine. Is there any way I can run multiple instances of apache daemon process so that if daemon for environment A do not have access to files for environment B. In short I want to run multiple daemon processes. Thanks Regards MOHIT GARG Analyst International Banking RBS Block No 1, Tower A, Unitech Infospace Complex Sector 21, Gurgaon, Haryana, 122002, India Office: +91 8860190177 *** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 350, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland N.V. including its affiliates (RBS group) does not accept responsibility for changes made to this message after it was sent. For the protection of RBS group and its clients and customers, and in compliance with regulatory requirements, the contents of both incoming and outgoing e-mail communications, which could include proprietary information and Non-Public Personal Information, may be read by authorised persons within RBS group other than the intended recipient(s). Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by the RBS group in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com *** - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: multiple instances of tomcat daemon
mohit.g...@rbs.com wrote: Hi I am using a tomcat server on a Linux machine. Is there any way I can run multiple instances of apache daemon process so that if daemon for environment A do not have access to files for environment B. In short I want to run multiple daemon processes. That's not really what I meant by rephrasing your question. Try again ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: multiple instances of tomcat daemon
On 2/6/2013 1:28 AM, mohit.g...@rbs.com wrote: Hi I am using a tomcat server on a Linux machine. Is there any way I can run multiple instances of apache daemon process so that if daemon for environment A do not have access to files for environment B. In short I want to run multiple daemon processes. Thanks Regards Read RUNNING.txt in the root directory of the downloaded Tomcat bundle. . . . . just my two cents. /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat multiple instances runs as service from same exe file
On 05/01/2012 17:19, Khailovsky, Igor wrote: Hi Jeff, Our application should provide ability to manage the application instances dynamically (runs into separate Tomcat container). One of requirements is using same execution in case multiple instances - option to provide to customer an easy way for update/upgrade Tomcat core. Thanks for your help. I will assume you have read the RUNNING.txt file in your distribution. These are the relevant documentation pages: http://tomcat.apache.org/tomcat-6.0-doc/setup.html#Windows http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html p -Original Message- From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Sent: Thursday, January 05, 2012 17:19 To: 'Tomcat Users List' Subject: RE: Tomcat multiple instances runs as service from same exe file Igor - Since you are using Tomcat 6.x, why not just perform a second install. The latest installer lets you install multiple instances with different names. Each install only takes up 10MB and it is much easier doing it this way than the old way of duplicating folders and running the procrun setups manually. I run several servers this way (5 to 6 instances per server), and it takes a whole lot less effort to maintain than the old way of doing things that I had to use back in the tomcat 5.5.x days. Jeff -Original Message- From: Khailovsky, Igor [mailto:igor.khailov...@verint.com] Sent: Thursday, January 05, 2012 6:01 AM To: users@tomcat.apache.org Subject: RE: Tomcat multiple instances runs as service from same exe file Hello All, How to execute multiple instances of Tomcat server as windows services from same physical location (CATALINA_HOME) without tomcat executable replication? In other words, how to point a Tomcat windows service to specific server.xml (not a default location)? I know that this option is available for Tomcat that was executed from command line. The question is about Tomcat v.6.0 that runs as Windows 2008 service. Thanks! This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e- mail. __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. - 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: Tomcat multiple instances runs as service from same exe file
P- I investigated these documents before asked the question, but did not find relevant answer. If you really know answer for my question, please specify it. -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Friday, January 06, 2012 11:41 To: Tomcat Users List Subject: Re: Tomcat multiple instances runs as service from same exe file On 05/01/2012 17:19, Khailovsky, Igor wrote: Hi Jeff, Our application should provide ability to manage the application instances dynamically (runs into separate Tomcat container). One of requirements is using same execution in case multiple instances - option to provide to customer an easy way for update/upgrade Tomcat core. Thanks for your help. I will assume you have read the RUNNING.txt file in your distribution. These are the relevant documentation pages: http://tomcat.apache.org/tomcat-6.0-doc/setup.html#Windows http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html p -Original Message- From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Sent: Thursday, January 05, 2012 17:19 To: 'Tomcat Users List' Subject: RE: Tomcat multiple instances runs as service from same exe file Igor - Since you are using Tomcat 6.x, why not just perform a second install. The latest installer lets you install multiple instances with different names. Each install only takes up 10MB and it is much easier doing it this way than the old way of duplicating folders and running the procrun setups manually. I run several servers this way (5 to 6 instances per server), and it takes a whole lot less effort to maintain than the old way of doing things that I had to use back in the tomcat 5.5.x days. Jeff -Original Message- From: Khailovsky, Igor [mailto:igor.khailov...@verint.com] Sent: Thursday, January 05, 2012 6:01 AM To: users@tomcat.apache.org Subject: RE: Tomcat multiple instances runs as service from same exe file Hello All, How to execute multiple instances of Tomcat server as windows services from same physical location (CATALINA_HOME) without tomcat executable replication? In other words, how to point a Tomcat windows service to specific server.xml (not a default location)? I know that this option is available for Tomcat that was executed from command line. The question is about Tomcat v.6.0 that runs as Windows 2008 service. Thanks! This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e- mail. __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone
Re: Tomcat multiple instances runs as service from same exe file
2012/1/6 Khailovsky, Igor igor.khailov...@verint.com: P- I investigated these documents before asked the question, but did not find relevant answer. If you really know answer for my question, please specify it. You cannot run multiple services from the same exe. Moreover, the exe file name is used as a key to look up service configuration. So if you have several services all their exe files must have different names regardless of their location. The service launcher is not part of Apache Tomcat project. It is just Apache Commons Daemon. -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Friday, January 06, 2012 11:41 To: Tomcat Users List Subject: Re: Tomcat multiple instances runs as service from same exe file On 05/01/2012 17:19, Khailovsky, Igor wrote: Hi Jeff, Our application should provide ability to manage the application instances dynamically (runs into separate Tomcat container). One of requirements is using same execution in case multiple instances - option to provide to customer an easy way for update/upgrade Tomcat core. Thanks for your help. I will assume you have read the RUNNING.txt file in your distribution. These are the relevant documentation pages: http://tomcat.apache.org/tomcat-6.0-doc/setup.html#Windows http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html p -Original Message- From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Sent: Thursday, January 05, 2012 17:19 To: 'Tomcat Users List' Subject: RE: Tomcat multiple instances runs as service from same exe file Igor - Since you are using Tomcat 6.x, why not just perform a second install. The latest installer lets you install multiple instances with different names. Each install only takes up 10MB and it is much easier doing it this way than the old way of duplicating folders and running the procrun setups manually. I run several servers this way (5 to 6 instances per server), and it takes a whole lot less effort to maintain than the old way of doing things that I had to use back in the tomcat 5.5.x days. Jeff -Original Message- From: Khailovsky, Igor [mailto:igor.khailov...@verint.com] Sent: Thursday, January 05, 2012 6:01 AM To: users@tomcat.apache.org Subject: RE: Tomcat multiple instances runs as service from same exe file Hello All, How to execute multiple instances of Tomcat server as windows services from same physical location (CATALINA_HOME) without tomcat executable replication? In other words, how to point a Tomcat windows service to specific server.xml (not a default location)? I know that this option is available for Tomcat that was executed from command line. The question is about Tomcat v.6.0 that runs as Windows 2008 service. Thanks! This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e- mail. __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] This electronic
RE: Tomcat multiple instances runs as service from same exe file
Hello All, How to execute multiple instances of Tomcat server as windows services from same physical location (CATALINA_HOME) without tomcat executable replication? In other words, how to point a Tomcat windows service to specific server.xml (not a default location)? I know that this option is available for Tomcat that was executed from command line. The question is about Tomcat v.6.0 that runs as Windows 2008 service. Thanks! This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail.
RE: Tomcat multiple instances runs as service from same exe file
Igor - Since you are using Tomcat 6.x, why not just perform a second install. The latest installer lets you install multiple instances with different names. Each install only takes up 10MB and it is much easier doing it this way than the old way of duplicating folders and running the procrun setups manually. I run several servers this way (5 to 6 instances per server), and it takes a whole lot less effort to maintain than the old way of doing things that I had to use back in the tomcat 5.5.x days. Jeff -Original Message- From: Khailovsky, Igor [mailto:igor.khailov...@verint.com] Sent: Thursday, January 05, 2012 6:01 AM To: users@tomcat.apache.org Subject: RE: Tomcat multiple instances runs as service from same exe file Hello All, How to execute multiple instances of Tomcat server as windows services from same physical location (CATALINA_HOME) without tomcat executable replication? In other words, how to point a Tomcat windows service to specific server.xml (not a default location)? I know that this option is available for Tomcat that was executed from command line. The question is about Tomcat v.6.0 that runs as Windows 2008 service. Thanks! This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e- mail. __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat multiple instances runs as service from same exe file
Hi Jeff, Our application should provide ability to manage the application instances dynamically (runs into separate Tomcat container). One of requirements is using same execution in case multiple instances - option to provide to customer an easy way for update/upgrade Tomcat core. Thanks for your help. -Original Message- From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] Sent: Thursday, January 05, 2012 17:19 To: 'Tomcat Users List' Subject: RE: Tomcat multiple instances runs as service from same exe file Igor - Since you are using Tomcat 6.x, why not just perform a second install. The latest installer lets you install multiple instances with different names. Each install only takes up 10MB and it is much easier doing it this way than the old way of duplicating folders and running the procrun setups manually. I run several servers this way (5 to 6 instances per server), and it takes a whole lot less effort to maintain than the old way of doing things that I had to use back in the tomcat 5.5.x days. Jeff -Original Message- From: Khailovsky, Igor [mailto:igor.khailov...@verint.com] Sent: Thursday, January 05, 2012 6:01 AM To: users@tomcat.apache.org Subject: RE: Tomcat multiple instances runs as service from same exe file Hello All, How to execute multiple instances of Tomcat server as windows services from same physical location (CATALINA_HOME) without tomcat executable replication? In other words, how to point a Tomcat windows service to specific server.xml (not a default location)? I know that this option is available for Tomcat that was executed from command line. The question is about Tomcat v.6.0 that runs as Windows 2008 service. Thanks! This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e- mail. __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: running multiple instances of Tomcat on same server
On 4 February 2011 14:27, James Godrej jamesgod...@yahoo.in wrote: I have to run multiple instances of Tomcat. The reason I am doing so is I have a server where I hosted a learning management system known as Sakai which runs on Tomcat 5.5.30 and now on same server I have to host another learning management system known as OLAT. Sakai 2.x makes enough weird modifications to the classloading mechanisms that I wouldn't recommend running *anything* else in the same JVM as it! Hopefully v3 will alleviate some of the worse problems. As per OLAT doc here in Tomcat section http://www.olat.org/docu/install/olat_install_admin_docu_one_page.html it says In situations where more than one instance is required (e.g., multiple cluster nodes on the same host) it is worth setting up each OLAT instance in its own JVM and sharing a common base installation (see Tomcat documentation concerning CATALINA_BASE installations.) Can some one point me where is that given on Tomcat official docs or what is the doc which I gave link above trying to say. In the Tomcat installation root, there's a file called RUNNING.txt. It gives details on how to run multiple instances of Tomcat side-by-side. In essence, you copy the directories that are per-Tomcat (conf, work, webapps etc.) and leave the read-only directories (bin etc) in one place. Chuck's point is important. Each Tomcat instance will need a unique endpoint for its shutdown port and each connector - you can't run both on port 80 on the same IP address unless you use some kind of reverse proxy (there are many options here). - Peter
Re: Security question about Multiple instances of Tomcat running as non-admin users on a single box
Our decision to replace the Mac os Xservers with Windows is purely financial. We already run our software on Windows and though Linux would be a good choice it is less expensive to support a single platform. We run as many as 15 apps on a single xServe box. The corresponding Oracle 10g databases run on a separate server. Everything is automated. Start up, shutdown, updates etc. are scripted and executed using sudo. Each app runs as a non-admin user and is secure and isolated from the other apps running on that box. The more I discuss this it appears to be more of an OS question than a tomcat question. Someone suggested a pilot program. We are currently replicating our multi-app server configuration on a windows box...trust but verify. Thanks to everyone for their replies on this question. Guy On 1/22/11 2:23 AM, Brett Delle Grazie brett.dellegra...@gmail.com wrote: On 21 January 2011 19:29, Jeffrey Janner jeffrey.jan...@polydyne.com wrote: Guy - Why switch to Windows when you can still get OSX Server for Mac Pros or Minis? Why run Windows at all when you can switch to Linux and have all the command line goodness you were used to in Xserver? ;) That out of the way, Tomcat works basically the same on Windows as on Mac, except where running as a service is concerned. Yes, Tomcat will respect Windows permission settings, etc., just like any other Windows app. It should run under a non-admin account. You might have some issues allowing non-admins to start/stop the service however - if that is in your requirements. When all else fails, get you a Windows box and set Tomcat up as you'd like on it and see what problems occur when you try to use it the way you do now. It's called a pilot program. Jeff -Original Message- From: Guy Pontecorvo [mailto:guy.ponteco...@pearson.com] Sent: Friday, January 21, 2011 11:56 AM To: users@tomcat.apache.org Subject: Security question about Multiple instances of Tomcat running as non-admin users on a single box We currently run multiple instances of tomcat Version 6.0.20, each in its own non-admin user account under Mac OSX 10.5. This has been a great way to host multiple web applications (student information systems) on a single box. Each app is secure in its own user account space and can't read or write outside of its user directory. An administrator can manage them as a whole using sudo. Because Xserve is being discontinued we are considering the possibility of migrating our environment to Windows 2008 R2 We can create the users, run windows services using the credentials as a local user, name the service whatever we'd like, and stop, start it by that name via scripts. The biggest gotchas I can think of is can we get tomcat to run as a non-admin user and will tomcat respect ntfs file system permissions that should be setup for separate logs, temp files, etc.? We have too many instances to consider running each hosted app in its own vm. Thanks in advance for any advice or experience you can share. Guy Pontecorvo Engineering Manager School Systems 10911 White Rock Road Rancho Cordova, CA 95630 O: (916) 288-1804 M: (530) 701-8842 E: guy.ponteco...@pearson.com Pearson Always Learning Learn more at http://www.pearson.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - 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
Re: Security question about Multiple instances of Tomcat running as non-admin users on a single box
Hi, On 25 January 2011 18:00, Guy Pontecorvo guy.ponteco...@pearson.com wrote: We run as many as 15 apps on a single xServe box. The corresponding Oracle 10g databases run on a separate server. Everything is automated. Start up, shutdown, updates etc. are scripted and executed using sudo. Each app runs as a non-admin user and is secure and isolated from the other apps running on that box. For this reason alone I would use Linux. From what you have said, it should be near trivial to move your 15 apps from Xserve to Linux whereas to Windows you're going to have to configure everything again (separate user accounts, separate instances etc). Both solutions are feasible, it just depends upon: (a) the amount of work you want to do and (b) the experience you have with both operating systems. Good luck. -- Best Regards, Brett Delle Grazie - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Security question about Multiple instances of Tomcat running as non-admin users on a single box
On 21 January 2011 19:29, Jeffrey Janner jeffrey.jan...@polydyne.com wrote: Guy - Why switch to Windows when you can still get OSX Server for Mac Pros or Minis? Why run Windows at all when you can switch to Linux and have all the command line goodness you were used to in Xserver? ;) That out of the way, Tomcat works basically the same on Windows as on Mac, except where running as a service is concerned. Yes, Tomcat will respect Windows permission settings, etc., just like any other Windows app. It should run under a non-admin account. You might have some issues allowing non-admins to start/stop the service however - if that is in your requirements. When all else fails, get you a Windows box and set Tomcat up as you'd like on it and see what problems occur when you try to use it the way you do now. It's called a pilot program. Jeff -Original Message- From: Guy Pontecorvo [mailto:guy.ponteco...@pearson.com] Sent: Friday, January 21, 2011 11:56 AM To: users@tomcat.apache.org Subject: Security question about Multiple instances of Tomcat running as non-admin users on a single box We currently run multiple instances of tomcat Version 6.0.20, each in its own non-admin user account under Mac OSX 10.5. This has been a great way to host multiple web applications (student information systems) on a single box. Each app is secure in its own user account space and can't read or write outside of its user directory. An administrator can manage them as a whole using sudo. Because Xserve is being discontinued we are considering the possibility of migrating our environment to Windows 2008 R2 We can create the users, run windows services using the credentials as a local user, name the service whatever we'd like, and stop, start it by that name via scripts. The biggest gotchas I can think of is can we get tomcat to run as a non-admin user and will tomcat respect ntfs file system permissions that should be setup for separate logs, temp files, etc.? We have too many instances to consider running each hosted app in its own vm. Thanks in advance for any advice or experience you can share. Guy Pontecorvo Engineering Manager School Systems 10911 White Rock Road Rancho Cordova, CA 95630 O: (916) 288-1804 M: (530) 701-8842 E: guy.ponteco...@pearson.com Pearson Always Learning Learn more at http://www.pearson.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Best Regards, Brett Delle Grazie - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Security question about Multiple instances of Tomcat running as non-admin users on a single box
Guy Pontecorvo schrieb am 21.01.2011 um 09:56 (-0800): We currently run multiple instances of tomcat Version 6.0.20, each in its own non-admin user account under Mac OSX 10.5. This has been a great way to host multiple web applications (student information systems) on a single box. Each app is secure in its own user account space and can't read or write outside of its user directory. But at the end of your message you write: We have too many instances to consider running each hosted app in its own vm. Well, why would you want to do that anyway? To increase application isolation? So do you have, say, three Tomcats, each in its own JVM, running under a user account of your choice, and each hosting, say, five apps? The biggest gotchas I can think of is can we get tomcat to run as a non-admin user and will tomcat respect ntfs file system permissions that should be setup for separate logs, temp files, etc.? Of course you can run Tomcat as non-admin. NTFS permissions is not something Tomcat may choose to respect or ignore, but something that is forced upon Tomcat by the OS. -- Michael Ludwig - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Security question about Multiple instances of Tomcat running as non-admin users on a single box
On 1/21/11 5:56 PM, Guy Pontecorvo wrote: Because Xserve is being discontinued we are considering the possibility of migrating our environment to Windows 2008 R2 The JDK tools have a few more small functions on *nix than Windows - small but rather useful. This IMHO, is one key reason to stick with the same ancestry you have now. p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Security question about Multiple instances of Tomcat running as non-admin users on a single box
We currently run multiple instances of tomcat Version 6.0.20, each in its own non-admin user account under Mac OSX 10.5. This has been a great way to host multiple web applications (student information systems) on a single box. Each app is secure in its own user account space and can't read or write outside of its user directory. An administrator can manage them as a whole using sudo. Because Xserve is being discontinued we are considering the possibility of migrating our environment to Windows 2008 R2 We can create the users, run windows services using the credentials as a local user, name the service whatever we'd like, and stop, start it by that name via scripts. The biggest gotchas I can think of is can we get tomcat to run as a non-admin user and will tomcat respect ntfs file system permissions that should be setup for separate logs, temp files, etc.? We have too many instances to consider running each hosted app in its own vm. Thanks in advance for any advice or experience you can share. Guy Pontecorvo Engineering Manager School Systems 10911 White Rock Road Rancho Cordova, CA 95630 O: (916) 288-1804 M: (530) 701-8842 E: guy.ponteco...@pearson.com Pearson Always Learning Learn more at http://www.pearson.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Security question about Multiple instances of Tomcat running as non-admin users on a single box
Guy - Why switch to Windows when you can still get OSX Server for Mac Pros or Minis? That out of the way, Tomcat works basically the same on Windows as on Mac, except where running as a service is concerned. Yes, Tomcat will respect Windows permission settings, etc., just like any other Windows app. It should run under a non-admin account. You might have some issues allowing non-admins to start/stop the service however - if that is in your requirements. When all else fails, get you a Windows box and set Tomcat up as you'd like on it and see what problems occur when you try to use it the way you do now. It's called a pilot program. Jeff -Original Message- From: Guy Pontecorvo [mailto:guy.ponteco...@pearson.com] Sent: Friday, January 21, 2011 11:56 AM To: users@tomcat.apache.org Subject: Security question about Multiple instances of Tomcat running as non-admin users on a single box We currently run multiple instances of tomcat Version 6.0.20, each in its own non-admin user account under Mac OSX 10.5. This has been a great way to host multiple web applications (student information systems) on a single box. Each app is secure in its own user account space and can't read or write outside of its user directory. An administrator can manage them as a whole using sudo. Because Xserve is being discontinued we are considering the possibility of migrating our environment to Windows 2008 R2 We can create the users, run windows services using the credentials as a local user, name the service whatever we'd like, and stop, start it by that name via scripts. The biggest gotchas I can think of is can we get tomcat to run as a non-admin user and will tomcat respect ntfs file system permissions that should be setup for separate logs, temp files, etc.? We have too many instances to consider running each hosted app in its own vm. Thanks in advance for any advice or experience you can share. Guy Pontecorvo Engineering Manager School Systems 10911 White Rock Road Rancho Cordova, CA 95630 O: (916) 288-1804 M: (530) 701-8842 E: guy.ponteco...@pearson.com Pearson Always Learning Learn more at http://www.pearson.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 performance multiple instances
On 12/9/10 9:04 PM, John Goodleaf wrote: Google is giving me too many different answers! I need to serve a single webapp to a lot of people with acceptable latency. There's no need for multiple contexts or any other funkines. Tomcat 6, JVM 1.6x. I have a hardware load balancer and two 64-bit machines (Windows 2003 Server--not my choice, yes I'd have preferred Linux) each with two CPUs and 8GB RAM. I also have a consultant who insists we need to set up at least two, possibly more, instances of Tomcat on each machine for good performance. I'm late to this thread, but I'd still be interested to hear the reasoning behind the above. There are (largely historical) reasons for doing this for some setups, but I don't see it as required/standard practice for high performance sites. (Maybe we don't know enough about your environment.) p I'm more inclined to think that a single instance with tuned Java options will provide the same performance, but be easier to set up and maintain. If I needed to serve different webapps or somehow needed to separate things for some reason, I could see it, but given just the one app/context. it seems like multiple instances really amounts to second-guessing the OS scheduler. Also notable: the servers are VMs. Anyway, I'd appreciate advice, and I don't mind being wrong if you need to side with the consultant. If it needs to be complicated to go fast, then that's what we'll do... Ideally, I'd try both ways and hit it with JMeter, but I lack the time and resources (because mgmt spent the money on our consultant). So I must beg for answers here... Thanks in advance. J 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: Tomcat 6 performance multiple instances
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 12/9/2010 11:09 PM, Caldarale, Charles R wrote: I'm also very, very interested in the exact cause for the improvement observed with multiple JVMs using another servlet container - which may have no applicability to Tomcat. Glad to see someone else is skeptical. I wonder what the environment was, too: the JRE version is very sensitive: older versions of the runtime were much slower for even uncontended locks, etc. and of course GC gets better with every release. - -chris It's worse than that - the compressed OOPs are relative as well, so it's an add and a shift. However, if you keep the heap size down (so that direct 32-bit pointers are used), that extra overhead is eliminated - but now you're constrained by a small heap. I hadn't thought of them being relative, but I guess the OS is obviously doing some virtual memory mapping as well. Heh... running a 32-bit JVM will certainly speed-up memory access, as long as you're willing to live inside a 1.6GiB heap :) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0CcvAACgkQ9CaO5/Lv0PBw7wCggidq59l99UqxGuTRao1rLbtI tvgAn2QXNYOHwEOo6tjCsEgeUrwTeYwn =kA2h -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 6 performance multiple instances
Google is giving me too many different answers! I need to serve a single webapp to a lot of people with acceptable latency. There's no need for multiple contexts or any other funkines. Tomcat 6, JVM 1.6x. I have a hardware load balancer and two 64-bit machines (Windows 2003 Server--not my choice, yes I'd have preferred Linux) each with two CPUs and 8GB RAM. I also have a consultant who insists we need to set up at least two, possibly more, instances of Tomcat on each machine for good performance. I'm more inclined to think that a single instance with tuned Java options will provide the same performance, but be easier to set up and maintain. If I needed to serve different webapps or somehow needed to separate things for some reason, I could see it, but given just the one app/context. it seems like multiple instances really amounts to second-guessing the OS scheduler. Also notable: the servers are VMs. Anyway, I'd appreciate advice, and I don't mind being wrong if you need to side with the consultant. If it needs to be complicated to go fast, then that's what we'll do... Ideally, I'd try both ways and hit it with JMeter, but I lack the time and resources (because mgmt spent the money on our consultant). So I must beg for answers here... Thanks in advance. J
Re: Tomcat 6 performance multiple instances
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John, On 12/9/2010 4:04 PM, John Goodleaf wrote: Google is giving me too many different answers! :( I need to serve a single webapp to a lot of people with acceptable latency. That ought to be possible. What is acceptable latency for your system? Do you just want to get byte 1 as fast as possible? Or do you mean that you want total response times to be acceptable? There's no need for multiple contexts or any other funkines. Tomcat 6, JVM 1.6x. I have a hardware load balancer and two 64-bit machines (Windows 2003 Server--not my choice, yes I'd have preferred Linux) each with two CPUs and 8GB RAM. Sounds good. You didn't mention what kinds of CPUs you have. Since they are 64-bit, they are probably of reasonably recent manufacture. I also have a consultant who insists we need to set up at least two, possibly more, instances of Tomcat on each machine for good performance. At this point, I'm skeptical of that argument, though under certain conditions it might make sense. I'm more inclined to think that a single instance with tuned Java options will provide the same performance, but be easier to set up and maintain. I agree with you thus far -- without any other requirements being indicated. If I needed to serve different webapps or somehow needed to separate things for some reason, I could see it, but given just the one app/context. it seems like multiple instances really amounts to second-guessing the OS scheduler. Not really, since the threads in one instance aren't that different than the threads in multiple instances. What you're doing is limiting the effectiveness of things like VM-based synchronization, etc. Also notable: the servers are VMs. Hmm... which one? Some of them have terrible performance under certain conditions. For instance, we have some OpenVZ instances that have horrible I/O performance, stalls, etc. while the CPU seems to be great. Anyway, I'd appreciate advice, and I don't mind being wrong if you need to side with the consultant. If it needs to be complicated to go fast, then that's what we'll do... Ideally, I'd try both ways and hit it with JMeter, but I lack the time and resources (because mgmt spent the money on our consultant). So I must beg for answers here... Honestly, benchmarking should be the root of all your decisions when performance is concerned. A couple of thoughts on the whole thing: Each JVM has a minimum amount of memory under which it can possible operate. Running multiple JVMs (as opposed to a single one) on a single machine will inflate the amount of memory required for the whole system with no perceivable benefit in and of itself. If your consultant tells you that the garbage collector will have to work less, he or she is right in that each JVM will (likely) have fewer objects to deal with but then you've got two (or more) GCs operating on the same set of CPUs, so it's basically a wash. Since Java is greedy about memory, it's generally best to give the JVM as much memory as you can afford to. If you split a JVM into two JVMs, you're lowering the ceiling of each JVM's max memory and potentially opening yourself up to an OutOfMemoryError if you have certain operations that require lots of memory. This is a very tough thing to get a handle on, since any operation that could potentially take down a small JVM can certainly take down a big one, too. But, if the memory-heavy operations are relatively infrequent, or you can limit the number of simultaneous memory-heavy operations, you can have more of them running in one big heap than in two (or more) smaller ones. Monitor locks (aka synchronization) can be improved by running multiple JVMs. Let's say you have a shared resource that is very popular. One obvious example is a database connection pool. If you have, say, 1000 threads actively requesting connections from that pool, contention is relatively high for the lock that protects the integrity of the pool regardless of the size of the pool. If you split into two JVMs, then you only have (on average) 500 active threads fighting for the lock, and you may see performance improve slightly. There is another edge to that sword, though: you are likely to sacrifice any performance gains with (somewhat) limited contention by putting another component in front of Tomcat to decide which JVM handles the request. If you have an unstable application, running additional JVMs (that is, more than your hardware and/or network setup requires) can help alleviate those stability problems: instead of 1/2 of your users getting their sessions expired because the webapp and/or JVM crashed, you might be able to get away with 1/4 or 1/8 of your users being interrupted. That's only a stop-gap solution, though: you should fix your webapp :) Finally, if you are running a fault-tolerant website with all the bells-and-whistles, you are probably using either distributable sessions or something reasonably comparable
Re: Tomcat 6 performance multiple instances
Hi, I have done alot of work with another servlet container and your consultant is correct. More instances do make a difference. Mainly because certain resources like ports/threads and memory management for the heap it makes sense. But you still need to test to determine what works best. I agree about the context funkyness. Been there done that. I went from 2 cpu to 6 cpu (AMD not Intel) and then tuned my html page size and that made a huge difference. My own IT group was floored by the performance. My web service response times are down in the 1.5msec range using Tomcat and APR. I used to have around 1msec but I think the CPU management and added cpu count caused that to happen. Remember to turn off services you do not need and use NUMA and any other settings that might help like operand compression for the 64-bit jvm if you use it. Regards, Tony Anecito Founder/CEO MyUniPortal (2010 JavaOne Dukes award) http://www.myuniportal.com - Original Message From: John Goodleaf j...@goodleaf.net To: users@tomcat.apache.org Sent: Thu, December 9, 2010 2:04:16 PM Subject: Tomcat 6 performance multiple instances Google is giving me too many different answers! I need to serve a single webapp to a lot of people with acceptable latency. There's no need for multiple contexts or any other funkines. Tomcat 6, JVM 1.6x. I have a hardware load balancer and two 64-bit machines (Windows 2003 Server--not my choice, yes I'd have preferred Linux) each with two CPUs and 8GB RAM. I also have a consultant who insists we need to set up at least two, possibly more, instances of Tomcat on each machine for good performance. I'm more inclined to think that a single instance with tuned Java options will provide the same performance, but be easier to set up and maintain. If I needed to serve different webapps or somehow needed to separate things for some reason, I could see it, but given just the one app/context. it seems like multiple instances really amounts to second-guessing the OS scheduler. Also notable: the servers are VMs. Anyway, I'd appreciate advice, and I don't mind being wrong if you need to side with the consultant. If it needs to be complicated to go fast, then that's what we'll do... Ideally, I'd try both ways and hit it with JMeter, but I lack the time and resources (because mgmt spent the money on our consultant). So I must beg for answers here... Thanks in advance. J - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 performance multiple instances
On Thu, Dec 9, 2010 at 1:28 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John, On 12/9/2010 4:04 PM, John Goodleaf wrote: Google is giving me too many different answers! :( I need to serve a single webapp to a lot of people with acceptable latency. That ought to be possible. What is acceptable latency for your system? Do you just want to get byte 1 as fast as possible? Or do you mean that you want total response times to be acceptable? I guess that IS a bit vague. I think the measure the users will use implicitly is page turn. Total response time, in other words. There's no need for multiple contexts or any other funkines. Tomcat 6, JVM 1.6x. I have a hardware load balancer and two 64-bit machines (Windows 2003 Server--not my choice, yes I'd have preferred Linux) each with two CPUs and 8GB RAM. Sounds good. You didn't mention what kinds of CPUs you have. Since they are 64-bit, they are probably of reasonably recent manufacture. They are VM, so, fake 2.4Ghz Xeon I also have a consultant who insists we need to set up at least two, possibly more, instances of Tomcat on each machine for good performance. At this point, I'm skeptical of that argument, though under certain conditions it might make sense. I'm more inclined to think that a single instance with tuned Java options will provide the same performance, but be easier to set up and maintain. I agree with you thus far -- without any other requirements being indicated. If I needed to serve different webapps or somehow needed to separate things for some reason, I could see it, but given just the one app/context. it seems like multiple instances really amounts to second-guessing the OS scheduler. Not really, since the threads in one instance aren't that different than the threads in multiple instances. What you're doing is limiting the effectiveness of things like VM-based synchronization, etc. Also notable: the servers are VMs. VMWare ESX. I do not know exactly which ESX version (hosting provider walls this off...). Hmm... which one? Some of them have terrible performance under certain conditions. For instance, we have some OpenVZ instances that have horrible I/O performance, stalls, etc. while the CPU seems to be great. Anyway, I'd appreciate advice, and I don't mind being wrong if you need to side with the consultant. If it needs to be complicated to go fast, then that's what we'll do... Ideally, I'd try both ways and hit it with JMeter, but I lack the time and resources (because mgmt spent the money on our consultant). So I must beg for answers here... Honestly, benchmarking should be the root of all your decisions when performance is concerned. I agree and wish I had the time and resources to do it. I need to deploy on very short timelines. There actually was a performance testing phase budgeted, but it got killed after the business owner dragged her feet on requirements early in the project. Not that I'm bitter or anything... A couple of thoughts on the whole thing: Each JVM has a minimum amount of memory under which it can possible operate. Running multiple JVMs (as opposed to a single one) on a single machine will inflate the amount of memory required for the whole system with no perceivable benefit in and of itself. If your consultant tells you that the garbage collector will have to work less, he or she is right in that each JVM will (likely) have fewer objects to deal with but then you've got two (or more) GCs operating on the same set of CPUs, so it's basically a wash. Since Java is greedy about memory, it's generally best to give the JVM as much memory as you can afford to. If you split a JVM into two JVMs, you're lowering the ceiling of each JVM's max memory and potentially opening yourself up to an OutOfMemoryError if you have certain operations that require lots of memory. This is a very tough thing to get a handle on, since any operation that could potentially take down a small JVM can certainly take down a big one, too. But, if the memory-heavy operations are relatively infrequent, or you can limit the number of simultaneous memory-heavy operations, you can have more of them running in one big heap than in two (or more) smaller ones. The application in question is pretty damned fat. It's typical corporate bloatware (it's an interface to Documentum). However, there aref ew operations that are noticeably more memory intensive than others. Many parts of the app actually rely on pushing an applet to the client. There are several of these applets, each relatively small, and they account for about 1 in 25 transactions based on my admittedly sketchy profiling. (User operation profiling; I have not profiled the code.) Monitor locks (aka synchronization) can be improved by running multiple JVMs. Let's say you have a shared resource that is very popular. One
Re: Tomcat 6 performance multiple instances
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John, On 12/9/2010 5:15 PM, John Goodleaf wrote: I agree [about benchmarking] and wish I had the time and resources to do it. I need to deploy on very short timelines. There actually was a performance testing phase budgeted, but it got killed after the business owner dragged her feet on requirements early in the project. Not that I'm bitter or anything... So... there was a benchmarking stage planned, but it's been bagged in favor of a consultant who simply tells you how to improve performance without any way to verify that the improvements are accomplishing anything? The application in question is pretty damned fat. It's typical corporate bloatware (it's an interface to Documentum). However, there are few operations that are noticeably more memory intensive than others. Many parts of the app actually rely on pushing an applet to the client. There are several of these applets, each relatively small, and they account for about 1 in 25 transactions based on my admittedly sketchy profiling. (User operation profiling; I have not profiled the code.) Pushing an applet to a client should be roughly equivalent to the client downloading static content. Are you saying that those transactions are minimal (/only/ 1 in 25) or quite frequent? There is a pool as you describe, and it will be a big, deep pool. The other edge probably applies though. How many simultaneous requests do you expect to service at any one point? The connection pool only needs to be (roughly) that big. Also, you can't possibly use more db connections than the (sum of) maxActive setting(s) on your Connector(s) in a single Tomcat instance. How big are we talking? The good part about synchronization on something like a db connection pool is that only the borrow/return operations are synchronized... the duration of the borrow is not relevant to performance -- except that obviously connection unavailability for other requests might be an issue. If you have a big enough pool, though, then you shouldn't be worried about that. The app is fairly stable. However, it requires IE 6 or 7 (don't blame me) and insofar as I've seen stability problems, it has more to do with IE. In other words, on the vast majority of hangs/freezes/whathaveyou, the server logs show no problem at all. The catch is on the IE side. In any case, I don't anticipate crashing JVMs. So, your clients crash but the server hums along? I guess if MSIE is the client platform, that's the best you can do :) (To be fair, MSIE 9 looks great... finally. It only took Microsoft 4 versions to get MSIE to be good again.) I'll see what I can get him to cough up. My suspicion is that he's repeating a formula arrived at long, long ago by a guy who doesn't work there any longer. I have not observed him to possess any special skills in the Apache/Tomcat arenas. If he tells you to change all your StringBuffers to StringBuilders then you know he's just wasting your time ;) Thanks for your well written and thoughtful response. Can I hire you as a consultant? If you're serious, contact me off-list if you need anything specific. I'm willing to give general advice for free on the list. ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0BkM8ACgkQ9CaO5/Lv0PDTSwCfe071+s3ijKMckFo+2qQXUYOL 7IoAn2aZ/48ujp42XbJ98UmIr1ZlssO3 =7dyR -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 performance multiple instances
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tony, On 12/9/2010 5:15 PM, Tony Anecito wrote: I have done alot of work with another servlet container and your consultant is correct. More instances do make a difference. Mainly because certain resources like ports/threads and memory management for the heap it makes sense. Ports shouldn't be an issue, though dispatching requests to threads could be depending on the connector in use. Can you give us an example of the resource contention you saw drop dramatically with a simple JVM split? I'm not sold on the heap: if you have two GC processes running in parallel (that is, in separate JVMs) I'm not convinced that you are saving yourself any CPU time. Sure, the CPU time required in a single JVM might drop in half, but then you double the number of JVMs so you're back where you started. What kind of GC were you using? But you still need to test to determine what works best. Thank you for saying that, regardless of any other comments ;) I agree about the context funkyness. Been there done that. I went from 2 cpu to 6 cpu (AMD not Intel) and then tuned my html page size and that made a huge difference. My own IT group was floored by the performance. My web service response times are down in the 1.5msec range using Tomcat and APR. I used to have around 1msec but I think the CPU management and added cpu count caused that to happen. Please clarify: did you simply get a bigger box and experience leaps and bounds of performance increases, or are you saying that you got a bigger box /and/ split into multiple JVMs? I just want to be clear... in your first paragraph above, you said that John's consultant was right and were very vague about why things might go faster. In the second paragraph, you talk about upgrading memory and tweaking application settings and /then/ the IT folks were happy with the performance characteristics you observed. Were these two separate incidents, or was everything together? It's just not that surprising to me that tripling the number of CPUs would improve your webapp's performance -- though most applications are /not/ CPU bound in my experience. Remember to turn off services you do not need and use NUMA and any other settings that might help Using NUMA-aware GC would probably help. like operand compression for the 64-bit jvm if you use it. Er, do you mean compressed OOPs? I think that will actually slow things down, since it requires an extra ADD (more likely SHIFT) operation to decode each OOP when referencing the associated object. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0BoDEACgkQ9CaO5/Lv0PCC7ACfdOoID8pktL/L0zYboY9MEvNo l8cAn35NZTxMIqRI56LXNAhxStvwx5w9 =6Y5h -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6 performance multiple instances
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Tomcat 6 performance multiple instances I'm not sold on the heap: if you have two GC processes running in parallel (that is, in separate JVMs) I'm not convinced that you are saving yourself any CPU time. Sure, the CPU time required in a single JVM might drop in half, but then you double the number of JVMs so you're back where you started. What kind of GC were you using? There's also the issue of doubling the number of other daemon threads the JVM uses internally, such as the compiler threads, finalizer, reference handler, etc. They don't use much time, but they do take up resources. I'm also very, very interested in the exact cause for the improvement observed with multiple JVMs using another servlet container - which may have no applicability to Tomcat. Using NUMA-aware GC would probably help. Not available on Windows. Er, do you mean compressed OOPs? I think that will actually slow things down, since it requires an extra ADD (more likely SHIFT) operation to decode each OOP when referencing the associated object. It's worse than that - the compressed OOPs are relative as well, so it's an add and a shift. However, if you keep the heap size down (so that direct 32-bit pointers are used), that extra overhead is eliminated - but now you're constrained by a small heap. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: multiple instances on a server
On Saturday 28 August 2010 00:11:11 Rainer Jung wrote: On 27.08.2010 21:58, Wesley Acheson wrote: On Fri, Aug 27, 2010 at 9:41 PM, Pidp...@pidster.com wrote: On 27/08/2010 18:51, Wesley Acheson wrote: I think the reason for doing this in ruby is that ruby is single threaded, I've been told. The JVM isn't. Adding unqualified rumors: Ruby is not single-threaded, Right - the language has a thread concept that can be explored as true multi- threading by interpreters. But the original C-based ruby interpreters for do have a global interpreter lock that causes only one native thread to be running within one ruby process. This makes these interpreters effectively single threaded. (Ruby up to 1.8 only used 1 native thread at all, Ruby 1.9 maps ruby threads to multiple native threads, but still has the global interpreter lock.) but the Rails framework has a huge lock that effectively make the biggest part of request handling serialized. Usually Ruby webapps are based on Rails. So yes, Ruby on Rails needs multiple server processes in parallel to effectively scale. That might be an outdated rumor though. It is in so far outdated that Rails from 2.3 on has a threadsafe configuration option that enables multi-threaded request processing. This needs a multi- threaded runtime though to make any sense. JRuby is (of course) multi- threaded, I'm not sure if there is any other Ruby interpreter that is multi- threaded. Regards, Rainer Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
multiple instances on a server
Hi, If you have a server with 15 GB of ram (or any large number for arguments sake), does it ever make sense to run multiple instances of tomcat on the same server? (serving http requests for the same web application) Or can a single instance utilize all the server resources just fine efficiently? The reason I am asking is that I have read that those hosting ruby on rails, or python web applications usually run multiple instances of their respective web server, each running on its own port, and then proxied using haproxy or the like.
Re: multiple instances on a server
On 27/08/2010 17:57, S Ahmed wrote: Hi, If you have a server with 15 GB of ram (or any large number for arguments sake), does it ever make sense to run multiple instances of tomcat on the same server? (serving http requests for the same web application) If you have a 64bit JVM, probably not. Or can a single instance utilize all the server resources just fine efficiently? If you have a 64bit JVM, probably. The reason I am asking is that I have read that those hosting ruby on rails, or python web applications usually run multiple instances of their respective web server, each running on its own port, and then proxied using haproxy or the like. Each having separate resource (DB) pools, which must make managing them a tad tricky. Or maybe that's not a consideration... p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
RE: multiple instances on a server
The only reasons I have ever come up with are all operations-related, not techincal. For example, different maintenance windows requirements get different Tomcat instances. -Original Message- From: S Ahmed [mailto:sahmed1...@gmail.com] Sent: Friday, August 27, 2010 11:57 AM To: users@tomcat.apache.org Subject: multiple instances on a server Hi, If you have a server with 15 GB of ram (or any large number for arguments sake), does it ever make sense to run multiple instances of tomcat on the same server? (serving http requests for the same web application) Or can a single instance utilize all the server resources just fine efficiently? The reason I am asking is that I have read that those hosting ruby on rails, or python web applications usually run multiple instances of their respective web server, each running on its own port, and then proxied using haproxy or the like. __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: multiple instances on a server
I think the reason for doing this in ruby is that ruby is single threaded, I've been told. The JVM isn't. This is of course muddied with Jruby. http://stackoverflow.com/questions/3086467/confused-are-languages-like-python-ruby-single-threaded-unlike-say-java-for Anyway I don't see any reason you should need to install two instances. I believe that they'll both end up running in the same JVM also but again could be wrong. On Fri, Aug 27, 2010 at 6:57 PM, S Ahmed sahmed1...@gmail.com wrote: Hi, If you have a server with 15 GB of ram (or any large number for arguments sake), does it ever make sense to run multiple instances of tomcat on the same server? (serving http requests for the same web application) Or can a single instance utilize all the server resources just fine efficiently? The reason I am asking is that I have read that those hosting ruby on rails, or python web applications usually run multiple instances of their respective web server, each running on its own port, and then proxied using haproxy or the like. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: multiple instances on a server
From: Wesley Acheson [mailto:wesley.ache...@gmail.com] Subject: Re: multiple instances on a server I believe that they'll both end up running in the same JVM also but again could be wrong. No, separate Tomcat instances would run in separate JVM instances (processes). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: multiple instances on a server
On 27/08/2010 18:51, Wesley Acheson wrote: I think the reason for doing this in ruby is that ruby is single threaded, I've been told. The JVM isn't. I'm raising an eyebrow. This is of course muddied with Jruby. http://stackoverflow.com/questions/3086467/confused-are-languages-like-python-ruby-single-threaded-unlike-say-java-for Anyway I don't see any reason you should need to install two instances. I believe that they'll both end up running in the same JVM also but again could be wrong. [ ] Correct [x] Incorrect Not unless you deliberately configure two Service instances in server.xml. Which would be unusual probably self-defeating, if the goal was separate JVMs. p On Fri, Aug 27, 2010 at 6:57 PM, S Ahmed sahmed1...@gmail.com wrote: Hi, If you have a server with 15 GB of ram (or any large number for arguments sake), does it ever make sense to run multiple instances of tomcat on the same server? (serving http requests for the same web application) Or can a single instance utilize all the server resources just fine efficiently? The reason I am asking is that I have read that those hosting ruby on rails, or python web applications usually run multiple instances of their respective web server, each running on its own port, and then proxied using haproxy or the like. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: multiple instances on a server
On Fri, Aug 27, 2010 at 9:41 PM, Pid p...@pidster.com wrote: On 27/08/2010 18:51, Wesley Acheson wrote: I think the reason for doing this in ruby is that ruby is single threaded, I've been told. The JVM isn't. I'm raising an eyebrow. Huh? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: multiple instances on a server
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ahmed, On 8/27/2010 12:57 PM, S Ahmed wrote: If you have a server with 15 GB of ram (or any large number for arguments sake), does it ever make sense to run multiple instances of tomcat on the same server? (serving http requests for the same web application) If you want complete isolation between the webapps, then it might make sense to run separate instances of Tomcat. We do this in production so we can bring one instance of Tomcat down without disturbing the others. It also allows us to mix/match JVM and Tomcat versions between the webapps. Or can a single instance utilize all the server resources just fine efficiently? Generally, yes. As Pid points out, you'll need a 64-bit JVM to use all that RAM. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkx4NTIACgkQ9CaO5/Lv0PAUtgCfVAP0tqKzanVsInqR59GfsV9f QmcAoIrUsKwbdD526Fg6RecxZDX5/tYE =YNo3 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: multiple instances on a server
On 27.08.2010 21:58, Wesley Acheson wrote: On Fri, Aug 27, 2010 at 9:41 PM, Pidp...@pidster.com wrote: On 27/08/2010 18:51, Wesley Acheson wrote: I think the reason for doing this in ruby is that ruby is single threaded, I've been told. The JVM isn't. I'm raising an eyebrow. Huh? Adding unqualified rumors: Ruby is not single-threaded, but the Rails framework has a huge lock that effectively make the biggest part of request handling serialized. Usually Ruby webapps are based on Rails. So yes, Ruby on Rails needs multiple server processes in parallel to effectively scale. That might be an outdated rumor though. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Multiple instances using catalina.base
Hello there! I've followed the instructions on RUNNING.TXT and a great presentation by Mark Thomas and Filip Hanik I've found on the net. But after creating a directory structure: /tomcat-6.0.20 {catalina_home} - bin - conf - webapps -work - temp - lib - logs - instance-01 {catalina_base} -bin -logs -conf -webapps -temp -work I've just added server.xml and catalina.properties to conf, and setenv.sh to bin of my catalina_base instance. But after exporting the CATALINA_BASE and running startup.sh: Using CATALINA_BASE: /home/vinicius/java/apache-tomcat-6.0.20/instance-01 Using CATALINA_HOME: /home/vinicius/java/apache-tomcat-6.0.20 Using CATALINA_TMPDIR: /home/vinicius/java/apache-tomcat-6.0.20/instance-01/temp Using JRE_HOME: /usr/lib/jvm/java-6-sun I get this at my catalina.out java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390) Can't figure out what am I doing wrong. I don't think I need to copy lib folder. Any ideas? Regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple instances using catalina.base
Does your CATALINA_BASE's catalina.properties file have completely stock settings? What is common.loader set to in there? It appears that you have it set up right, and your startup output shows good environment variable and Java values. You should not need to copy the CATALINA_HOME/lib dir into your CATALINA_BASE. -- Jason Brittain On Thu, Oct 1, 2009 at 11:57 AM, Vinicius Carvalho java.vinic...@gmail.comwrote: Hello there! I've followed the instructions on RUNNING.TXT and a great presentation by Mark Thomas and Filip Hanik I've found on the net. But after creating a directory structure: /tomcat-6.0.20 {catalina_home} - bin - conf - webapps -work - temp - lib - logs - instance-01 {catalina_base} -bin -logs -conf -webapps -temp -work I've just added server.xml and catalina.properties to conf, and setenv.sh to bin of my catalina_base instance. But after exporting the CATALINA_BASE and running startup.sh: Using CATALINA_BASE: /home/vinicius/java/apache-tomcat-6.0.20/instance-01 Using CATALINA_HOME: /home/vinicius/java/apache-tomcat-6.0.20 Using CATALINA_TMPDIR: /home/vinicius/java/apache-tomcat-6.0.20/instance-01/temp Using JRE_HOME: /usr/lib/jvm/java-6-sun I get this at my catalina.out java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390) Can't figure out what am I doing wrong. I don't think I need to copy lib folder. Any ideas? Regards
Do multiple Hosts force multiple instances of webapps?
[Feels like a newbie question, but I don't know the anwser.] I have a web app (myapp) which has its context.xml in META-INF. When I run it on a local vanilla Tomcat 6.0.18 (Apache download) with the standard unzipped server.xml, only one instance of myapp is started (as observed in catalina.out). I have a Tomcat 6.0.18 running on a CentOS 5 Linux on a remote hosting service. (Actually running in a Parallels virtual VPS.) That system has two hosts in the server.xml (set up by the remote hosting service) as follows: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host appBase=webapps name=mydomain.com unpackWARs=true autoDeploy=true Aliaswww.mydomain.com/Alias Alias123.123.123.123/Alias /Host Note that they share the appBase. When I drop myapp.war in webapps, and observe catalina.out, I see that it is started twice. I assume that this is the expected behavior? And so then the question is: In a remote hosting setting like this, what is the purpose of the localhost Host: Host name=localhost Do I need this at all? Maybe it was just cruft left lying around by the person who set things up? I certainly want to avoid two copies of myapp running. Thanks in advance Ken - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Do multiple Hosts force multiple instances of webapps?
From: Ken Bowen [mailto:kbo...@als.com] Subject: Do multiple Hosts force multiple instances of webapps? Note that they share the appBase. Which can lead to interesting events when updating on the fly. When I drop myapp.war in webapps, and observe catalina.out, I see that it is started twice. I assume that this is the expected behavior? Yes; there's a separate classloader created for each Host/Context combination. And so then the question is: In a remote hosting setting like this, what is the purpose of the localhost Host: Host name=localhost You might well ask what's the purpose of the other Host with the domain name. You really only need one, and its name is irrelevant, as long as that name appears on the defaultHost attribute of the Engine. Multiple Host elements are useful when you really are serving separate, multiple domains. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Do multiple Hosts force multiple instances of webapps?
Ken Bowen wrote: [Feels like a newbie question, but I don't know the anwser.] I have a web app (myapp) which has its context.xml in META-INF. When I run it on a local vanilla Tomcat 6.0.18 (Apache download) with the standard unzipped server.xml, only one instance of myapp is started (as observed in catalina.out). I have a Tomcat 6.0.18 running on a CentOS 5 Linux on a remote hosting service. (Actually running in a Parallels virtual VPS.) That system has two hosts in the server.xml (set up by the remote hosting service) as follows: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host appBase=webapps name=mydomain.com unpackWARs=true autoDeploy=true Aliaswww.mydomain.com/Alias Alias123.123.123.123/Alias /Host Note that they share the appBase. When I drop myapp.war in webapps, and observe catalina.out, I see that it is started twice. I assume that this is the expected behavior? And so then the question is: In a remote hosting setting like this, what is the purpose of the localhost Host: Host name=localhost Do I need this at all? Maybe it was just cruft left lying around by the person who set things up? It is the standard server.xml setting, and normally it is enough, because... The first Host defined is the default host. Any request that comes in to this server on a part on which Tomcat is listening, and whose Host: header does not match any other Host name=... tag, will be handled by that default host. In other words, if you have only that first Host tag, then it will handle all requests. Because you have a second Host tag defined, now you have two (virtual) hosts. Your Host #2 now matches all requests for mydomain.com, www.mydomain.com and 123.123.123.123. Your first Host still matches all requests addresses to localhost, and all the ones not matched by your Host #2. (Because it is still the default host). To make a longer story shorter, just do this : - remove the second Host - add 3 aliases to the first localhost Host : Aliaswww.mydomain.com/Alias Alias123.123.123.123/Alias Aliasmydomain.com/Alias - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Do multiple Hosts force multiple instances of webapps?
André Warnier wrote: Ken Bowen wrote: [Feels like a newbie question, but I don't know the anwser.] I have a web app (myapp) which has its context.xml in META-INF. When I run it on a local vanilla Tomcat 6.0.18 (Apache download) with the standard unzipped server.xml, only one instance of myapp is started (as observed in catalina.out). I have a Tomcat 6.0.18 running on a CentOS 5 Linux on a remote hosting service. (Actually running in a Parallels virtual VPS.) That system has two hosts in the server.xml (set up by the remote hosting service) as follows: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host appBase=webapps name=mydomain.com unpackWARs=true autoDeploy=true Aliaswww.mydomain.com/Alias Alias123.123.123.123/Alias /Host Note that they share the appBase. When I drop myapp.war in webapps, and observe catalina.out, I see that it is started twice. I assume that this is the expected behavior? And so then the question is: In a remote hosting setting like this, what is the purpose of the localhost Host: Host name=localhost Do I need this at all? Maybe it was just cruft left lying around by the person who set things up? It is the standard server.xml setting, and normally it is enough, because... The first Host defined is the default host. Any request that comes in to this server on a part on which Tomcat is listening, and whose Host: header does not match any other Host name=... tag, will be handled by that default host. In other words, if you have only that first Host tag, then it will handle all requests. Because you have a second Host tag defined, now you have two (virtual) hosts. Your Host #2 now matches all requests for mydomain.com, www.mydomain.com and 123.123.123.123. Your first Host still matches all requests addresses to localhost, and all the ones not matched by your Host #2. (Because it is still the default host). To make a longer story shorter, just do this : - remove the second Host - add 3 aliases to the first localhost Host : Aliaswww.mydomain.com/Alias Alias123.123.123.123/Alias Aliasmydomain.com/Alias Of course, as Charles pointed out, these 3 aliases are totally superfluous, for the reason I myself outlined above. Duh.. Time to go to bed here too. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Do multiple Hosts force multiple instances of webapps?
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Do multiple Hosts force multiple instances of webapps? The first Host defined is the default host. No - the defaultHost is the defined by the defaultHost attribute of the Engine. It can be any of the Host elements. To make a longer story shorter, just do this : - remove the second Host - add 3 aliases to the first localhost Host : Aliaswww.mydomain.com/Alias Alias123.123.123.123/Alias Aliasmydomain.com/Alias Or, just use one Host and no aliases. What you're suggesting is unnecessarily complex and serves no real purpose. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Do multiple Hosts force multiple instances of webapps?
Thanks! To both Chuck Andre. Not only does the simple solution work, but I understand a tiny bit more. Have a good night. Ken On Apr 7, 2009, at 7:20 PM, Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Do multiple Hosts force multiple instances of webapps? The first Host defined is the default host. No - the defaultHost is the defined by the defaultHost attribute of the Engine. It can be any of the Host elements. To make a longer story shorter, just do this : - remove the second Host - add 3 aliases to the first localhost Host : Aliaswww.mydomain.com/Alias Alias123.123.123.123/Alias Aliasmydomain.com/Alias Or, just use one Host and no aliases. What you're suggesting is unnecessarily complex and serves no real purpose. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - 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
RE: Installing Multiple Instances on Windows Server 2003
Found the issue. I just needed a for cicle with millions of loops. There was only kernel calls that saturated CPU till 45-50%. A resource was waiting something. Don't know if it was the HDD or the network. I have to check. Thanks for the tip, Peter :) Peter Crowther wrote: From: Steve G.B. [mailto:[EMAIL PROTECTED] I've created a VM with 4 VCores, and all of the cores are allocated to the VM. OK, so 50% CPU = 2 cores maxed out. Out of interest, is it 25% with only one Tomcat started? I'm using Sun JVM 1.6, and stressing the Guest with Loadrunner on another machine (if you ask: this machine with loadrunner isn't the bottleneck) No Databases, no I/O requests, no Network saturation. OK. Given that you're getting exactly 50% CPU use (it *is* exact, right?) that indicates the test harness is very unlikely to be the problem. It would almost certainly bottleneck at some other CPU value. that's why I think it's the JVM. For my tests I used the standard demo webapp in Loarunner (Mercury Tours), and a couple of stupid jsp pages. So Apache and Tomcat both. I'll highlight that to the folks who know the demo app better: does it run properly under load? I'd assume so... Fun thing is that when using Tomcat and Apache combined, I can get an 80-85% CPU Utilization. Yes. If you've got httpd passing everything through it as well, you'll increase the CPU load - that's expected! Problem is that for my tests I need something more simple and the same server. Yes. Why add complexity when it's not required? :-) How do you saturate an 8-core host? With some reasonably complex code in the JSPs :-). Out of interest, if your JSPs call something that loops a couple of million times before returning, what happens to the CPU use? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19284452.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Installing Multiple Instances on Windows Server 2003
Hi, I need to install multiple instances of Tomcat on my server. I changed all the connection and redirect ports, but the second Tomcat still doesn't start. What should I do? Thank you, Steve -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267576.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing Multiple Instances on Windows Server 2003
Can you post the error that it spits out while starting up? -Original Message- From: Steve G.B. [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Tue, 2 Sep 2008 3:49 pm Subject: Installing Multiple Instances on Windows Server 2003 Hi, I need to install multiple instances of Tomcat on my server. I changed all the connection and redirect ports, but the second Tomcat still doesn't start. What should I do? Thank you, Steve -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267576.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You are invited to Get a Free AOL Email ID. - http://webmail.aol.in - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Multiple Instances on Windows Server 2003
From: Steve G.B. [mailto:[EMAIL PROTECTED] I need to install multiple instances of Tomcat on my server. I changed all the connection and redirect ports, but the second Tomcat still doesn't start. What should I do? Give us more information - that's far too vague for us to help you. Post: - Tomcat versions; - Any error messages you get in either set of logs while starting Tomcat. Also: If you start the two services in the opposite order, which one fails? Is it always one instance of Tomcat (in which case you should be looking for config errors in that Tomcat) or is it always the second one started (in which case you should be looking for contention issues)? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing Multiple Instances on Windows Server 2003
in catalina.log I have this: Sep 2, 2008 12:34:44 PM org.apache.catalina.core.StandardServer await SEVERE: StandardServer.await: create[8005]: java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.init(Unknown Source) at org.apache.catalina.core.StandardServer.await(StandardServer.java:373) at org.apache.catalina.startup.Catalina.await(Catalina.java:642) at org.apache.catalina.startup.Catalina.start(Catalina.java:602) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Sep 2, 2008 12:34:44 PM org.apache.coyote.http11.Http11AprProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 Sep 2, 2008 12:34:44 PM org.apache.coyote.ajp.AjpAprProtocol pause INFO: Pausing Coyote AJP/1.3 on ajp-8009 Sep 2, 2008 12:34:45 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina the problem is: I have Tomcat 6.0 on Connection port 8080 and redirect port 8443. AJP port is 8009 (standard installation ports) I then have Tomcat 4.1 on Connection port 8083 and redirect port 8447. AJP is 8011. Still it logs me there's an address already in use. bhooshanpandit wrote: Can you post the error that it spits out while starting up? -Original Message- From: Steve G.B. [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Tue, 2 Sep 2008 3:49 pm Subject: Installing Multiple Instances on Windows Server 2003 Hi, I need to install multiple instances of Tomcat on my server. I changed all the connection and redirect ports, but the second Tomcat still doesn't start. What should I do? Thank you, Steve -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267576.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You are invited to Get a Free AOL Email ID. - http://webmail.aol.in - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267834.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Multiple Instances on Windows Server 2003
I posted logs and ports in the other reply. Here I can tell you that the first service started is running quite good, the seconds starts and then crashes. Peter Crowther wrote: From: Steve G.B. [mailto:[EMAIL PROTECTED] I need to install multiple instances of Tomcat on my server. I changed all the connection and redirect ports, but the second Tomcat still doesn't start. What should I do? Give us more information - that's far too vague for us to help you. Post: - Tomcat versions; - Any error messages you get in either set of logs while starting Tomcat. Also: If you start the two services in the opposite order, which one fails? Is it always one instance of Tomcat (in which case you should be looking for config errors in that Tomcat) or is it always the second one started (in which case you should be looking for contention issues)? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267883.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing Multiple Instances on Windows Server 2003
The error clearly indicates that something is running on port 8080. It's not the other tomcat but probably some other process.. if you have oracle it's app server runs on 8080 by default Try changing the connector and redirector ports to non default values (say 18080 and 18443) and see if it works. -Original Message- From: Steve G.B. [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Tue, 2 Sep 2008 4:10 pm Subject: Re: Installing Multiple Instances on Windows Server 2003 in catalina.log I have this: Sep 2, 2008 12:34:44 PM org.apache.catalina.core.StandardServer await SEVERE: StandardServer.await: create[8005]: java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.init(Unknown Source) at org.apache.catalina.core.StandardServer.await(StandardServer.java:373) at org.apache.catalina.startup.Catalina.await(Catalina.java:642) at org.apache.catalina.startup.Catalina.start(Catalina.java:602) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Sep 2, 2008 12:34:44 PM org.apache.coyote.http11.Http11AprProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 Sep 2, 2008 12:34:44 PM org.apache.coyote.ajp.AjpAprProtocol pause INFO: Pausing Coyote AJP/1.3 on ajp-8009 Sep 2, 2008 12:34:45 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina the problem is: I have Tomcat 6.0 on Connection port 8080 and redirect port 8443. AJP port is 8009 (standard installation ports) I then have Tomcat 4.1 on Connection port 8083 and redirect port 8447. AJP is 8011. Still it logs me there's an address already in use. bhooshanpandit wrote: Can you post the error that it spits out while starting up? -Original Message- From: Steve G.B. [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Tue, 2 Sep 2008 3:49 pm Subject: Installing Multiple Instances on Windows Server 2003 Hi, I need to install multiple instances of Tomcat on my server. I changed all the connection and redirect ports, but the second Tomcat still doesn't start. What should I do? Thank you, Steve -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267576.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You are invited to Get a Free AOL Email ID. - http://webmail.aol.in - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267834.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You are invited to Get a Free AOL Email ID. - http://webmail.aol.in - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing Multiple Instances on Windows Server 2003
Ok got it. It was the server port 8005 that should be changed. Thank you! bhooshanpandit wrote: The error clearly indicates that something is running on port 8080. It's not the other tomcat but probably some other process.. if you have oracle it's app server runs on 8080 by default Try changing the connector and redirector ports to non default values (say 18080 and 18443) and see if it works. -Original Message- From: Steve G.B. [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Tue, 2 Sep 2008 4:10 pm Subject: Re: Installing Multiple Instances on Windows Server 2003 in catalina.log I have this: Sep 2, 2008 12:34:44 PM org.apache.catalina.core.StandardServer await SEVERE: StandardServer.await: create[8005]: java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.init(Unknown Source) at org.apache.catalina.core.StandardServer.await(StandardServer.java:373) at org.apache.catalina.startup.Catalina.await(Catalina.java:642) at org.apache.catalina.startup.Catalina.start(Catalina.java:602) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Sep 2, 2008 12:34:44 PM org.apache.coyote.http11.Http11AprProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 Sep 2, 2008 12:34:44 PM org.apache.coyote.ajp.AjpAprProtocol pause INFO: Pausing Coyote AJP/1.3 on ajp-8009 Sep 2, 2008 12:34:45 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina the problem is: I have Tomcat 6.0 on Connection port 8080 and redirect port 8443. AJP port is 8009 (standard installation ports) I then have Tomcat 4.1 on Connection port 8083 and redirect port 8447. AJP is 8011. Still it logs me there's an address already in use. bhooshanpandit wrote: Can you post the error that it spits out while starting up? -Original Message- From: Steve G.B. [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Tue, 2 Sep 2008 3:49 pm Subject: Installing Multiple Instances on Windows Server 2003 Hi, I need to install multiple instances of Tomcat on my server. I changed all the connection and redirect ports, but the second Tomcat still doesn't start. What should I do? Thank you, Steve -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267576.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You are invited to Get a Free AOL Email ID. - http://webmail.aol.in - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267834.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You are invited to Get a Free AOL Email ID. - http://webmail.aol.in - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19268122.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installing Multiple Instances on Windows Server 2003
I have another question. I'm trying to overload the Virtual Machine on which I've installed the two Tomcats. But I can't exceed a 50% of CPU Utilization. I believe it's a JVM limitation. Is there a way to change jvm configurations in order, for example, to create even more threads? Thank you! -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19268553.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Multiple Instances on Windows Server 2003
From: Steve G.B. [mailto:[EMAIL PROTECTED] I'm trying to overload the Virtual Machine on which I've installed the two Tomcats. To check: this is a virtual computer (on a physical host computer) running a virtual operating system on which you are running two copies of Tomcat in two separate Java virtual machines? But I can't exceed a 50% of CPU Utilization. How many virtual cores have you set up? How many physical cores on the host computer do you have? How many of those are allocated to the virtual computer? I believe it's a JVM limitation. What JVM are you using? If it's a Sun one, I don't believe you ;-). I've saturated 8-core processors on 1.4 and 1.5 with no issues; I can't see that having regressed in 1.6, although I don't have personal experience. Is there a way to change jvm configurations in order, for example, to create even more threads? Depends on your JVM. But I'm willing to bet that the bottleneck is in one or more of: - Your test harness; - Your web app (do all the threads access a common object?); - A library you're using that single-threads; - Your back-end systems, such as your database server. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Multiple Instances on Windows Server 2003
It's a Quad Core Intel Xeon with 4GB of RAM and ESX running on it. I've created a VM with 4 VCores, and all of the cores are allocated to the VM. I'm using Sun JVM 1.6, and stressing the Guest with Loadrunner on another machine (if you ask: this machine with loadrunner isn't the bottleneck) No Databases, no I/O requests, no Network saturation. that's why I think it's the JVM. For my tests I used the standard demo webapp in Loarunner (Mercury Tours), and a couple of stupid jsp pages. So Apache and Tomcat both. Fun thing is that when using Tomcat and Apache combined, I can get an 80-85% CPU Utilization. Problem is that for my tests I need something more simple and the same server. So today I've installed the second Tomcat running calling the same jsp page of the other. No think time set. How do you saturate an 8-core host? Please help me :) Stefano Peter Crowther wrote: From: Steve G.B. [mailto:[EMAIL PROTECTED] I'm trying to overload the Virtual Machine on which I've installed the two Tomcats. To check: this is a virtual computer (on a physical host computer) running a virtual operating system on which you are running two copies of Tomcat in two separate Java virtual machines? But I can't exceed a 50% of CPU Utilization. How many virtual cores have you set up? How many physical cores on the host computer do you have? How many of those are allocated to the virtual computer? I believe it's a JVM limitation. What JVM are you using? If it's a Sun one, I don't believe you ;-). I've saturated 8-core processors on 1.4 and 1.5 with no issues; I can't see that having regressed in 1.6, although I don't have personal experience. Is there a way to change jvm configurations in order, for example, to create even more threads? Depends on your JVM. But I'm willing to bet that the bottleneck is in one or more of: - Your test harness; - Your web app (do all the threads access a common object?); - A library you're using that single-threads; - Your back-end systems, such as your database server. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19269403.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing Multiple Instances on Windows Server 2003
From: Steve G.B. [mailto:[EMAIL PROTECTED] I've created a VM with 4 VCores, and all of the cores are allocated to the VM. OK, so 50% CPU = 2 cores maxed out. Out of interest, is it 25% with only one Tomcat started? I'm using Sun JVM 1.6, and stressing the Guest with Loadrunner on another machine (if you ask: this machine with loadrunner isn't the bottleneck) No Databases, no I/O requests, no Network saturation. OK. Given that you're getting exactly 50% CPU use (it *is* exact, right?) that indicates the test harness is very unlikely to be the problem. It would almost certainly bottleneck at some other CPU value. that's why I think it's the JVM. For my tests I used the standard demo webapp in Loarunner (Mercury Tours), and a couple of stupid jsp pages. So Apache and Tomcat both. I'll highlight that to the folks who know the demo app better: does it run properly under load? I'd assume so... Fun thing is that when using Tomcat and Apache combined, I can get an 80-85% CPU Utilization. Yes. If you've got httpd passing everything through it as well, you'll increase the CPU load - that's expected! Problem is that for my tests I need something more simple and the same server. Yes. Why add complexity when it's not required? :-) How do you saturate an 8-core host? With some reasonably complex code in the JSPs :-). Out of interest, if your JSPs call something that loops a couple of million times before returning, what happens to the CPU use? - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0.27 multiple instances in Solaris
Hi, I have a working tomcat5.0.27 in /export/ae/tomcat5.027 folder. (os is solaris) Now I am creating one more tomcat instance. So, I created one directory Instance1 in /export/ae/tomcat5.0.27 folder and copied conf, logs, temp, webapps, work folders. I also modified port nubmers 8080, 8005, 8009 to 9080, 9005, 9009. I tried to start Instance1 using the following command. /export/ae/tomcat5.0.27/bin startup.sh -Dcatalina.base=/export/ae/tomcat5.0.27/Instance1. But, its starting the old server (8080) only. Could any one please guide me in right direction, how to start and stop the new instance. I appreciate your help. Thanks, Sridhar -- View this message in context: http://www.nabble.com/Tomcat-5.0.27-multiple-instances-in-Solaris-tp18519218p18519218.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.27 multiple instances in Solaris
Date sent: Thu, 17 Jul 2008 15:30:33 -0700 (PDT) From: sridharmnj [EMAIL PROTECTED] Subject:Tomcat 5.0.27 multiple instances in Solaris To: users@tomcat.apache.org Send reply to: Tomcat Users List users@tomcat.apache.org Hi, I have a working tomcat5.0.27 in /export/ae/tomcat5.027 folder. (os is solaris) Now I am creating one more tomcat instance. So, I created one directory Instance1 in /export/ae/tomcat5.0.27 folder and copied conf, logs, temp, webapps, work folders. I also modified port nubmers 8080, 8005, 8009 to 9080, 9005, 9009. I tried to start Instance1 using the following command. /export/ae/tomcat5.0.27/bin startup.sh -Dcatalina.base=/export/ae/tomcat5.0.27/Instance1. Copy the entire /export/ae/tomcat5.027 dir. to another separate dir, not a subdir. and then change the ports and use its startup.sh. -Steve O. But, its starting the old server (8080) only. Could any one please guide me in right direction, how to start and stop the new instance. I appreciate your help. Thanks, Sridhar -- View this message in context: http://www.nabble.com/Tomcat-5.0.27-multiple-instances-in-Solaris-tp18 519218p18519218.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.27 multiple instances in Solaris
Hi Steve, Thanks for your guidence. Yes, I can do that. But copying the entire tomcat folder means, it needs multiple binarys (bin folder). Somewhere in forums I read that there is way to work with single binary and multiple tomcat instances. Actually, my current tomcat server serving for 10 different sites, If I chose to copy tomcat binary 10 times, it may consume resources. Do you suggest to use individual binary for each site or is it better to have a single binary with multiple tomcat instances. If yes, Could you please point me, what are advantages to use multiple binaries insted of single binary with multiple instances. Thanks, Sridhar Steve Ochani wrote: Date sent:Thu, 17 Jul 2008 15:30:33 -0700 (PDT) From: sridharmnj [EMAIL PROTECTED] Subject: Tomcat 5.0.27 multiple instances in Solaris To: users@tomcat.apache.org Send reply to:Tomcat Users List users@tomcat.apache.org Hi, I have a working tomcat5.0.27 in /export/ae/tomcat5.027 folder. (os is solaris) Now I am creating one more tomcat instance. So, I created one directory Instance1 in /export/ae/tomcat5.0.27 folder and copied conf, logs, temp, webapps, work folders. I also modified port nubmers 8080, 8005, 8009 to 9080, 9005, 9009. I tried to start Instance1 using the following command. /export/ae/tomcat5.0.27/bin startup.sh -Dcatalina.base=/export/ae/tomcat5.0.27/Instance1. Copy the entire /export/ae/tomcat5.027 dir. to another separate dir, not a subdir. and then change the ports and use its startup.sh. -Steve O. But, its starting the old server (8080) only. Could any one please guide me in right direction, how to start and stop the new instance. I appreciate your help. Thanks, Sridhar -- View this message in context: http://www.nabble.com/Tomcat-5.0.27-multiple-instances-in-Solaris-tp18 519218p18519218.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tomcat-5.0.27-multiple-instances-in-Solaris-tp18519218p18521254.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.27 multiple instances in Solaris
Somewhere in forums I read that there is way to work with single binary and multiple tomcat instances. Read the RUNNING.txt file that's in the Tomcat home directory. Actually, my current tomcat server serving for 10 different sites, Why don't you use Tomcat's virtual host capability (multiple Host elements) and only run one copy of Tomcat? BTW, 5.0.27 is no longer supported; you might want to consider moving up. - Chuck - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple instances and context roots
Thanks for the info Guys. I'm already using proxy forwarding but it is not really acceptable for production env's (e.g. you loose the clients IP, error handling is not as good, etc). I'm after a simple setting that appends a prefix on the URI so a WAR dropped in webapp's dir is prefixed with dev/test/etc. Does not look like there is one though. Again my setup is: https://www.myserver.com/test/WebApp/test.jsp maps to using mod_jk http://www.myserver.com:8181/test/WebApp/test.jsp https://www.myserver.com/dev/WebApp/test.jsp maps to using mod_jk http://www.myserver.com:8182/dev/WebApp/test.jsp Any other ideas? Thanks in advance. Johnny Kewl wrote: - Original Message - From: Johnny Kewl [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, June 26, 2008 3:15 PM Subject: Re: multiple instances and context roots - Original Message - From: tom_goring [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, June 26, 2008 12:09 PM Subject: multiple instances and context roots Hi, I've posted this on the jboss forum but had no response... it's really a tomcat question. jboss-4.2.2 (not sure of the tomcat version used) I have several jboss installs running behind apache using mod_jk (dev, test, production, etc) I can't use virtual hosts as all my instances require SSL and this is only set up for 1 domain. Each instance runs on it's own ports. I want a simple way to tell each jboss/tomcat instance to use a reliative context. E.g. https://www.myserver.com/dev/MYAPP/hello.jsp https://www.myserver.com/test/MYAPP/hello.jsp I.e. I want to know where I can set dev/test, etc. I don't really want to change the application.xml (context-root) for each EAR file when installed (as that would require rebuilding the EAR dependent on the instance). Ideas ? Tom, I have no knowledge of Jboss... we dont use EJB at all, so I'm just going to tell you what TC does to get sub contexts, and then you on your own. Say you want /dev/MyApp The context file name in conf/host becomes dev#MyApp.xml The path in the context file becomes path=/dev/MyApp/ And in webapps folder it becomes /dev/The UnPacked Webapp Deployment is not possible by dropping a war into tomcat... the war must not be there, else TC will auto deploy and mess up your config. Then I guess JkMount /dev/* theWorker. may work... And hopefully nothing in those apps is hardcoded... like URI's in jsp pages etc. And EJB is still happy... Some really creative guy Alex Mestiashvili showed us a way (unrelated) to map different IP's to different webapps a while back using a reverse proxy and some other incredible rewrite stuff that Apache can do... JK works on relative uri's, but I think its worth a bash asking the Apached guys if one cant map https://www.myserver.com/dev/MYAPP/hello.jsp https://www.myserver.com/test/MYAPP/hello.jsp to https://www.myserver.com:8080/MYAPP/hello.jsp https://www.myserver.com:8081/MYAPP/hello.jsp etc... Or something even more creative... ie try get apache to present TC/JBoss with something it likes... Maybe mod proxy has a few tricks that jk does not... worth getting into the Httpd mailing list and asking, I think. JK is terrific at load balancing, but you just trying to use it as a kind of gateway... Apached is probably good at that. Good luck sorry cant be more helpful --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- After Thought... Been thinking about the idea of mapping https://www.myserver.com/dev/MYAPP/hello.jsp https://www.myserver.com/prod/MYAPP/hello.jsp to https://www.myserver.com:8080/MYAPP/hello.jsp https://www.myserver.com:8081/MYAPP/hello.jsp asked the Apache guys... maybe there is a guru out there with an alt plan, but I think it needs planning when making the WebApp This will map incoming requests ProxyRequests Off Proxy * Order deny,allow Allow from all /Proxy ProxyPass /dev http://localhost:8080 ProxyPassReverse /dev http://localhost:8080 ProxyPass /prod http://localhost:8081 ProxyPassReverse /prod http://localhost:8081 but the problem is that the actual links on your pages are going to still be http://www.myserver.com/MYAPP/hello.jsp so... one would have to plan for it and have say a context parameter that one could also set... so that it adjusts page urls to /dev/MYAPP The above mod proxy stuff... does this maps domain/dev/MyApp to localhost:8080/MyApp so the incoming is adjusted... which leaves getting your own links right... so maybe TC sub contexts and JK