Re: Multiple Tomcat Instances with Linux

2004-06-22 Thread shiv juluru
start the server,after that change the port#  in conf file and start the server 
again,i think this may helpful for u

Dan Barron [EMAIL PROTECTED] wrote:Jon,

I have used the CATALINA_HOME/common/lib to share jar files among different 
instances. Not sure if that answers your question though.

Dan

At 10:54 AM 6/21/2004, you wrote:
Dan,

Thanks for the post, good ideas I'm going to try them.
 One thing I'm still not clear on. My application is
configured to deploy shared modules (jar files) under
CATALINA_HOME/shared/lib.

If I create multiple instances, how do I configure the
apps to share the correct version of
CATALINA_HOME/shared/lib?

Do you create a separate document root that contains a
shared/lib for each entry in the server.xml
configuration?

Jon


--- Dan Barron wrote:
  Jon,
 
  I run multiple tomcat services on a Linux box with
  Apache for various
  development and distributions. The way I went about
  it is to setup
  multiple configurations within the
  server.xml file. Each service
  has it own port for connectivity and its own worker
  for mod_jk. I create a
  virtual host entry in mod_jk.conf file which mounts
  the assigned worker
  which in turn points to the specific tomcat service.
  Here's the three
  files I touch to make it work and an example entry.
  My environment is
  Tomcat 4.1.29, mod_jk, and Apache 1.3.27.
 
  Hope this helps.
 
  Dan
 
  *FILE:mod_jk.conf
 
#~~~
  # domain.com Virtual Host Definition
 
#~~~
 
  
  ServerName www.domain.com
  DocumentRoot /usr/www/domain.com
  ErrorLog logs/domain.com/error_log
  CustomLog logs/domain.com/access_log common
 
  ScriptAlias /cgi-bin/
  /usr/www/domain.com/cgi-bin/
 
  
  AllowOverride None
  Options None
  Order allow,deny
  Allow from all
  
 
  JkMount /servlet/* domain_worker
  JkMount /alpha/*.jsp domain_worker
  JkMount /*.jsp domain_worker
 
  
 
  **FILE: workers.properties
 
  worker.list=ajp13, domain_worker
 
  worker.ajp13.port=8009
  worker.ajp13.host=localhost
  worker.ajp13.type=ajp13
 
  worker.ajp13.lbfactor=20
  worker.ajp13.cachesize=20
 
  worker.domain_worker.port=8010
  worker.domain_worker.host=localhost
  worker.domain_worker.type=ajp13
 
  worker.domain_worker.lbfactor=20
  worker.domain_worker.cachesize=20
 
 
  *FILE:server.xml
 
  
  ...
 
  
 
port 8081 --
   
className=org.apache.catalina.connector.http.HttpConnector
  port=8081 minProcessors=5
  maxProcessors=75
  enableLookups=true
  redirectPort=8443
  acceptCount=10 debug=0
  connectionTimeout=6/
 
--
className=org.apache.ajp.tomcat4.Ajp13Connector
  port=8010 minProcessors=5
  maxProcessors=75
  acceptCount=10 debug=0/
 
container hierarchy --
defaultHost=www.domain.com debug=0
 
levels --
className=org.apache.catalina.logger.FileLogger
  prefix=catalina_domain_log.
  suffix=.txt
  timestamp=true/
 
will be shared globally --
className=org.apache.catalina.realm.MemoryRealm /
 
  
appBase=webapps/domain.com
  unpackWARs=true autoDeploy=true
 
   
className=org.apache.catalina.valves.AccessLogValve
  directory=logs
  prefix=domain_access_log. suffix=.txt
  pattern=common/
 
className=org.apache.catalina.logger.FileLogger
  directory=logs
  prefix=domain_log. suffix=.txt
  timestamp=true/
 
  
  
 
  
 
  
 
 
  
 
  
 
 
  At 05:26 PM 6/18/2004, Jon Feauto wrote:
  I see this question posted quite often, but rarely
  answers abound. Is it because this is too complex
  a
  topic to explain in a user group?
  
  I would think it is fairly common, anyone have
  ideas?
  
  Jon
  
  
  --- Jon Feauto wrote:
Hello,
   
I'm certain I am behind the curve on this one,
  but
I've been looking around for several days now
  and
haven't found the answers I need.
   
I'm looking to setup multiple environments for
Tomcat
4x on a single linux server. One for each
  developer
and several others for different versions of
  test.
   
From the mail list archives I've come to
  understand
that CATALINA_BASE can be used to configure
  multiple
instances. However, most examples I've seen use
this
in coordination with multiple server.xml files.
   
I'm hoping there is a trick to this that I'm
missing.
I don't mind the extra configuration as long as
  that
is the recommended approach.
   
For an installation supporting a linux service,
  does
the /etc/init.d/tomcat4 script need to be
  modified
to
set the CATALINA_BASE for each instance started?
   
Do I need to use different port numbers to
  access
those instances?
   
Is the CATALINA_HOME/shared/lib actually
  shared
across instances or can it be unique to an
  instance
according to CATALINA_BASE?
   
 
=== message truncated ===




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than 

Re: Multiple Tomcat Instances with Linux

2004-06-21 Thread Jon Feauto
Dan,

Thanks for the post, good ideas I'm going to try them.
 One thing I'm still not clear on.  My application is
configured to deploy shared modules (jar files) under
CATALINA_HOME/shared/lib.

If I create multiple instances, how do I configure the
apps to share the correct version of
CATALINA_HOME/shared/lib?

Do you create a separate document root that contains a
shared/lib for each Service entry in the server.xml
configuration?

Jon


--- Dan Barron [EMAIL PROTECTED] wrote:
 Jon,
 
 I run multiple tomcat services on a Linux box with
 Apache for various 
 development and distributions.  The way I went about
 it is to setup 
 multiple Service configurations within the
 server.xml file. Each service 
 has it own port for connectivity and its own worker
 for mod_jk.  I create a 
 virtual host entry in mod_jk.conf file which mounts
 the assigned worker 
 which in turn points to the specific tomcat service.
  Here's the three 
 files I touch to make it work and an example entry. 
 My environment is 
 Tomcat 4.1.29, mod_jk, and Apache 1.3.27.
 
 Hope this helps.
 
 Dan
 
 *FILE:mod_jk.conf

#~~~
 # domain.com Virtual Host Definition

#~~~
 
 VirtualHost 10.10.1.10
  ServerName www.domain.com
  DocumentRoot /usr/www/domain.com
  ErrorLog logs/domain.com/error_log
  CustomLog logs/domain.com/access_log common
 
 ScriptAlias /cgi-bin/
 /usr/www/domain.com/cgi-bin/
 
 Directory /usr/www/domain.com/cgi-bin
  AllowOverride None
  Options None
  Order allow,deny
  Allow from all
  /Directory
 
 JkMount /servlet/* domain_worker
 JkMount /alpha/*.jsp domain_worker
 JkMount /*.jsp domain_worker
 
 /VirtualHost
 
 **FILE: workers.properties
 
 worker.list=ajp13, domain_worker
 
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 
 worker.ajp13.lbfactor=20
 worker.ajp13.cachesize=20
 
 worker.domain_worker.port=8010
 worker.domain_worker.host=localhost
 worker.domain_worker.type=ajp13
 
 worker.domain_worker.lbfactor=20
 worker.domain_worker.cachesize=20
 
 
 *FILE:server.xml
 
 Server...
  ...
 
Service name=domain
 
   !-- Define a non-SSL HTTP/1.1 Connector on
 port 8081 --
  Connector

className=org.apache.catalina.connector.http.HttpConnector
 port=8081 minProcessors=5
 maxProcessors=75
 enableLookups=true
 redirectPort=8443
 acceptCount=10 debug=0
 connectionTimeout=6/
 
  !-- Define an AJP 1.3 Connector on port 8010
 --
  Connector
 className=org.apache.ajp.tomcat4.Ajp13Connector
 port=8010 minProcessors=5
 maxProcessors=75
 acceptCount=10 debug=0/
 
 !-- Define the top level container in our
 container hierarchy --
  Engine name=domain
 defaultHost=www.domain.com debug=0
 
!-- Global logger unless overridden at lower
 levels --
Logger
 className=org.apache.catalina.logger.FileLogger
prefix=catalina_domain_log.
 suffix=.txt
timestamp=true/
 
!-- Because this Realm is here, an instance
 will be shared globally --
Realm
 className=org.apache.catalina.realm.MemoryRealm /
 
!-- Define the default virtual host --
Host name=www.domain.com debug=0
 appBase=webapps/domain.com
 unpackWARs=true autoDeploy=true
 
  Valve

className=org.apache.catalina.valves.AccessLogValve
   directory=logs 
 prefix=domain_access_log. suffix=.txt
   pattern=common/
 
  Logger
 className=org.apache.catalina.logger.FileLogger
   directory=logs 
 prefix=domain_log. suffix=.txt
  timestamp=true/
 
  !-- domain Root Context --
  Context path= docBase= debug=0/
 
/Host
 
  /Engine
 
 
/Service
 
 /Server
 
 
 At 05:26 PM 6/18/2004, Jon Feauto wrote:
 I see this question posted quite often, but rarely
 answers abound.  Is it because this is too complex
 a
 topic to explain in a user group?
 
 I would think it is fairly common, anyone have
 ideas?
 
 Jon
 
 
 --- Jon Feauto [EMAIL PROTECTED] wrote:
   Hello,
  
   I'm certain I am behind the curve on this one,
 but
   I've been looking around for several days now
 and
   haven't found the answers I need.
  
   I'm looking to setup multiple environments for
   Tomcat
   4x on a single linux server.  One for each
 developer
   and several others for different versions of
 test.
  
   From the mail list archives I've come to
 understand
   that CATALINA_BASE can be used to configure
 multiple
   instances.  However, most examples I've seen use
   this
   in coordination with multiple server.xml files.
  
   I'm hoping there is a trick to this that I'm
   missing.
   I don't mind the extra configuration as long as
 that
   is the recommended 

Re: Multiple Tomcat Instances with Linux

2004-06-21 Thread Dan Barron
Jon,
I have used the CATALINA_HOME/common/lib to share jar files among different 
Service instances.  Not sure if that answers your question though.

Dan
At 10:54 AM 6/21/2004, you wrote:
Dan,
Thanks for the post, good ideas I'm going to try them.
 One thing I'm still not clear on.  My application is
configured to deploy shared modules (jar files) under
CATALINA_HOME/shared/lib.
If I create multiple instances, how do I configure the
apps to share the correct version of
CATALINA_HOME/shared/lib?
Do you create a separate document root that contains a
shared/lib for each Service entry in the server.xml
configuration?
Jon
--- Dan Barron [EMAIL PROTECTED] wrote:
 Jon,

 I run multiple tomcat services on a Linux box with
 Apache for various
 development and distributions.  The way I went about
 it is to setup
 multiple Service configurations within the
 server.xml file. Each service
 has it own port for connectivity and its own worker
 for mod_jk.  I create a
 virtual host entry in mod_jk.conf file which mounts
 the assigned worker
 which in turn points to the specific tomcat service.
  Here's the three
 files I touch to make it work and an example entry.
 My environment is
 Tomcat 4.1.29, mod_jk, and Apache 1.3.27.

 Hope this helps.

 Dan

 *FILE:mod_jk.conf

#~~~
 # domain.com Virtual Host Definition

#~~~

 VirtualHost 10.10.1.10
  ServerName www.domain.com
  DocumentRoot /usr/www/domain.com
  ErrorLog logs/domain.com/error_log
  CustomLog logs/domain.com/access_log common

 ScriptAlias /cgi-bin/
 /usr/www/domain.com/cgi-bin/

 Directory /usr/www/domain.com/cgi-bin
  AllowOverride None
  Options None
  Order allow,deny
  Allow from all
  /Directory

 JkMount /servlet/* domain_worker
 JkMount /alpha/*.jsp domain_worker
 JkMount /*.jsp domain_worker

 /VirtualHost

 **FILE: workers.properties

 worker.list=ajp13, domain_worker

 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13

 worker.ajp13.lbfactor=20
 worker.ajp13.cachesize=20

 worker.domain_worker.port=8010
 worker.domain_worker.host=localhost
 worker.domain_worker.type=ajp13

 worker.domain_worker.lbfactor=20
 worker.domain_worker.cachesize=20


 *FILE:server.xml

 Server...
  ...

Service name=domain

   !-- Define a non-SSL HTTP/1.1 Connector on
 port 8081 --
  Connector

className=org.apache.catalina.connector.http.HttpConnector
 port=8081 minProcessors=5
 maxProcessors=75
 enableLookups=true
 redirectPort=8443
 acceptCount=10 debug=0
 connectionTimeout=6/

  !-- Define an AJP 1.3 Connector on port 8010
 --
  Connector
 className=org.apache.ajp.tomcat4.Ajp13Connector
 port=8010 minProcessors=5
 maxProcessors=75
 acceptCount=10 debug=0/

 !-- Define the top level container in our
 container hierarchy --
  Engine name=domain
 defaultHost=www.domain.com debug=0

!-- Global logger unless overridden at lower
 levels --
Logger
 className=org.apache.catalina.logger.FileLogger
prefix=catalina_domain_log.
 suffix=.txt
timestamp=true/

!-- Because this Realm is here, an instance
 will be shared globally --
Realm
 className=org.apache.catalina.realm.MemoryRealm /

!-- Define the default virtual host --
Host name=www.domain.com debug=0
 appBase=webapps/domain.com
 unpackWARs=true autoDeploy=true

  Valve

className=org.apache.catalina.valves.AccessLogValve
   directory=logs
 prefix=domain_access_log. suffix=.txt
   pattern=common/

  Logger
 className=org.apache.catalina.logger.FileLogger
   directory=logs
 prefix=domain_log. suffix=.txt
  timestamp=true/

  !-- domain Root Context --
  Context path= docBase= debug=0/

/Host

  /Engine


/Service

 /Server


 At 05:26 PM 6/18/2004, Jon Feauto wrote:
 I see this question posted quite often, but rarely
 answers abound.  Is it because this is too complex
 a
 topic to explain in a user group?
 
 I would think it is fairly common, anyone have
 ideas?
 
 Jon
 
 
 --- Jon Feauto [EMAIL PROTECTED] wrote:
   Hello,
  
   I'm certain I am behind the curve on this one,
 but
   I've been looking around for several days now
 and
   haven't found the answers I need.
  
   I'm looking to setup multiple environments for
   Tomcat
   4x on a single linux server.  One for each
 developer
   and several others for different versions of
 test.
  
   From the mail list archives I've come to
 understand
   that CATALINA_BASE can be used to configure
 multiple
   instances.  However, most examples I've seen use
   this
   in coordination with multiple server.xml files.
  
   I'm 

Re: Multiple Tomcat Instances with Linux

2004-06-21 Thread Jon Feauto
Dan,

That is essentially the situation I am trying to
avoid.  There are several applications within an
instance of Tomcat that share resources from
shared/lib, but those shared/lib resources should not
be shared between instances.

My goal is to have the separate instances represent
independent environments.

Jon


--- Dan Barron [EMAIL PROTECTED] wrote:
 Jon,
 
 I have used the CATALINA_HOME/common/lib to share
 jar files among different 
 Service instances.  Not sure if that answers your
 question though.
 
 Dan
 
 At 10:54 AM 6/21/2004, you wrote:
 Dan,
 
 Thanks for the post, good ideas I'm going to try
 them.
   One thing I'm still not clear on.  My application
 is
 configured to deploy shared modules (jar files)
 under
 CATALINA_HOME/shared/lib.
 
 If I create multiple instances, how do I configure
 the
 apps to share the correct version of
 CATALINA_HOME/shared/lib?
 
 Do you create a separate document root that
 contains a
 shared/lib for each Service entry in the
 server.xml
 configuration?
 
 Jon
 
 
 --- Dan Barron [EMAIL PROTECTED] wrote:
   Jon,
  
   I run multiple tomcat services on a Linux box
 with
   Apache for various
   development and distributions.  The way I went
 about
   it is to setup
   multiple Service configurations within the
   server.xml file. Each service
   has it own port for connectivity and its own
 worker
   for mod_jk.  I create a
   virtual host entry in mod_jk.conf file which
 mounts
   the assigned worker
   which in turn points to the specific tomcat
 service.
Here's the three
   files I touch to make it work and an example
 entry.
   My environment is
   Tomcat 4.1.29, mod_jk, and Apache 1.3.27.
  
   Hope this helps.
  
   Dan
  
   *FILE:mod_jk.conf
  

#~~~
   # domain.com Virtual Host Definition
  

#~~~
  
   VirtualHost 10.10.1.10
ServerName www.domain.com
DocumentRoot /usr/www/domain.com
ErrorLog logs/domain.com/error_log
CustomLog logs/domain.com/access_log common
  
   ScriptAlias /cgi-bin/
   /usr/www/domain.com/cgi-bin/
  
   Directory /usr/www/domain.com/cgi-bin
AllowOverride None
Options None
Order allow,deny
Allow from all
/Directory
  
   JkMount /servlet/* domain_worker
   JkMount /alpha/*.jsp domain_worker
   JkMount /*.jsp domain_worker
  
   /VirtualHost
  
   **FILE: workers.properties
  
   worker.list=ajp13, domain_worker
  
   worker.ajp13.port=8009
   worker.ajp13.host=localhost
   worker.ajp13.type=ajp13
  
   worker.ajp13.lbfactor=20
   worker.ajp13.cachesize=20
  
   worker.domain_worker.port=8010
   worker.domain_worker.host=localhost
   worker.domain_worker.type=ajp13
  
   worker.domain_worker.lbfactor=20
   worker.domain_worker.cachesize=20
  
  
   *FILE:server.xml
  
   Server...
...
  
  Service name=domain
  
 !-- Define a non-SSL HTTP/1.1 Connector
 on
   port 8081 --
Connector
  

className=org.apache.catalina.connector.http.HttpConnector
   port=8081 minProcessors=5
   maxProcessors=75
   enableLookups=true
   redirectPort=8443
   acceptCount=10 debug=0
   connectionTimeout=6/
  
!-- Define an AJP 1.3 Connector on port
 8010
   --
Connector
  
 className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8010 minProcessors=5
   maxProcessors=75
   acceptCount=10 debug=0/
  
   !-- Define the top level container in our
   container hierarchy --
Engine name=domain
   defaultHost=www.domain.com debug=0
  
  !-- Global logger unless overridden at
 lower
   levels --
  Logger
  
 className=org.apache.catalina.logger.FileLogger
  prefix=catalina_domain_log.
   suffix=.txt
  timestamp=true/
  
  !-- Because this Realm is here, an
 instance
   will be shared globally --
  Realm
  
 className=org.apache.catalina.realm.MemoryRealm /
  
  !-- Define the default virtual host --
  Host name=www.domain.com debug=0
   appBase=webapps/domain.com
   unpackWARs=true autoDeploy=true
  
Valve
  

className=org.apache.catalina.valves.AccessLogValve
 directory=logs
   prefix=domain_access_log. suffix=.txt
 pattern=common/
  
Logger
  
 className=org.apache.catalina.logger.FileLogger
 directory=logs
   prefix=domain_log. suffix=.txt
timestamp=true/
  
!-- domain Root Context --
Context path= docBase= debug=0/
  
  /Host
  
/Engine
  
  
  /Service
  
   /Server
  
  
   At 05:26 PM 6/18/2004, Jon Feauto wrote:
   I see this question posted quite often, but
 rarely
   answers abound.  Is it because this is too
 complex
   a
 

Re: Multiple Tomcat Instances with Linux

2004-06-18 Thread Jon Feauto
I see this question posted quite often, but rarely
answers abound.  Is it because this is too complex a
topic to explain in a user group?

I would think it is fairly common, anyone have ideas?

Jon


--- Jon Feauto [EMAIL PROTECTED] wrote:
 Hello,
 
 I'm certain I am behind the curve on this one, but
 I've been looking around for several days now and
 haven't found the answers I need.
 
 I'm looking to setup multiple environments for
 Tomcat
 4x on a single linux server.  One for each developer
 and several others for different versions of test.
 
 From the mail list archives I've come to understand
 that CATALINA_BASE can be used to configure multiple
 instances.  However, most examples I've seen use
 this
 in coordination with multiple server.xml files.
 
 I'm hoping there is a trick to this that I'm
 missing. 
 I don't mind the extra configuration as long as that
 is the recommended approach.
 
 For an installation supporting a linux service, does
 the /etc/init.d/tomcat4 script need to be modified
 to
 set the CATALINA_BASE for each instance started?
 
 Do I need to use different port numbers to access
 those instances?
 
 Is the CATALINA_HOME/shared/lib actually shared
 across instances or can it be unique to an instance
 according to CATALINA_BASE?
 
 Is virtual hosting required to support this type of
 environment?
 
 Any help is appreciated.
 
 Thanks,
 Jon
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
 protection around 
 http://mail.yahoo.com 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 




__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple Tomcat Instances with Linux

2004-06-18 Thread Dan Barron
Jon,
I run multiple tomcat services on a Linux box with Apache for various 
development and distributions.  The way I went about it is to setup 
multiple Service configurations within the server.xml file. Each service 
has it own port for connectivity and its own worker for mod_jk.  I create a 
virtual host entry in mod_jk.conf file which mounts the assigned worker 
which in turn points to the specific tomcat service.  Here's the three 
files I touch to make it work and an example entry.  My environment is 
Tomcat 4.1.29, mod_jk, and Apache 1.3.27.

Hope this helps.
Dan
*FILE:mod_jk.conf
#~~~
# domain.com Virtual Host Definition
#~~~
VirtualHost 10.10.1.10
ServerName www.domain.com
DocumentRoot /usr/www/domain.com
ErrorLog logs/domain.com/error_log
CustomLog logs/domain.com/access_log common
   ScriptAlias /cgi-bin/ /usr/www/domain.com/cgi-bin/
   Directory /usr/www/domain.com/cgi-bin
AllowOverride None
Options None
Order allow,deny
Allow from all
/Directory
   JkMount /servlet/* domain_worker
   JkMount /alpha/*.jsp domain_worker
   JkMount /*.jsp domain_worker
/VirtualHost
**FILE: workers.properties
worker.list=ajp13, domain_worker
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=20
worker.ajp13.cachesize=20
worker.domain_worker.port=8010
worker.domain_worker.host=localhost
worker.domain_worker.type=ajp13
worker.domain_worker.lbfactor=20
worker.domain_worker.cachesize=20
*FILE:server.xml
Server...
...
  Service name=domain
 !-- Define a non-SSL HTTP/1.1 Connector on port 8081 --
Connector className=org.apache.catalina.connector.http.HttpConnector
   port=8081 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=6/
!-- Define an AJP 1.3 Connector on port 8010 --
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8010 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0/
   !-- Define the top level container in our container hierarchy --
Engine name=domain defaultHost=www.domain.com debug=0
  !-- Global logger unless overridden at lower levels --
  Logger className=org.apache.catalina.logger.FileLogger
  prefix=catalina_domain_log. suffix=.txt
  timestamp=true/
  !-- Because this Realm is here, an instance will be shared globally --
  Realm className=org.apache.catalina.realm.MemoryRealm /
  !-- Define the default virtual host --
  Host name=www.domain.com debug=0 appBase=webapps/domain.com
   unpackWARs=true autoDeploy=true
Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=domain_access_log. suffix=.txt
 pattern=common/
Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=domain_log. suffix=.txt
timestamp=true/
!-- domain Root Context --
Context path= docBase= debug=0/
  /Host
/Engine
  /Service
/Server
At 05:26 PM 6/18/2004, Jon Feauto wrote:
I see this question posted quite often, but rarely
answers abound.  Is it because this is too complex a
topic to explain in a user group?
I would think it is fairly common, anyone have ideas?
Jon
--- Jon Feauto [EMAIL PROTECTED] wrote:
 Hello,

 I'm certain I am behind the curve on this one, but
 I've been looking around for several days now and
 haven't found the answers I need.

 I'm looking to setup multiple environments for
 Tomcat
 4x on a single linux server.  One for each developer
 and several others for different versions of test.

 From the mail list archives I've come to understand
 that CATALINA_BASE can be used to configure multiple
 instances.  However, most examples I've seen use
 this
 in coordination with multiple server.xml files.

 I'm hoping there is a trick to this that I'm
 missing.
 I don't mind the extra configuration as long as that
 is the recommended approach.

 For an installation supporting a linux service, does
 the /etc/init.d/tomcat4 script need to be modified
 to
 set the CATALINA_BASE for each instance started?

 Do I need to use different port numbers to access
 those instances?

 Is the CATALINA_HOME/shared/lib actually shared
 across instances or can it be unique to an instance
 according to CATALINA_BASE?

 Is virtual hosting required to support this type of
 environment?

 Any help is appreciated.

 Thanks,
 Jon

 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
 protection around
 http://mail.yahoo.com


-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional 

RE: Multiple Tomcat Instances on Linux Box : Binding exceptions galore : No ideas left

2002-05-19 Thread Webdesign

does tomcat bind to a particular port which is hardcoded in?

Has anyone run multiple instances of tomcat on one machine or is it assumed
that tomcat is run from client machines and not on a central server? If
so,it seems to be a bit strange.

Appreciate any help.

Bert.


 Hi folks.

 I'm trying to setup tomcat on one of our servers so that multiple
 developers
 can have their own tomcat instance, but keep running into bind exceptions.
 I've been fiddling with it for quite a few days but have come to a stage
 where I can't figure out what more to do.

 ___
 Here is the setup:

 We use redhat linux 7.2, tomcat rpm 4.0.3-1, j2sdk-1.4.0.  Tomcat has been
 installed in /var/tomcat4 on the server. For each developer I have set
 CATALINA_BASE to point to their own tomcat directory (
 /home/www/user/tomcat ) which contains the conf/webapps/temp/logs
 directories. I have modified the server.xml file in each users
 directory to
 use unassigned ports ( eg ports 9620 to 9629 for user1, 9630 to 9639 for
 user2 etc...). There are no other services running using any of
 these ports.

 The server is assigned a whole heap of IP addresses, so IPs
 192.168.1.253-240, for instance, all point to the same physical
 machine. All
 ip addesses resolve to a name. ie 192.168.1.253=user1.domain.cxm,
 192.168.1.252=user2.domain.cxm etc... DNS works fine. These
 names are used
 in each users server.xml file (for engine and hosts). No two server.xml
 files share the same hostname.

 Tomcat is started by calling '/usr/bin/tomcat4 start' This script has been
 modified to run the '/usr/bin/dtomcat4' script as the user making
 the call.

 Now, to start each instance, each user telnets into the server
 and executes
 the command '/usr/bin/tomcat4 start'. The directories tomcat uses are all
 correct (it does use the correct CATALINA_BASE).

 _
 The problem is this:

 Tomcat runs for each user if no other tomcat instance is running (I ensure
 that by running gtop on the server and killing instances run by other
 users). However, if one other instance of tomcat is running (by another
 user), we get the error message below.

 I have tried commenting out all the connectors except for non-SSL
 HTTP/1.1.
 I have turned them all on and generated keystore files for SSL.

 I have replaced the hostnames with the IP addresses.

 Nothing seems to work. I am at a complete loss at what to do. If
 anybody has
 ANY idea where to go from here, I am open to suggestions.

 _
 error message is:

 Catalina.start: LifecycleException:  Error creating server socket
 (java.net.BindException):  java.net.BindException: Address already in use
 LifecycleException:  Error creating server socket
 (java.net.BindException):
 java.net.BindException: Address already in use
   at
 org.apache.catalina.connector.warp.WarpConnector.initialize(WarpCo
 nnector.ja
 va:491)
   at
 org.apache.catalina.core.StandardService.initialize(StandardServic
 e.java:454
 )
   at
 org.apache.catalina.core.StandardServer.initialize(StandardServer.
 java:553)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:780)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
 pl.java:39
 )
   at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
 cessorImpl
 .java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
 - Root Cause -
 java.net.BindException: Address already in use
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321)
   at java.net.ServerSocket.bind(ServerSocket.java:308)
   at java.net.ServerSocket.bind(ServerSocket.java:266)
   at java.net.ServerSocket.init(ServerSocket.java:182)
   at java.net.ServerSocket.init(ServerSocket.java:138)
   at
 org.apache.catalina.net.DefaultServerSocketFactory.createSocket(De
 faultServe
 rSocketFactory.java:118)
   at
 org.apache.catalina.connector.warp.WarpConnector.initialize(WarpCo
 nnector.ja
 va:485)
   at
 org.apache.catalina.core.StandardService.initialize(StandardServic
 e.java:454
 )
   at
 org.apache.catalina.core.StandardServer.initialize(StandardServer.
 java:553)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:780)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
 pl.java:39
 )
   at
 

RE: Multiple Tomcat Instances on Linux Box : Binding exceptions galore : - fixed. My error

2002-05-19 Thread Webdesign

Not to worry. After a relaxing weekend I found the problem this morning. I'd
just forgotton to set a port right at the bottom of the server.xml files.

What a dofus. My apologies for adding unnessescary traffic to the list

Bert.

 -Original Message-
 From: Webdesign [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 20 May 2002 9:36 a.m.
 To: Tomcat Users List
 Subject: RE: Multiple Tomcat Instances on Linux Box : Binding exceptions
 galore : No ideas left


 does tomcat bind to a particular port which is hardcoded in?

 Has anyone run multiple instances of tomcat on one machine or is
 it assumed
 that tomcat is run from client machines and not on a central server? If
 so,it seems to be a bit strange.

 Appreciate any help.

 Bert.

 
  Hi folks.
 
  I'm trying to setup tomcat on one of our servers so that multiple
  developers
  can have their own tomcat instance, but keep running into bind
 exceptions.
  I've been fiddling with it for quite a few days but have come to a stage
  where I can't figure out what more to do.
 
  ___
  Here is the setup:
 
  We use redhat linux 7.2, tomcat rpm 4.0.3-1, j2sdk-1.4.0.
 Tomcat has been
  installed in /var/tomcat4 on the server. For each developer I have set
  CATALINA_BASE to point to their own tomcat directory (
  /home/www/user/tomcat ) which contains the conf/webapps/temp/logs
  directories. I have modified the server.xml file in each users
  directory to
  use unassigned ports ( eg ports 9620 to 9629 for user1, 9630 to 9639 for
  user2 etc...). There are no other services running using any of
  these ports.
 
  The server is assigned a whole heap of IP addresses, so IPs
  192.168.1.253-240, for instance, all point to the same physical
  machine. All
  ip addesses resolve to a name. ie 192.168.1.253=user1.domain.cxm,
  192.168.1.252=user2.domain.cxm etc... DNS works fine. These
  names are used
  in each users server.xml file (for engine and hosts). No two server.xml
  files share the same hostname.
 
  Tomcat is started by calling '/usr/bin/tomcat4 start' This
 script has been
  modified to run the '/usr/bin/dtomcat4' script as the user making
  the call.
 
  Now, to start each instance, each user telnets into the server
  and executes
  the command '/usr/bin/tomcat4 start'. The directories tomcat
 uses are all
  correct (it does use the correct CATALINA_BASE).
 
  _
  The problem is this:
 
  Tomcat runs for each user if no other tomcat instance is
 running (I ensure
  that by running gtop on the server and killing instances run by other
  users). However, if one other instance of tomcat is running (by another
  user), we get the error message below.
 
  I have tried commenting out all the connectors except for non-SSL
  HTTP/1.1.
  I have turned them all on and generated keystore files for SSL.
 
  I have replaced the hostnames with the IP addresses.
 
  Nothing seems to work. I am at a complete loss at what to do. If
  anybody has
  ANY idea where to go from here, I am open to suggestions.
 
  _
  error message is:
 
  Catalina.start: LifecycleException:  Error creating server socket
  (java.net.BindException):  java.net.BindException: Address
 already in use
  LifecycleException:  Error creating server socket
  (java.net.BindException):
  java.net.BindException: Address already in use
  at
  org.apache.catalina.connector.warp.WarpConnector.initialize(WarpCo
  nnector.ja
  va:491)
  at
  org.apache.catalina.core.StandardService.initialize(StandardServic
  e.java:454
  )
  at
  org.apache.catalina.core.StandardServer.initialize(StandardServer.
  java:553)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:780)
  at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
  at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
  pl.java:39
  )
  at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
  cessorImpl
  .java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
  - Root Cause -
  java.net.BindException: Address already in use
  at java.net.PlainSocketImpl.socketBind(Native Method)
  at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321)
  at java.net.ServerSocket.bind(ServerSocket.java:308)
  at java.net.ServerSocket.bind(ServerSocket.java:266)
  at java.net.ServerSocket.init(ServerSocket.java:182)
  at java.net.ServerSocket.init(ServerSocket.java:138)
  at
  org.apache.catalina.net.DefaultServerSocketFactory.createSocket(De
  faultServe
  rSocketFactory.java:118)
  at
  org.apache.catalina.connector.warp.WarpConnector.initialize(WarpCo
  nnector.ja
  va:485)
  at
  org.apache.catalina.core.StandardService.initialize(StandardServic
  e.java