Re: running two instances of tomcat

2006-04-05 Thread David Rush
I've tried following the instructions below, and tried using 
service.bat, but either way I always end up with a small pop-up window 
with Application System ... in the title bar, and it says NonAlpha 45.


Any clue what's going on here?

David

Nic Daniau wrote:

OK here we go. What was said above is true but it's not all about the
service, therefore the service.bat script is not enough to resolve the
problem. If you read the nsi install script from the source, you can see
everything that it does, and the setup of the service is just one thing. The
tested procedure which I've used live is as follows:

I assume you have installed tomcat under C:\tomcat-x1 with the intention to
install C:\tomcat-x2, C:\tomcat-x3, etc..
The service names will be called TomcatX1, TomcatX2, TomcatX3, etc.
The Display Names will be Apache Tomcat #1, Apache Tomcat #2, etc.
And of course the ports will be configurred differently (I use for shutdown:
40051, 40052, etc., for http/1.1: 40801, 40802, etc. for ajp/1.3: 40091,
40092, etc.)

First run the following after adapting to your environment:

set TOMCAT_NO=1
set JAVA_HOME=C:\jdk1.5.0_03
set CATALINA_HOME=C:\tomcat-x1
As you can see %TOMCAT_NO% is the iterative number I give to the Tomcat
install I'm dealing with.

Then you can run
%CATALINA_HOME%\bin\tomcat5.exe //DS//Tomcat5
as the service name is hardcoded Tomcat5 in the current tomcat dist.

Then you're free to run:

%CATALINA_HOME%\bin\tomcat5.exe //IS//TomcatX%TOMCAT_NO% --DisplayName
Apache Tomcat #%TOMCAT_NO% --Description v5.5.16 --LogPath
D:\logs\tomcat-x%TOMCAT_NO% --Install %CATALINA_HOME%\bin\tomcat5.exe
--Jvm %JAVA_HOME%\jre\bin\server\jvm.dll --StartPath %CATALINA_HOME%
--StopPath %CATALINA_HOME% --Startup auto --Classpath
%CATALINA_HOME%\bin\bootstrap.jar --StartClass
org.apache.catalina.startup.Bootstrap --StopClass
org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop
--StartMode jvm --StopMode jvm --JvmOptions -
Dcatalina.home=%CATALINA_HOME%#-Dcatalina.base=%CATALINA_HOME%#-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed#-Djava.io.tmpdir=%CATALINA_HOME%\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=%CATALINA_HOME%\conf\logging.properties
--StdOutput auto --StdError auto

(my logs go to a specially created folder on another drive
D:/logs/tomcat-x1)

This was inspired by the .nsi script, which to my mind is more reliable than
the service.bat one.

But that's not all. You need to edit the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\5.5
- rename it to HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software
Foundation\Tomcat\#1

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache
Tomcat 5.5
- rename it to
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache
Tomcat #1
and change DisplayName value to Apache Tomcat #1 (remove only)

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
- remove entry ApacheTomcatMonitor (yes: DELETE, you can always access
the monitor with the menu, it's not needed in the tray esp. if you have many
tomcats)

And lastly, the menu in Program that has been created has also been
hardcoded, so change
Start / All Programs / Apache Tomcat 5.5 menu entry to Apache
Tomcat #1and change the
targets for Configure and Monitor (replace ..//Tomcat5 by ..//TomcatX1).
Thar's where you can start the monitor for each tomcat if you really want to
(IMHO you wont)

That's it and it works like a charm! Don't take my word for it have a look
into the .nsi script and you will see for yourself there is nothing else.

Just a note if you need to unsistall, do a regular uninstallation followed
by:

- delete registry key HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software
Foundation\Tomcat\#1
- delete registry key
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache
Tomcat #1
- remove Start / All Programs / Apache Tomcat #1 menu entry

HTH

Nic

On 22/03/06, Jim the Standing Bear [EMAIL PROTECTED] wrote:
  

Thanks, Chuck.  I will take a closer look at RUNNING.txt.  However, i
still
think there is something else causing our problems..  We installed two
copies of the tomcat code, one running at root, and the other running as a
regular user.  Now, even if the ports were conflicting, it would prevent
one
instance from being launched, instead of killing another instance, would
it?  At one time when i was playing with it on a testing platform (also
linux), the launching of the 2nd instance of tomcat 5.5 even killed a
running tomcat 4.1.31! It was incredible :P

-- Jim



On 3/22/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:


From: Jim the Standing Bear [mailto:[EMAIL PROTECTED]
Subject: Re: running two instances of tomcat

Is there anything special we need to configure to
allow the co-existence (other than the port numbers)?


That should be it, just make sure yout get _all_ the ports.  By default,
there are three for each

Re: running two instances of tomcat

2006-04-05 Thread Nic Daniau
 PROTECTED] wrote:
 
  From: Jim the Standing Bear [mailto:[EMAIL PROTECTED]
  Subject: Re: running two instances of tomcat
 
  Is there anything special we need to configure to
  allow the co-existence (other than the port numbers)?
 
  That should be it, just make sure yout get _all_ the ports.  By
 default,
  there are three for each Tomcat, one more if you enable SSL.  Also,
 you
  might want to look at RUNNING.txt in the distribution for hints about
  running multiple Tomcats with only one copy of the code installed.
 
  - 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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  --
  --
  Standing Bear Has Spoken
  --
 
 
 
 
 


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




Re: running two instances of tomcat

2006-04-05 Thread David Rush
 instance of tomcat 5.5 even killed a
running tomcat 4.1.31! It was incredible :P

-- Jim



On 3/22/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:



From: Jim the Standing Bear [mailto:[EMAIL PROTECTED]
Subject: Re: running two instances of tomcat

Is there anything special we need to configure to
allow the co-existence (other than the port numbers)?



That should be it, just make sure yout get _all_ the ports.  By
  

default,


there are three for each Tomcat, one more if you enable SSL.  Also,
  

you


might want to look at RUNNING.txt in the distribution for hints about
running multiple Tomcats with only one copy of the code installed.

- 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

--
--
Standing Bear Has Spoken
--




  

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





  



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



RE: running two instances of tomcat

2006-03-24 Thread Thomas Bolding
There might definetely be an easier way but I did just that:

i) installed the exe
ii) unzipped a number of Tomcat into other folders
iii) copied exe and dll into those folders
iv) modified ports for the zipped versions of server.xml and ran
service install ...

The original exe you can either remove or disable its service - I'm
using is as the load balancer whereas the zipped TCs handle the
requests. Please note that doing it this way you will have to change the
registry settings as the tomcat_home will point to the exe installation.

Regards Thomas

-Original Message-
From: David Rush [mailto:[EMAIL PROTECTED] 
Sent: 24. marts 2006 16:06
To: Tomcat Users List
Subject: Re: running two instances of tomcat

I'm confused.

I first installed 5.5.15 using the exe (testing on a WinXP machine right
now), and got it working.

But to run multiple instances, it looks as though I need the service.bat
script, which is not included in the .exe.  So I de-installed Tomcat,
downloaded the .zip, and expanded it.  Now I have service.bat, but I no
longer have tomcat5.exe in the bin directory (or anywhere else).

So I need to do one .exe install, then use the .zip for the 2nd, 3rd,
etc. installs, or what?

I see that Nic has posted a rather detailed howto... is that with the
.exe installation?

David

David Kerber wrote:
 I got it working no problem on Windows, running 5.5.12.  Just had to 
 mess with the service installation scripts a bit to give each of them 
 different names.  A little hassle, but not a big one.


 Nic Daniau wrote:

 That was the case in 4.1 yes, but it doesn't work with 5.5 on Windows

 platform, because of the way the service is set up from the nsi scrip

 (that you can read from tomcat source). I've written down a procedure

 to overcome this and I will post it tomorrow (its on my laptop which 
 I left at the office tonight). I've tested it on live servers it 
 works fine.

 Ideally I hope the guys who write the windows deployer will one day 
 allow the installer to ask for
 1) the name of the servive and not force it to Tomcat5 (whic is the 
 main
 issue)
 2) use that service name for setting up the reg keys (and not use
 constants)
 3) let the user choose the name of the Program menu it's copying the 
 shortucut to If I have the time I will post a feature request on 
 bugzilla...

 Will definitively post my step-by-step procedure tomorrow Nic

 On 22/03/06, David Kerber [EMAIL PROTECTED] wrote:
  

 Jim the Standing Bear wrote:

   
 Hi,

 Is there a way to run two instances of tomcat 5.5 on the same
machine?
 Because me and a coworker were developing some webapps using the 
 same
 
 node,
   
 but under two different tomcat instances.  We just learned a 
 painful
 
 lesson
   
 that as soon as the second instance of tomcat is launched, the 
 first one dies.  Is there a way to get around the problem? Thank 
 you.

 -- Jim



 
 I'm running about 4 instances of tomcat on a single machine, so yes 
 it's no problem.  But they need to all be listening on different 
 ports, and might need to be supporting different contexts.




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


   

  




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





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


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



Re: running two instances of tomcat

2006-03-24 Thread Jim the Standing Bear
Hello Nic, and Thomas,

Thank you for taking the time and give out the detailed instructions on how
to run two instances of tomcat 5.5 on windows. In the future we will most
likely to use a few windows boxes and your instructions will certainly be of
great value.  Currently, our development platform is still running Linux.
We initially thought running the two tomcats there would just as easy as
1-2-3; but it certainly proved to be not quite the case.  In any regards, we
appreciate everyone's help on this issue.

-- Jim



On 3/24/06, Thomas Bolding [EMAIL PROTECTED] wrote:

 There might definetely be an easier way but I did just that:

 i) installed the exe
 ii) unzipped a number of Tomcat into other folders
 iii) copied exe and dll into those folders
 iv) modified ports for the zipped versions of server.xml and ran
 service install ...

 The original exe you can either remove or disable its service - I'm
 using is as the load balancer whereas the zipped TCs handle the
 requests. Please note that doing it this way you will have to change the
 registry settings as the tomcat_home will point to the exe installation.

 Regards Thomas

 -Original Message-
 From: David Rush [mailto:[EMAIL PROTECTED]
 Sent: 24. marts 2006 16:06
 To: Tomcat Users List
 Subject: Re: running two instances of tomcat

 I'm confused.

 I first installed 5.5.15 using the exe (testing on a WinXP machine right
 now), and got it working.

 But to run multiple instances, it looks as though I need the service.bat
 script, which is not included in the .exe.  So I de-installed Tomcat,
 downloaded the .zip, and expanded it.  Now I have service.bat, but I no
 longer have tomcat5.exe in the bin directory (or anywhere else).

 So I need to do one .exe install, then use the .zip for the 2nd, 3rd,
 etc. installs, or what?

 I see that Nic has posted a rather detailed howto... is that with the
 .exe installation?

 David

 David Kerber wrote:
  I got it working no problem on Windows, running 5.5.12.  Just had to
  mess with the service installation scripts a bit to give each of them
  different names.  A little hassle, but not a big one.
 
 
  Nic Daniau wrote:
 
  That was the case in 4.1 yes, but it doesn't work with 5.5 on Windows

  platform, because of the way the service is set up from the nsi scrip

  (that you can read from tomcat source). I've written down a procedure

  to overcome this and I will post it tomorrow (its on my laptop which
  I left at the office tonight). I've tested it on live servers it
  works fine.
 
  Ideally I hope the guys who write the windows deployer will one day
  allow the installer to ask for
  1) the name of the servive and not force it to Tomcat5 (whic is the
  main
  issue)
  2) use that service name for setting up the reg keys (and not use
  constants)
  3) let the user choose the name of the Program menu it's copying the
  shortucut to If I have the time I will post a feature request on
  bugzilla...
 
  Will definitively post my step-by-step procedure tomorrow Nic
 
  On 22/03/06, David Kerber [EMAIL PROTECTED] wrote:
 
 
  Jim the Standing Bear wrote:
 
 
  Hi,
 
  Is there a way to run two instances of tomcat 5.5 on the same
 machine?
  Because me and a coworker were developing some webapps using the
  same
 
  node,
 
  but under two different tomcat instances.  We just learned a
  painful
 
  lesson
 
  that as soon as the second instance of tomcat is launched, the
  first one dies.  Is there a way to get around the problem? Thank
  you.
 
  -- Jim
 
 
 
 
  I'm running about 4 instances of tomcat on a single machine, so yes
  it's no problem.  But they need to all be listening on different
  ports, and might need to be supporting different contexts.
 
 
 
 
  
  - To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


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


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




--
--
Standing Bear Has Spoken
--


running two instances of tomcat

2006-03-22 Thread Jim the Standing Bear
Hi,

Is there a way to run two instances of tomcat 5.5 on the same machine?
Because me and a coworker were developing some webapps using the same node,
but under two different tomcat instances.  We just learned a painful lesson
that as soon as the second instance of tomcat is launched, the first one
dies.  Is there a way to get around the problem? Thank you.

-- Jim


Re: running two instances of tomcat

2006-03-22 Thread Nic Daniau
That was the case in 4.1 yes, but it doesn't work with 5.5 on Windows
platform, because of the way the service is set up from the nsi scrip (that
you can read from tomcat source). I've written down a procedure to overcome
this and I will post it tomorrow (its on my laptop which I left at the
office tonight). I've tested it on live servers it works fine.

Ideally I hope the guys who write the windows deployer will one day allow
the installer to ask for
1) the name of the servive and not force it to Tomcat5 (whic is the main
issue)
2) use that service name for setting up the reg keys (and not use constants)
3) let the user choose the name of the Program menu it's copying the
shortucut to
If I have the time I will post a feature request on bugzilla...

Will definitively post my step-by-step procedure tomorrow
Nic

On 22/03/06, David Kerber [EMAIL PROTECTED] wrote:

 Jim the Standing Bear wrote:

 Hi,
 
 Is there a way to run two instances of tomcat 5.5 on the same machine?
 Because me and a coworker were developing some webapps using the same
 node,
 but under two different tomcat instances.  We just learned a painful
 lesson
 that as soon as the second instance of tomcat is launched, the first one
 dies.  Is there a way to get around the problem? Thank you.
 
 -- Jim
 
 
 
 I'm running about 4 instances of tomcat on a single machine, so yes it's
 no problem.  But they need to all be listening on different ports, and
 might need to be supporting different contexts.




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




Re: running two instances of tomcat

2006-03-22 Thread David Kerber
I got it working no problem on Windows, running 5.5.12.  Just had to 
mess with the service installation scripts a bit to give each of them 
different names.  A little hassle, but not a big one.



Nic Daniau wrote:


That was the case in 4.1 yes, but it doesn't work with 5.5 on Windows
platform, because of the way the service is set up from the nsi scrip (that
you can read from tomcat source). I've written down a procedure to overcome
this and I will post it tomorrow (its on my laptop which I left at the
office tonight). I've tested it on live servers it works fine.

Ideally I hope the guys who write the windows deployer will one day allow
the installer to ask for
1) the name of the servive and not force it to Tomcat5 (whic is the main
issue)
2) use that service name for setting up the reg keys (and not use constants)
3) let the user choose the name of the Program menu it's copying the
shortucut to
If I have the time I will post a feature request on bugzilla...

Will definitively post my step-by-step procedure tomorrow
Nic

On 22/03/06, David Kerber [EMAIL PROTECTED] wrote:
 


Jim the Standing Bear wrote:

   


Hi,

Is there a way to run two instances of tomcat 5.5 on the same machine?
Because me and a coworker were developing some webapps using the same
 


node,
   


but under two different tomcat instances.  We just learned a painful
 


lesson
   


that as soon as the second instance of tomcat is launched, the first one
dies.  Is there a way to get around the problem? Thank you.

-- Jim



 


I'm running about 4 instances of tomcat on a single machine, so yes it's
no problem.  But they need to all be listening on different ports, and
might need to be supporting different contexts.




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


   



 





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



RE: running two instances of tomcat

2006-03-22 Thread Caldarale, Charles R
 From: Nic Daniau [mailto:[EMAIL PROTECTED] 
 Subject: Re: running two instances of tomcat
 
 That was the case in 4.1 yes, but it doesn't work with 5.5
 on Windows platform, because of the way the service is set
 up from the nsi scrip (that you can read from tomcat source).

The service.bat script that comes with the .zip download allows you to
specify any arbitrary service name - no special procedures required.
You can use it to install any number of Tomcats running as services.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: running two instances of tomcat

2006-03-22 Thread Jim the Standing Bear
Thanks, Chuck.  I will take a closer look at RUNNING.txt.  However, i still
think there is something else causing our problems..  We installed two
copies of the tomcat code, one running at root, and the other running as a
regular user.  Now, even if the ports were conflicting, it would prevent one
instance from being launched, instead of killing another instance, would
it?  At one time when i was playing with it on a testing platform (also
linux), the launching of the 2nd instance of tomcat 5.5 even killed a
running tomcat 4.1.31! It was incredible :P

-- Jim



On 3/22/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:

  From: Jim the Standing Bear [mailto:[EMAIL PROTECTED]
  Subject: Re: running two instances of tomcat
 
  Is there anything special we need to configure to
  allow the co-existence (other than the port numbers)?

 That should be it, just make sure yout get _all_ the ports.  By default,
 there are three for each Tomcat, one more if you enable SSL.  Also, you
 might want to look at RUNNING.txt in the distribution for hints about
 running multiple Tomcats with only one copy of the code installed.

 - 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
--
Standing Bear Has Spoken
--