Win a copy of Getting started with Java programming language this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to remove Window Services for all versions of Tomcat  RSS feed

 
bobby stone
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I had been working on different open source projects. Due to requirements, I have installed Tomcat 6, Tomcat 7 and tons of Java (from V6 to V8). I used the zip file approach to install TC6, TC7 & TC8. I also installed windows services for TC6 & TC7 & TC8. When a project needs TC6, I disable TC7 services… I tried to clean up my computer (Windows) for another project and plan to use WAMP to install all basic modules instead of installing required modules manually. I have problems removing the TC6, TC7, TC8 windows services. First, for some long forgotten reasons, I gave unusual long names for the services (e.g. Apache Tomcat 7.0 Tomcat7). I tried to use the following command in the bin folder to remove TC7 for example:

tomcat7 //DS//"Apache Tomcat 7.0 Tomcat7"

The command windows did not return any errors but the Win service remains (and even after reboot). Please note. When I ran the above command, there was another pop up windows but it closed too quickly for me to see was there any error registered.  Then, I tried to override the existing windows service with the command:

service.bat install "Apache Tomcat 7.0 Tomcat7"

No error returned. I can start TC7 service. I stopped the Win service and removed it again using the above command. No luck. I tried to rename the folder where the unzipped TCx are located (eg. TC7), and tried to remove the services. No luck either.

There is no other project running that is using or referencing TCx (I checked all running Win Services and installed programs).

However, in Window Registry under HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/RADAR/HeapLeakDetection/DiagnosedApplications/, there are registry entries for all versions of TCx.

Can someone kindly tell me how I can get rid of my stubborn Win Services for TCx? I want to use WAMP to install all the necessary modules I need to have. The primary reason I used manual install method for TCx before was I have major port conflicts within TCx with another project I was running and I have to manually change a lot of ports in TCx.

Thanks in advance & Happy Holidays.

Regards,
Sorcerer
 
Rob Spoor
Sheriff
Posts: 20872
71
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, make sure that you use the name of the services, not the display name. What you're using looks like the display name. Open the Services screen, double click on the service, and you'll see both values at the top.
Next, open a command prompt, and use service.bat uninstall <name>. That should remove the service. You will need to refresh (F5) or reopen the Services screen to see the difference.
 
bobby stone
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Rob,
Thank you. So the secret is the actual name for the services and not the display name. I used your method to uninstall TC6 & TC7 w/o problem. However, the same method to uninstall TC8 service issued complaints about the CATALINA_HOME environment variable. I had made changes to make sure TC8 was the one I chose to uninstall. Anyway, I used the previously unsuccessful command: tomcat8 //DS//Tomcat8. Now TC8 service was removed. From your experience, what I did to remove TC8 was OK too. Correct?
I am happy. I can start configurating the next open source project.
Thank you.
Happy Holiday.
Sorcerer
 
Rob Spoor
Sheriff
Posts: 20872
71
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bobby stone wrote:Anyway, I used the previously unsuccessful command: tomcat8 //DS//Tomcat8. Now TC8 service was removed. From your experience, what I did to remove TC8 was OK too. Correct?

I think so, because that's exactly what it says on https://tomcat.apache.org/tomcat-8.0-doc/windows-service-howto.html#Removing_services. I didn't know that command though, I thought you still had to use service.bat.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!