You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rob Gosling <ro...@yahoo.com> on 2010/07/07 16:03:14 UTC

Multiple Tomcat Instance Issues

Hi,

I have more or less successfully setup multiple instances of Tomcat using the 
same $CATALINA_HOME install, but am encountering a couple of issues I can't seem 
to resolve after searching for answers.  I am running Tomcat 5.5.29 on Windows 
XP Pro SP3.

For each new instance I have performed the following steps:

1) created a new CATALINA_BASE directory with the following structure:
        bin
            setenv.bat
        conf
            |- Catalina
            |    |- localhost
            |        |-admin.xml
            |        |-manager.xml
            |-server.xml
            |-tomcat-users.xml
            |-web.xml
        logs
        temp
        webapps
        work

2) created a bin/setenv.bat setting some JAVA_OPTS and CATALINA_OPTS as follows:

set JAVA_OPTS= -XX:MaxPermSize=256M 
set CATALINA_OPTS= -Xms512m -Xmx1024m 

3) modified admin.xml and manager.xml to point docbase back to the 
$CATALINA_HOME webapp location under server/webapps/
4) created a startup.bat file in each $CATALINA_BASE setting $CATALINA_BASE and 
calling startup.bat in $CATALINA_HOME/bin

Each instance is starting up using the correct directories as shown from the 
startup extract of one of the starts:

Using CATALINA_BASE:   C:\tomcat\apache-tomcat-5.5.29-mpm
Using CATALINA_HOME:   C:\tomcat\apache-tomcat-5.5.29
Using CATALINA_TMPDIR: C:\tomcat\apache-tomcat-5.5.29-mpm\temp
Using JRE_HOME:                C:\Java\jdk1.6.0_20
Using CLASSPATH:           C:\tomcat\apache-tomcat-5.5.29\bin\bootstrap.jar

So my questions are as follows:

1) /admin works fine on each instance, but /manager does not and I can't see why 
not as pathing is correct
2) why no log files are being output anywhere that I've been able to determine - 
not in $CATALINA_BASE nor in $CATALINA_HOME - so I'm not sure what happened to 
the Tomcat log files - the Tomcat docs say this will be automatically determined 
based on $CATALINA_BASE, but I have no log files being output anywhere anymore.

Thanks
Rob


      

Re: Multiple Tomcat Instance Issues

Posted by André Warnier <aw...@ice-sa.com>.
Rob Gosling wrote:
> Hi Chuck,
> 
> Thanks for that note about /manager/html - that is one thing I had missed - that 
> does work - just using manager (as I was doing) didn't work (resource not 
> available).
> 
..which illustrates the point I was making in another thread, about /manager/html not 
being the most intuitive URL.
;-)

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


Re: How to implement a webapp class loader

Posted by Pid <pi...@pidster.com>.
On 07/07/2010 16:05, Goren Il wrote:
> 
>  I would like to implement my on webapp class loader, that will look for
> jars in specific places (to be defined in the configuration).
> I would like to inherit the behavior of the default class loader of the
> webapp, so I can not start use a regular ClassLoader.
> I considered inheriting from WebappClassLoader.
> Is there a simpler way?
> Is there some documentation how to create such a class loader?

Please post a new message, don't just reply to an existing message &
edit the subject line or body <- this is called thread hijacking.


p

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



How to implement a webapp class loader

Posted by Goren Il <go...@hotmail.com>.
  I would like to implement my on webapp class loader, that will look for jars in specific places (to be defined in the configuration).
I would like to inherit the behavior of the default class loader of the webapp, so I can not start use a regular ClassLoader.
I considered inheriting from WebappClassLoader.
Is there a simpler way?
Is there some documentation how to create such a class loader?
Thanks
G.


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


Re: Multiple Tomcat Instance Issues

Posted by Rob Gosling <ro...@yahoo.com>.
Hi Chuck,

Thanks for that note about /manager/html - that is one thing I had missed - that 
does work - just using manager (as I was doing) didn't work (resource not 
available).

Yes, there is a logs directory in each $CATALINA_BASE




________________________________
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Wed, July 7, 2010 3:32:52 PM
Subject: RE: Multiple Tomcat Instance Issues

> From: Rob Gosling [mailto:rob.prog@yahoo.com]
> Subject: Multiple Tomcat Instance Issues
> 
> 2) created a bin/setenv.bat setting some JAVA_OPTS and 
> CATALINA_OPTS as follows:
> 
> set JAVA_OPTS= -XX:MaxPermSize=256M
> set CATALINA_OPTS= -Xms512m -Xmx1024m

You might want to take out the spaces after the "=" characters.  Some platforms 
do not handle that well.

> 1) /admin works fine on each instance, but /manager does not

In what way does the manager webapp not work?  Note that the URL "/manager" 
never works; use "/manager/html" if you want to access the GUI version.

> 2) why no log files are being output anywhere that I've been able to
> determine

Did you create a logs directory under each CATALINA_BASE before starting each 
instance?

- 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


      

RE: Multiple Tomcat Instance Issues

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Rob Gosling [mailto:rob.prog@yahoo.com]
> Subject: Multiple Tomcat Instance Issues
> 
> 2) created a bin/setenv.bat setting some JAVA_OPTS and 
> CATALINA_OPTS as follows:
> 
> set JAVA_OPTS= -XX:MaxPermSize=256M
> set CATALINA_OPTS= -Xms512m -Xmx1024m

You might want to take out the spaces after the "=" characters.  Some platforms do not handle that well.

> 1) /admin works fine on each instance, but /manager does not

In what way does the manager webapp not work?  Note that the URL "/manager" never works; use "/manager/html" if you want to access the GUI version.

> 2) why no log files are being output anywhere that I've been able to
> determine

Did you create a logs directory under each CATALINA_BASE before starting each instance?

 - 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Multiple Tomcat Instance Issues

Posted by Rob Gosling <ro...@yahoo.com>.
Hi Konstantin,

Thanks for that - that resolved the logging immediately.  The 
guides/documentation I had been following did not mention those files, so I 
assumed they would be resolved to the ones in $CATALINA_HOME, which was not 
happening.

I was led to believe the docbase had to be an absolute path, thus why I changed 
it.  I wasn't sure why I needed to change it either - I have changed it back and 
tested and it still works.  


Thanks for your help,
Rob




________________________________
From: Konstantin Kolinko <kn...@gmail.com>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Wed, July 7, 2010 3:36:15 PM
Subject: Re: Multiple Tomcat Instance Issues

2010/7/7 Rob Gosling <ro...@yahoo.com>:
> 1) created a new CATALINA_BASE directory with the following structure:
>         bin
>             setenv.bat
>         conf
>             |- Catalina
>             |    |- localhost
>             |        |-admin.xml
>             |        |-manager.xml
>             |-server.xml
>             |-tomcat-users.xml
>             |-web.xml

context.xml
catalina.properties
logging.properties
are missing

(catalina.policy is also missing, but is not used as you are running
without a security manager)

Missing logging.properties means no logging is configured.

>         logs
>         temp
>         webapps
>         work
>

> 3) modified admin.xml and manager.xml to point docbase back to the
> $CATALINA_HOME webapp location under server/webapps/

\conf\Catalina\localhost\manager.xml  contains the following line:

<Context docBase="${catalina.home}/server/webapps/manager"

Note, that it is ${catalina.home}, not ${catalina.base}.
Thus I see no need to modify that.


Best regards,
Konstantin Kolinko

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


      

Re: Multiple Tomcat Instance Issues

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/7/7 Rob Gosling <ro...@yahoo.com>:
> 1) created a new CATALINA_BASE directory with the following structure:
>         bin
>             setenv.bat
>         conf
>             |- Catalina
>             |    |- localhost
>             |        |-admin.xml
>             |        |-manager.xml
>             |-server.xml
>             |-tomcat-users.xml
>             |-web.xml

context.xml
catalina.properties
logging.properties
 are missing

(catalina.policy is also missing, but is not used as you are running
without a security manager)

Missing logging.properties means no logging is configured.

>         logs
>         temp
>         webapps
>         work
>

> 3) modified admin.xml and manager.xml to point docbase back to the
> $CATALINA_HOME webapp location under server/webapps/

\conf\Catalina\localhost\manager.xml  contains the following line:

<Context docBase="${catalina.home}/server/webapps/manager"

Note, that it is ${catalina.home}, not ${catalina.base}.
Thus I see no need to modify that.


Best regards,
Konstantin Kolinko

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