You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kirk Hoganson <kh...@parabellum.biz> on 2013/02/06 07:24:29 UTC

Tomcat Upgrade & Migration Questions

 I am currently in the middle of an upgrade from Apache (2.2)/Tomcat
(5.5.16) to Apache (2.2)/Tomcat (6.0.24).  The JVM is being upgraded from
1.5.0_09-b01 to 1.6.0_22-b22.  The new host servers will be RedHat 6.2.

I would like to use the default application installation paths used by the
RPMs.  However, I would like the user code base(s) to exist in a separate
partition.  These servers will be hosting multiple separate java
applications.  Currently Apache and Tomcat use mod_jk as the connector.

I am hoping for some advice that will help me with the server/Tomcat/Apache
configuration.  I am specifically interested in Tomcat configuration
advice, or direction.  I would like to get some clarification on the
following questions:

How can I configure Tomcat to allow each individual application (JVM) to be
restarted independently?

   - We currently do this with separate CATALINA_BASE directories, and
   separate startup/shutdown scripts.  I’m not sure if that is the cleanest
   way.

What method would best allow Apache to serve static content, and Tomcat to
server java based dynamic content?

   - I’m assuming this will depend on the connector used.

Which connector (mod_jk, mod_proxy_ajp, mod_cluster) should be used?

   - I have heard conflicting reports about mod_jk being deprecated or not.
   - I have seen benchmarks with mod_proxy_ajp outperforming mod_jk
   significantly.
   - I don’t think we currently need the clustering functionality of
   mod_cluster, but may with future JBoss installations.


Thanks in advance for your suggestions.

RE: Tomcat Upgrade & Migration Questions

Posted by "Williams, Nick" <ni...@ul.com>.
> On Feb 6, 2013, at 1:24 AM, Kirk Hoganson wrote:
>> I am currently in the middle of an upgrade from Apache (2.2)/Tomcat
>> (5.5.16) to Apache (2.2)/Tomcat (6.0.24).  The JVM is being upgraded
>> from
>> 1.5.0_09-b01 to 1.6.0_22-b22.  The new host servers will be RedHat 6.2.
>
>Why are you upgrading to 6.0.24 & Java 1.6.0_22?  These are already multiple versions out of date.  Do yourself a favor and upgrade to the latest release of each, which at this time is 6.0.36 and Java 1.6.0_39.

Just want to chime in here. Please note that Java 6 is 8 years old, as of February 2011 Oracle ended public update notifications, and (most importantly) as of February 2013 (this month) Java 6 will be END OF LIFE (http://www.oracle.com/technetwork/java/eol-135779.html). This means that if some security issue is identified in Java 6 that could compromise your servers, the only way you will be able to get a fix for it is to upgrade to Java 7. (Java 7 is approaching its second birthday and Java 8 comes out later this year. The plan is for Java 7 to go end of life in July 2014, but July 2012 was the plan for Java 6 and that got extended 7 months. I think Java 7 has a little time left in it yet.)

Dan is right to encourage you to go to Java 1.6.0_39 instead of 1.6.0_22 and to go to Tomcat 6.0.36 instead of 6.0.24. The versions you are proposing to update to are out of date, potentially insecure, and should not be used on production systems. However, I would take it a step further. If you are already in the process of upgrading your systems, get a little more current and save yourself some headache down the road. Get Java 1.7.0_13 and Tomcat 7.0.35. That should last you for a couple more years before you'll need to update.

Just my $0.02.

Nick

This e-mail may contain privileged or confidential information. If you are not the intended recipient: (1) you may not disclose, use, distribute, copy or rely upon this message or attachment(s); and (2) please notify the sender by reply e-mail, and then delete this message and its attachment(s). Underwriters Laboratories Inc. and its affiliates disclaim all liability for any errors, omissions, corruption or virus in this message or any attachments.


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


Re: Tomcat Upgrade & Migration Questions

Posted by Daniel Mikusa <dm...@vmware.com>.
On Feb 6, 2013, at 1:24 AM, Kirk Hoganson wrote:

> I am currently in the middle of an upgrade from Apache (2.2)/Tomcat
> (5.5.16) to Apache (2.2)/Tomcat (6.0.24).  The JVM is being upgraded from
> 1.5.0_09-b01 to 1.6.0_22-b22.  The new host servers will be RedHat 6.2.

Why are you upgrading to 6.0.24 & Java 1.6.0_22?  These are already multiple versions out of date.  Do yourself a favor and upgrade to the latest release of each, which at this time is 6.0.36 and Java 1.6.0_39.

> I would like to use the default application installation paths used by the
> RPMs.  

I can understand the temptation to do this, but you should really install Tomcat direct from http://tomcat.apache.org.  You'll get the latest version and it's packaged in a way that is familiar to everyone on this list, which means we can help you with problems. 

> However, I would like the user code base(s) to exist in a separate
> partition.  These servers will be hosting multiple separate java
> applications.  

Not sure what you mean by "code base".  Are you referring to the WAR files for your applications?  

If so, those are normally placed into your "webapps" directory.  You can change that directory by changing the "appBase" attribute of the <Host/> tag.

  https://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Common%20Attributes

Or you can place a context file in "conf/<service>/<host>/<appName>.xml" and use "docBase" to specify the location of your WAR file.  Note, you would only do this if the path to the WAR file is not inside your "webapps" (i.e. appBase) directory already.

  https://tomcat.apache.org/tomcat-6.0-doc/config/context.html

> Currently Apache and Tomcat use mod_jk as the connector.
> 
> I am hoping for some advice that will help me with the server/Tomcat/Apache
> configuration.  I am specifically interested in Tomcat configuration
> advice, or direction.  I would like to get some clarification on the
> following questions:
> 
> How can I configure Tomcat to allow each individual application (JVM) to be
> restarted independently?
> 
>   - We currently do this with separate CATALINA_BASE directories, and
>   separate startup/shutdown scripts.  I’m not sure if that is the cleanest
>   way.

If you need to isolate your applications, i.e. one application per JVM, then this is the way to go.  It will also allow you to restart your Tomcat servers independently.  It may seem like a waste of memory, but the overhead of Tomcat is very small so it's not as bad as you might initially think.

An alternative approach would be to run all of your web apps in one Tomcat instance.  You could then reload individual applications using the Manager interface or you could undeploy / redeploy them.  This will restart your applications, but it's not quite the same as restarting the Tomcat server.  

What you do depends on your needs.

> 
> What method would best allow Apache to serve static content, and Tomcat to
> server java based dynamic content?
> 
>   - I’m assuming this will depend on the connector used.

The exact configuration to use will depend on how you proxy to your Tomcat server.  That being said, the general idea is that you keep requests to your static resources from being proxied to your Tomcat servers.  This then allows Apache HTTPD to service those requests.

This can either be done inclusively, i.e. by mapping only the paths which should be proxied, or exclusively by proxying everything and specify certain paths that should not be proxied.

With mod_proxy, you use ProxyPass and ProxyPass with an "!" (excludes) at the end of the path.

Ex:

  ProxyPass /myapp
  ProxyPass /myapp/static !

With mod_jk, you use JkMount and JkUnMount.


> 
> Which connector (mod_jk, mod_proxy_ajp, mod_cluster) should be used?

http://markmail.org/message/dftgdokeyebqd4ep?q=deciding-between-modjk-modproxyhttp-and-modproxyajp

> 
>   - I have heard conflicting reports about mod_jk being deprecated or not.

This is not true.  There are similarly named projects that you shouldn't use though, like mod_jk2, mod_jserv and mod_webapp.

>   - I have seen benchmarks with mod_proxy_ajp outperforming mod_jk
>   significantly.

I have not heard this, where did you see these?

Dan

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