You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jimpo <ja...@gofore.com> on 2007/11/20 10:10:26 UTC

Killing tomcat java process, Windows

I run two separate tomcat 6 instances on my development environment. Once I
have redeployed the application enough times, the tomcat java.exe freezes
and has to be shutdown using control-c. shutdown.bat does not work most of
the times. I start the tomcat processes with startup.bat, they are not
windows services.

< I know, one path is to try and fix the redeployment problem, but let's not
go there in this thread >

I would like to create a .bat script which shuts down the frozen tomcat
java.exe processes (and calls startup.bat scripts). How could I accomplish
this in Windows? In unix I would have plenty of tools (ps/grep/kill/etc),
but can this be done in Windows? The process name alone is not enough to
identify the tomcat processes, as there are several java.exe processes
running.

What about running the instances as windows services, can those be killed /
started again more easily?
-- 
View this message in context: http://www.nabble.com/Killing-tomcat-java-process%2C-Windows-tf4842107.html#a13853324
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Killing tomcat java process, Windows

Posted by Niki Diulgerov <nd...@imx.fr>.
Here is the procedure.
I installed the second tomcat using this command:
tomcat5.exe //IS//ApacheTomcat2
--DisplayName="Apache Tomcat 5 2"
--Install="C:/Program Files/Apache Software Foundation/Tomcat 5.5
2/bin/tomcat5.exe"
--Jvm=auto
--StartMode=jvm
--StopMode=jvm
--StartClass=org.apache.catalina.startup.Bootstrap
--StartParams=start
--StopClass=org.apache.catalina.startup.Bootstrap
--StopParams=stop
Because in this line we named the new tomcat service as ApacheTomcat2. 
We have to
rename the tomcat5w.exe process to ApacheTomcat2w.exe, because we called 
it like this,
when we start the service it looks for the ServiceNamew.exe. After 
renaming you run the
new ApacheTomcat2w.exe and insert all the settings from your firstly 
installed tomcat.

Best regards,

Nikolay Diulgerov
Network Administrator
E-mail: ndiulgerov@imx.fr
Telephone : +33 4 89 87 77 77
Fax :       +33 4 89 87 77 00
Web: http://www.codix-france.com




raghav wrote:
> Hey i need small information from you.
> please it is very urgent for me.
> can you tell me the procedure for creating the multiple instances for
> tomcat?
> plaese
> my mail id is
> raghu279@gmail.com
>
> THanks,
> RAghavender
>
> jimpo wrote:
>   
>> I run two separate tomcat 6 instances on my development environment. Once
>> I have redeployed the application enough times, the tomcat java.exe
>> freezes and has to be shutdown using control-c. shutdown.bat does not work
>> most of the times. I start the tomcat processes with startup.bat, they are
>> not windows services.
>>
>> < I know, one path is to try and fix the redeployment problem, but let's
>> not go there in this thread >
>>
>> I would like to create a .bat script which shuts down the frozen tomcat
>> java.exe processes (and calls startup.bat scripts). How could I accomplish
>> this in Windows? In unix I would have plenty of tools (ps/grep/kill/etc),
>> but can this be done in Windows? The process name alone is not enough to
>> identify the tomcat processes, as there are several java.exe processes
>> running.
>>
>> What about running the instances as windows services, can those be killed
>> / started again more easily?
>>
>>     
>
>   

Re: Killing tomcat java process, Windows

Posted by raghav <ra...@gmail.com>.
Hey i need small information from you.
please it is very urgent for me.
can you tell me the procedure for creating the multiple instances for
tomcat?
plaese
my mail id is
raghu279@gmail.com

THanks,
RAghavender

jimpo wrote:
> 
> I run two separate tomcat 6 instances on my development environment. Once
> I have redeployed the application enough times, the tomcat java.exe
> freezes and has to be shutdown using control-c. shutdown.bat does not work
> most of the times. I start the tomcat processes with startup.bat, they are
> not windows services.
> 
> < I know, one path is to try and fix the redeployment problem, but let's
> not go there in this thread >
> 
> I would like to create a .bat script which shuts down the frozen tomcat
> java.exe processes (and calls startup.bat scripts). How could I accomplish
> this in Windows? In unix I would have plenty of tools (ps/grep/kill/etc),
> but can this be done in Windows? The process name alone is not enough to
> identify the tomcat processes, as there are several java.exe processes
> running.
> 
> What about running the instances as windows services, can those be killed
> / started again more easily?
> 

-- 
View this message in context: http://www.nabble.com/Killing-tomcat-java-process%2C-Windows-tf4842107.html#a13876121
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Killing tomcat java process, Windows

Posted by jimpo <ja...@gofore.com>.
Great, seems like a good plan, I'll try that.

It also seems there is no need to install support tools kit for the kill
command, as Windows XP comes with "taskkill" command which I can use.


br1 wrote:
> 
> Janne,
> 
> When running Tomcat as a Windows service it will appear in the task
> manager as - for instance - "Tomcat5.exe".
> For each instance I use to rename the Tomcat executable to the instance
> name, so to distinguish between them easily.
> Note that you will have to change a bit the service installer batch.
> You can then run or schedule a batch that does a "net stop servicename"
> first and then a kill, you never know. The kill command is
> in the Support Tools kit.
> 
> By the way, I just discovered that the Windows service installer installs
> Tomcat without the juli LogManager, so you will have to
> copy a line from the catilina.bat/sh to enable it.
> 
> Hope it helps,
> b.
> 
> ----- Original Message ----- 
> From: "jimpo" <ja...@gofore.com>
> To: <us...@tomcat.apache.org>
> Sent: Tuesday, November 20, 2007 10:10 AM
> Subject: Killing tomcat java process, Windows
> 
> 
>>
>> I run two separate tomcat 6 instances on my development environment. Once
>> I
>> have redeployed the application enough times, the tomcat java.exe freezes
>> and has to be shutdown using control-c. shutdown.bat does not work most
>> of
>> the times. I start the tomcat processes with startup.bat, they are not
>> windows services.
>>
>> < I know, one path is to try and fix the redeployment problem, but let's
>> not
>> go there in this thread >
>>
>> I would like to create a .bat script which shuts down the frozen tomcat
>> java.exe processes (and calls startup.bat scripts). How could I
>> accomplish
>> this in Windows? In unix I would have plenty of tools (ps/grep/kill/etc),
>> but can this be done in Windows? The process name alone is not enough to
>> identify the tomcat processes, as there are several java.exe processes
>> running.
>>
>> What about running the instances as windows services, can those be killed
>> /
>> started again more easily?
>> -- 
>> View this message in context:
>> http://www.nabble.com/Killing-tomcat-java-process%2C-Windows-tf4842107.html#a13853324
>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> ---AV & Spam Filtering by M+Guardian - Risk Free Email (TM)---
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Killing-tomcat-java-process%2C-Windows-tf4842107.html#a13857677
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Killing tomcat java process, Windows

Posted by myrealbruno <my...@myrealbox.com>.
Janne,

When running Tomcat as a Windows service it will appear in the task manager as - for instance - "Tomcat5.exe".
For each instance I use to rename the Tomcat executable to the instance name, so to distinguish between them easily.
Note that you will have to change a bit the service installer batch.
You can then run or schedule a batch that does a "net stop servicename" first and then a kill, you never know. The kill command is
in the Support Tools kit.

By the way, I just discovered that the Windows service installer installs Tomcat without the juli LogManager, so you will have to
copy a line from the catilina.bat/sh to enable it.

Hope it helps,
b.

----- Original Message ----- 
From: "jimpo" <ja...@gofore.com>
To: <us...@tomcat.apache.org>
Sent: Tuesday, November 20, 2007 10:10 AM
Subject: Killing tomcat java process, Windows


>
> I run two separate tomcat 6 instances on my development environment. Once I
> have redeployed the application enough times, the tomcat java.exe freezes
> and has to be shutdown using control-c. shutdown.bat does not work most of
> the times. I start the tomcat processes with startup.bat, they are not
> windows services.
>
> < I know, one path is to try and fix the redeployment problem, but let's not
> go there in this thread >
>
> I would like to create a .bat script which shuts down the frozen tomcat
> java.exe processes (and calls startup.bat scripts). How could I accomplish
> this in Windows? In unix I would have plenty of tools (ps/grep/kill/etc),
> but can this be done in Windows? The process name alone is not enough to
> identify the tomcat processes, as there are several java.exe processes
> running.
>
> What about running the instances as windows services, can those be killed /
> started again more easily?
> -- 
> View this message in context: http://www.nabble.com/Killing-tomcat-java-process%2C-Windows-tf4842107.html#a13853324
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>



---AV & Spam Filtering by M+Guardian - Risk Free Email (TM)---


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