[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[THREDDS #CZR-333353]: running multiple TDS' under same tomcat

Hi Kevin,

I wrote:
> We have not introduced a new way to accomplish [running two
> TDS under the same Tomcat instance].

I was wrong, sort of. We didn't intentionally introduce a new way of doing 
this. But then again, we don't really test for this use very often. It appears 
that some of the TDS 4.0 reworking of the underlying configuration mechanisms 
(when we started using Spring) included some changes to where this information 
is needed and supplied.

So far I've found three places (two new) where this information is found. Two 
of the three are easy to change in the configuration, the third is in the code 
and I need to think a bit more about it. Here's they are:

1) The one we know and love. In WEB-INF/web.xml, change the "contextPath" 
parameter to "thredds2".

2) A new one. In WEB-INF/classes/thredds/server/tds.properties: change 
"tds.content.path=thredds" to "tds.content.path=thredds2".

3) The second new one has to do with how our logging system knows to put the 
log files in the content/thredds/logs directory. It involves a system property 
and "${key}" substitution in our log4j.log file. The problem is that some 
servlet containers (including Tomcat) do not keep system properties separate 
per web application and so "tds.log.dir" clashes across two TDS instances. For 
the current TDS versions, there is not a  solution as the name of the system 
property ("tds.log.dir") is contained in code and in our log4j.xml file.

I'll try to get a fix for the third issue into the next release. Hopefully I 
can think of a cleaner solution than the only one that has come to mind so far. 
And, at some point, we'll try to get this cleaned up so it will just work 
without requiring all these changes on your part.

I'll let you know how it goes.


Ethan wrote:
> It isn't clear to me from the error messages what the problem
> is when you run two TDS on the same Tomcat instance. We have
> not introduced a new way to accomplish this. I will dig into
> it and see what I can figure out. I'll get back to you soon.
> Ethan
> > In the past, using v3.x of TDS, I have been able to run multiple
> > instances of THREDDS under the same tomcat by modifying the
> > WEB-INF/web.xml files to change the name of the context, as such:
> >
> > <context-param>
> > <param-name>ContextPath</param-name>
> > <param-value>/thredds2/</param-value>
> > </context-param>
> >
> >
> > This would then create a
> > content/thredds2
> >
> > directory which the catalog would live in, etc.
> >
> > However, using v4.1 I find this simple change no longer works.  After
> > making the above change, I receive an error in the tomcat log files that
> > simply says:
> >
> > INFO: Deploying web application archive thredds2.war
> > log4j:WARN No appenders could be found for logger
> > (org.apache.commons.digester.Digester.sax).
> > log4j:WARN Please initialize the log4j system properly.
> > TdsConfigContextListener.contextInitialized(): start.
> > Jan 7, 2010 12:50:03 PM org.apache.catalina.core.StandardContext start
> > *SEVERE: Error listenerStart*
> > Jan 7, 2010 12:50:03 PM org.apache.catalina.core.StandardContext start
> > SEVERE: Context [/thredds2] startup failed due to previous errors
> >
> > I'm using tomcat 5.5.x and java 1.6.  TDS v4.1  runs fine under the
> > "thredds" context, by the way.
> >
> > Did THREDDS v4.1 introduce another way to accomplish running multiple
> > instances under the same tomcat?
> >
> > thanks
> > Kevin
> >
> > --
> > Kevin O'Brien                   UW/JISAO
> > Research Scientist              NOAA/PMEL/TMAP

Ticket Details
Ticket ID: CZR-333353
Department: Support THREDDS
Priority: Normal
Status: Open

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.