You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kapil Godara <ka...@gmail.com> on 2010/04/21 12:51:48 UTC
How to run second instance of Tomcat 6.0.20 on separate port
Hi,
My requirement: To install Opensso and Policy agent on Tomcat 6.0.20 on
single windows server. I installed Opensso on default tomcat port 8080 but
to install the Poilcy agent I need to create a separate instance of tomcat
on different port say 8081.
My procedure:
Step 1 - Installed tomcat 6.0.20 using apache-tomcat-6.0.20.exe at path
TOMCAT_HOME=C:\Program Files\Apache Software Foundation\Tomcat 6.0. It is
running fine
Step 2 - Copied the contents of TOMCAT_HOME to new directory i.e. C:\Program
Files\Apache Software Foundation\Tomcat_instance2 (TOMCAT_HOME2)
Step 3 - Changed the ports (http, shutdown and ajp connecter ports) in
server.xml in TOMCAT_HOME2\conf
Step 4 - Set environmental variable CATALINA_BASE=C:\Program Files\Apache
Software Foundation\Tomcat_instance2 (There is no startup.bat in bin folder)
I start the tomcat from TOMCAT_HOME\bin tomcat6w.exe In browser
http://localhost:8080/ runs fine but when I use http://localhost:8081 it
does not work.
Can you please help me how to run second instance of Tomcat on separate
port?
regards
kapil
Re: How to run second instance of Tomcat 6.0.20 on separate port
Posted by Kapil Godara <ka...@gmail.com>.
Hi,
Thanks a lot to all. I achieved the Goal :)
But still not able to install the second tomcat instance as Windows Service.
Where do i need to make changes?
What I did next is
Step 1 - Copied the contents of C:\tomcat1 into C:\tomcat2
Step 2 - Changed the Http, shutdown and ajp connecter port in server.xml at
C:\tomcat2\conf to 8180, 8105 and 8109
Step 3 - Edited the startup.bat at C:\tomcat2\bin. Deleted all the contents
of it and added
set CATALINA_BASE=C:\tomcat2
C:\tomcat1\bin\startup.bat
Step 4 - Edited the shutdown.bat at C:\tomcat2\bin. Deleted all the contents
of it and added
set CATALINA_BASE=C:\tomcat2
C:\tomcat1\bin\shutdown.bat
Step - 5 Double clicked startup.bat in C:\tomcat2 and in browser used
http://localhost:8180/ to access the new port
Step - 6 Double clicked startup.bat in C:\tomcat1 and in browser used
http://localhost:8080/ to access the default port.
regards
kapil
On Wed, Apr 21, 2010 at 8:08 PM, Kapil Godara <ka...@gmail.com>wrote:
> Hi Andre,
>
> I did as suggested. Tomcat is running fine as service Tomcat1.
>
> I have set CATALINA_HOME=C:\tomcat1 and CATALINA_BASE=C:\tomcat1
> (I set the env var from Control Panel -> System Properties ->Advanced ->
> Environment Variables -> System variables)
>
> What is the next step for additional instance on different port?
>
> thanks and regards
> kapil
>
>
> On Wed, Apr 21, 2010 at 6:09 PM, André Warnier <aw...@ice-sa.com> wrote:
>
>> Kapil Godara wrote:
>>
>>> Hi
>>>
>>> I copied the entire folder Tomcat 6.0 at C:\Program Files\Apache Software
>>> Foundation (where tomcat is installed) to Tomcat_instance2 .
>>>
>> ...
>>
>> Let's start again, from the beginning.
>>
>> This has been discussed many times on this forum, but I believe it is
>> worth repeating it, because it is probably the source of the confusion.
>>
>> In the Tomcat website download page, there are several versions :
>>
>> - one is for Unix/Linux. That is a "complete" version, with all the files
>> packed together in one .tar.gz file. To install it, you unpack these files
>> under one new directory for Tomcat, and it creates a set of subdirectories
>> conf, bin, etc..
>>
>> But for Windows, there are *two* versions :
>> - one is a "simple" version, named "installer", which is destined for the
>> quick and simple installation of a single Tomcat under Windows, to run as a
>> Windows Service. This is apparently the one you downloaded and installed.
>> This version does not contain /all/ the same files as the one for Unix/Linux
>> above, only a subset of them.
>>
>> - the other one is a "zip" version, which does contain all the same files
>> as the Unix/Linux version, and even some additional ones.
>> This version /also/ allows you to install Tomcat as a Windows Service, but
>> this requires a bit more work. It also provides all the files necessary to
>> install a second instance of Tomcat and run it as a second Windows Service.
>> This is the one you should download now.
>>
>> My recommendation is :
>> - remove the first version of Tomcat that you downloaded and installed
>> (the .exe version).
>> - download the zip version
>> - decide on a "main" and "second" directories where you will run your two
>> instances of Tomcat.
>> I suggest that you pick directory paths that are simple, without spaces in
>> the name. Like "c:\tomcat1" and "c:\tomcat2". That will save you time and
>> problems later.
>> - unzip the downloaded Tomcat zip version in the first directory.
>> Note for the future that this is now your "CATALINA_HOME" directory.
>> - in the directory c:\tomcat1\bin, run the "service.bat" script, to
>> install this Tomcat instance as the first Windows Service. Give it the name
>> "Tomcat1".
>> For this Tomcat, the "CATALINA_BASE" is also "c:\tomcat1".
>>
>> When all the above is done and you have a running first Tomcat instance,
>> then come back here for additional information on how to run an additional
>> instance, using the same CATALINA_HOME, but a separate CATALINA_BASE.
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
Re: How to run second instance of Tomcat 6.0.20 on separate port
Posted by Kapil Godara <ka...@gmail.com>.
Hi Andre,
I did as suggested. Tomcat is running fine as service Tomcat1.
I have set CATALINA_HOME=C:\tomcat1 and CATALINA_BASE=C:\tomcat1
(I set the env var from Control Panel -> System Properties ->Advanced ->
Environment Variables -> System variables)
What is the next step for additional instance on different port?
thanks and regards
kapil
On Wed, Apr 21, 2010 at 6:09 PM, André Warnier <aw...@ice-sa.com> wrote:
> Kapil Godara wrote:
>
>> Hi
>>
>> I copied the entire folder Tomcat 6.0 at C:\Program Files\Apache Software
>> Foundation (where tomcat is installed) to Tomcat_instance2 .
>>
> ...
>
> Let's start again, from the beginning.
>
> This has been discussed many times on this forum, but I believe it is worth
> repeating it, because it is probably the source of the confusion.
>
> In the Tomcat website download page, there are several versions :
>
> - one is for Unix/Linux. That is a "complete" version, with all the files
> packed together in one .tar.gz file. To install it, you unpack these files
> under one new directory for Tomcat, and it creates a set of subdirectories
> conf, bin, etc..
>
> But for Windows, there are *two* versions :
> - one is a "simple" version, named "installer", which is destined for the
> quick and simple installation of a single Tomcat under Windows, to run as a
> Windows Service. This is apparently the one you downloaded and installed.
> This version does not contain /all/ the same files as the one for Unix/Linux
> above, only a subset of them.
>
> - the other one is a "zip" version, which does contain all the same files
> as the Unix/Linux version, and even some additional ones.
> This version /also/ allows you to install Tomcat as a Windows Service, but
> this requires a bit more work. It also provides all the files necessary to
> install a second instance of Tomcat and run it as a second Windows Service.
> This is the one you should download now.
>
> My recommendation is :
> - remove the first version of Tomcat that you downloaded and installed (the
> .exe version).
> - download the zip version
> - decide on a "main" and "second" directories where you will run your two
> instances of Tomcat.
> I suggest that you pick directory paths that are simple, without spaces in
> the name. Like "c:\tomcat1" and "c:\tomcat2". That will save you time and
> problems later.
> - unzip the downloaded Tomcat zip version in the first directory.
> Note for the future that this is now your "CATALINA_HOME" directory.
> - in the directory c:\tomcat1\bin, run the "service.bat" script, to install
> this Tomcat instance as the first Windows Service. Give it the name
> "Tomcat1".
> For this Tomcat, the "CATALINA_BASE" is also "c:\tomcat1".
>
> When all the above is done and you have a running first Tomcat instance,
> then come back here for additional information on how to run an additional
> instance, using the same CATALINA_HOME, but a separate CATALINA_BASE.
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: How to run second instance of Tomcat 6.0.20 on separate port
Posted by André Warnier <aw...@ice-sa.com>.
Kapil Godara wrote:
> Hi
>
> I copied the entire folder Tomcat 6.0 at C:\Program Files\Apache Software
> Foundation (where tomcat is installed) to Tomcat_instance2 .
...
Let's start again, from the beginning.
This has been discussed many times on this forum, but I believe it is
worth repeating it, because it is probably the source of the confusion.
In the Tomcat website download page, there are several versions :
- one is for Unix/Linux. That is a "complete" version, with all the
files packed together in one .tar.gz file. To install it, you unpack
these files under one new directory for Tomcat, and it creates a set of
subdirectories conf, bin, etc..
But for Windows, there are *two* versions :
- one is a "simple" version, named "installer", which is destined for
the quick and simple installation of a single Tomcat under Windows, to
run as a Windows Service. This is apparently the one you downloaded and
installed. This version does not contain /all/ the same files as the one
for Unix/Linux above, only a subset of them.
- the other one is a "zip" version, which does contain all the same
files as the Unix/Linux version, and even some additional ones.
This version /also/ allows you to install Tomcat as a Windows Service,
but this requires a bit more work. It also provides all the files
necessary to install a second instance of Tomcat and run it as a second
Windows Service.
This is the one you should download now.
My recommendation is :
- remove the first version of Tomcat that you downloaded and installed
(the .exe version).
- download the zip version
- decide on a "main" and "second" directories where you will run your
two instances of Tomcat.
I suggest that you pick directory paths that are simple, without spaces
in the name. Like "c:\tomcat1" and "c:\tomcat2". That will save you
time and problems later.
- unzip the downloaded Tomcat zip version in the first directory.
Note for the future that this is now your "CATALINA_HOME" directory.
- in the directory c:\tomcat1\bin, run the "service.bat" script, to
install this Tomcat instance as the first Windows Service. Give it the
name "Tomcat1".
For this Tomcat, the "CATALINA_BASE" is also "c:\tomcat1".
When all the above is done and you have a running first Tomcat instance,
then come back here for additional information on how to run an
additional instance, using the same CATALINA_HOME, but a separate
CATALINA_BASE.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: How to run second instance of Tomcat 6.0.20 on separate port
Posted by Peter Crowther <pe...@melandra.com>.
On 21 April 2010 13:04, Kapil Godara <ka...@gmail.com> wrote:
> (I installed tomcat 6.0.20 using apache-tomcat-6.0.20.exe, it does not
> create any startup.bat or shutdown.bat file in bin folder. this
> installation
> creates window service. tomcat6w.exe in turn calls tomcat6.exe)
>
> That's your issue. For no good reason that anyone on this list has been
able to fathom, the .exe doesn't contain the batch files; the .zip download
does.
To get this running, I suggest you:
1) Download the .zip version of 6.0.20;
2) Unzip it somewhere safe;
3) Copy the missing .bat files to your second installation;
4) Carry on with what you were doing now that you have the files.
If you later want to install the second instance as a second service, you
can do that - but I'd get it running standalone first. It's far easier to
debug startup errors on a standalone Tomcat, in my experience.
- Peter
Re: How to run second instance of Tomcat 6.0.20 on separate port
Posted by Kapil Godara <ka...@gmail.com>.
Hi
I copied the entire folder Tomcat 6.0 at C:\Program Files\Apache Software
Foundation (where tomcat is installed) to Tomcat_instance2 .
(I installed tomcat 6.0.20 using apache-tomcat-6.0.20.exe, it does not
create any startup.bat or shutdown.bat file in bin folder. this installation
creates window service. tomcat6w.exe in turn calls tomcat6.exe)
I have set two environment variables as
CATALINA_HOME=C:\Program Files\Apache Software Foundation\Tomcat 6.0 and
CATALINA_BASE= C:\Program Files\Apache Software Foundation\Tomcat_instance2
Am I missing something? I did read RUNNING.txt it says in bin I should have
setenv.bat. Do i need to create this? What should be written in this bat
file?
regards
kapil
On Wed, Apr 21, 2010 at 5:07 PM, Pid <pi...@pidster.com> wrote:
> On 21/04/2010 12:02, Kapil Godara wrote:
> > Hi
> >
> > There is no startup.bat in bin folder. following are the 5 files in bin
> > folder
> >
> > 1.bootstrap.jar
> > 2.tomcat-juli.jar
> > 3.tcnative-1.dll
> > 4.tomcat6.exe
> > 5.tomcat6w.exe
> >
> > Regards
> > kapil
>
> I think you didn't copy the entire installation.
>
> You can run two Tomcat instances from the same installed binary by
> setting separate CATALINA_BASE and CATALINA_HOME environment variables.
>
> See the file: path/to/tomcat/RUNNING.txt
>
>
> p
>
>
> > On Wed, Apr 21, 2010 at 4:29 PM, Mercy <te...@gmail.com> wrote:
> >
> >> Hi,
> >>
> >> Please try to execute *startup.bat* in bin folder to startup your
> tomcat
> >> instance.
> >>
> >> Kind regards,
> >> Mercy
> >>
> >>
> >>
> >> Kapil Godara wrote:
> >>
> >>> Hi,
> >>> My requirement: To install Opensso and Policy agent on Tomcat 6.0.20 on
> >>> single windows server. I installed Opensso on default tomcat port 8080
> but
> >>> to install the Poilcy agent I need to create a separate instance of
> tomcat
> >>> on different port say 8081.
> >>>
> >>> My procedure:
> >>>
> >>> Step 1 - Installed tomcat 6.0.20 using apache-tomcat-6.0.20.exe at path
> >>> TOMCAT_HOME=C:\Program Files\Apache Software Foundation\Tomcat 6.0. It
> is
> >>> running fine
> >>> Step 2 - Copied the contents of TOMCAT_HOME to new directory i.e.
> >>> C:\Program
> >>> Files\Apache Software Foundation\Tomcat_instance2 (TOMCAT_HOME2)
> >>> Step 3 - Changed the ports (http, shutdown and ajp connecter ports) in
> >>> server.xml in TOMCAT_HOME2\conf
> >>> Step 4 - Set environmental variable CATALINA_BASE=C:\Program
> Files\Apache
> >>> Software Foundation\Tomcat_instance2 (There is no startup.bat in bin
> >>> folder)
> >>>
> >>> I start the tomcat from TOMCAT_HOME\bin tomcat6w.exe In browser
> >>> http://localhost:8080/ runs fine but when I use http://localhost:8081it
> >>> does not work.
> >>>
> >>> Can you please help me how to run second instance of Tomcat on separate
> >>> port?
> >>>
> >>> regards
> >>> kapil
> >>>
> >>>
> >>>
> >>
> >>
> >
>
>
>
Re: How to run second instance of Tomcat 6.0.20 on separate port
Posted by Pid <pi...@pidster.com>.
On 21/04/2010 12:02, Kapil Godara wrote:
> Hi
>
> There is no startup.bat in bin folder. following are the 5 files in bin
> folder
>
> 1.bootstrap.jar
> 2.tomcat-juli.jar
> 3.tcnative-1.dll
> 4.tomcat6.exe
> 5.tomcat6w.exe
>
> Regards
> kapil
I think you didn't copy the entire installation.
You can run two Tomcat instances from the same installed binary by
setting separate CATALINA_BASE and CATALINA_HOME environment variables.
See the file: path/to/tomcat/RUNNING.txt
p
> On Wed, Apr 21, 2010 at 4:29 PM, Mercy <te...@gmail.com> wrote:
>
>> Hi,
>>
>> Please try to execute *startup.bat* in bin folder to startup your tomcat
>> instance.
>>
>> Kind regards,
>> Mercy
>>
>>
>>
>> Kapil Godara wrote:
>>
>>> Hi,
>>> My requirement: To install Opensso and Policy agent on Tomcat 6.0.20 on
>>> single windows server. I installed Opensso on default tomcat port 8080 but
>>> to install the Poilcy agent I need to create a separate instance of tomcat
>>> on different port say 8081.
>>>
>>> My procedure:
>>>
>>> Step 1 - Installed tomcat 6.0.20 using apache-tomcat-6.0.20.exe at path
>>> TOMCAT_HOME=C:\Program Files\Apache Software Foundation\Tomcat 6.0. It is
>>> running fine
>>> Step 2 - Copied the contents of TOMCAT_HOME to new directory i.e.
>>> C:\Program
>>> Files\Apache Software Foundation\Tomcat_instance2 (TOMCAT_HOME2)
>>> Step 3 - Changed the ports (http, shutdown and ajp connecter ports) in
>>> server.xml in TOMCAT_HOME2\conf
>>> Step 4 - Set environmental variable CATALINA_BASE=C:\Program Files\Apache
>>> Software Foundation\Tomcat_instance2 (There is no startup.bat in bin
>>> folder)
>>>
>>> I start the tomcat from TOMCAT_HOME\bin tomcat6w.exe In browser
>>> http://localhost:8080/ runs fine but when I use http://localhost:8081 it
>>> does not work.
>>>
>>> Can you please help me how to run second instance of Tomcat on separate
>>> port?
>>>
>>> regards
>>> kapil
>>>
>>>
>>>
>>
>>
>
Re: How to run second instance of Tomcat 6.0.20 on separate port
Posted by Kapil Godara <ka...@gmail.com>.
Hi
There is no startup.bat in bin folder. following are the 5 files in bin
folder
1.bootstrap.jar
2.tomcat-juli.jar
3.tcnative-1.dll
4.tomcat6.exe
5.tomcat6w.exe
Regards
kapil
On Wed, Apr 21, 2010 at 4:29 PM, Mercy <te...@gmail.com> wrote:
> Hi,
>
> Please try to execute *startup.bat* in bin folder to startup your tomcat
> instance.
>
> Kind regards,
> Mercy
>
>
>
> Kapil Godara wrote:
>
>> Hi,
>> My requirement: To install Opensso and Policy agent on Tomcat 6.0.20 on
>> single windows server. I installed Opensso on default tomcat port 8080 but
>> to install the Poilcy agent I need to create a separate instance of tomcat
>> on different port say 8081.
>>
>> My procedure:
>>
>> Step 1 - Installed tomcat 6.0.20 using apache-tomcat-6.0.20.exe at path
>> TOMCAT_HOME=C:\Program Files\Apache Software Foundation\Tomcat 6.0. It is
>> running fine
>> Step 2 - Copied the contents of TOMCAT_HOME to new directory i.e.
>> C:\Program
>> Files\Apache Software Foundation\Tomcat_instance2 (TOMCAT_HOME2)
>> Step 3 - Changed the ports (http, shutdown and ajp connecter ports) in
>> server.xml in TOMCAT_HOME2\conf
>> Step 4 - Set environmental variable CATALINA_BASE=C:\Program Files\Apache
>> Software Foundation\Tomcat_instance2 (There is no startup.bat in bin
>> folder)
>>
>> I start the tomcat from TOMCAT_HOME\bin tomcat6w.exe In browser
>> http://localhost:8080/ runs fine but when I use http://localhost:8081 it
>> does not work.
>>
>> Can you please help me how to run second instance of Tomcat on separate
>> port?
>>
>> regards
>> kapil
>>
>>
>>
>
>
Re: How to run second instance of Tomcat 6.0.20 on separate port
Posted by Mercy <te...@gmail.com>.
Hi,
Please try to execute *startup.bat* in bin folder to startup your
tomcat instance.
Kind regards,
Mercy
Kapil Godara wrote:
> Hi,
> My requirement: To install Opensso and Policy agent on Tomcat 6.0.20 on
> single windows server. I installed Opensso on default tomcat port 8080 but
> to install the Poilcy agent I need to create a separate instance of tomcat
> on different port say 8081.
>
> My procedure:
>
> Step 1 - Installed tomcat 6.0.20 using apache-tomcat-6.0.20.exe at path
> TOMCAT_HOME=C:\Program Files\Apache Software Foundation\Tomcat 6.0. It is
> running fine
> Step 2 - Copied the contents of TOMCAT_HOME to new directory i.e. C:\Program
> Files\Apache Software Foundation\Tomcat_instance2 (TOMCAT_HOME2)
> Step 3 - Changed the ports (http, shutdown and ajp connecter ports) in
> server.xml in TOMCAT_HOME2\conf
> Step 4 - Set environmental variable CATALINA_BASE=C:\Program Files\Apache
> Software Foundation\Tomcat_instance2 (There is no startup.bat in bin folder)
>
> I start the tomcat from TOMCAT_HOME\bin tomcat6w.exe In browser
> http://localhost:8080/ runs fine but when I use http://localhost:8081 it
> does not work.
>
> Can you please help me how to run second instance of Tomcat on separate
> port?
>
> regards
> kapil
>
>