• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

start/stop Tomcat 7 windows service on 64-bit results in error

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have installed Apache Tomcat 7.0.4 on both Windows 7 (64-bit) and Windows Vista (64-bit) along with Java 6 r22.

I used the .exe installer for Tomcat to get the windows service for tomcat. When I start the service it fails with the following error:

Windows could not start the Apache Tomcat 7 on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to the service-specific error code 0.

If i try to start it again, it starts successfully.

When I try to stop the service, I get the following error:

Windows could not stop the Apache Tomcat 7 service on Local Computer.

Error 109: The pipe has been ended.


Everytime after this it takes 2 tries to start the server and fails with the same error on stop. Other than these errors the server itself is working fine.


 
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the System Event Log give you any more information? Have you tried running it as a non-service?
 
Glen Merrill
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Running it from the command line acts similarly. When i try to start the server, the first time it does nothing (shows nothing in the command prompt) and starts successfully the second time.

And the event log seems to have the same information as the error popup.
Also, this is a clean install of tomcat with no webapps installed and no other instances of tomcat or java installed. We have now tried this on Windows 7, Vista and Windows Server 2003 (all 64-bit). The 64 bit versions of Tomcat 6 we previously used on these machines had no issues on startup/shutdown.

I did notice one thing. If i delete the tomcat7.pid file from the log directory after shutting down tomcat, i can restart it without doing it twice (This is whats happens when i start the service twice, the first time it deletes the pid file and fails and then it starts correctly the second time).
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having the exact same problem with Tomcat 7 on a 32-bit Windows 7 machine. For some reason the tomcat7.pid file is not getting deleted when shutting down the server.
 
Glen Merrill
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After some experimenting, i did get it work by doing the following, i dont know if there are any unintended consequences, but it not starts/stops correctly.

1. Run the tomcat7w.exe config util in tomcat/bin
2) Goto the shutdown tab and change the mode drop down from JVM to Java. I left the startup tab mode as JVM.
 
Brent Miller
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Works for me, thanks!
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Working for me. Thanks!!!
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am experiencing this too.

Is there documentation on what the differences are between Java, jvm, and exe? I can't find any and I am curious what the differences are.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm having the same problem. Once I stop the server, and the error appears, I am not able to edit files in my project. Something seems to be hanging on to the file, so maybe it's not entirely shutting down. If I change the shutdown Mode to "Java" as described above, I am am not able to start the tomcat service.

I have tried Tomcat 6 and Tomcat 7, and am getting the same results. The box tomcat is running on is Windows 2008 R2.

Any help?

Thanks!
Frank

EDIT/UPDATE: I downgraded from 6.0.30 to 6.0.29, and the error goes away. Also, it turns out that the error is benign. the server was actually stopping even though the error occurs. Nothing was hanging on to a file inside the webapps. Permissions was actually keeping me from editing the file.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What fixed this for me is I removed a System.exit call in the destroy method of my servlet. I think tomcat wants to handle ending the application. It doesn't like when you end the application yourself.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AFAIK there are two different problems here.

As already said by Glenn, replacing the Startup and Shutdown mode by JAva instead of JVM should do the trick for those running tomcat 7.06 +
This can be done by running %TOMCAT_HOME%\bin\tomcat7w.exe and go to the "Startup" and "Shutdown" tabs, then change the "Mode" field from "Jvm" to "Java".

But for those running tomcat 7.04 - you also need to disable the use of the Tomcat.pid file.
This can be done by running %TOMCAT_HOME%\bin\tomcat7w.exe and go to the "Logging" tab, then empty the "PID file" field.

In fact the windows installer automatically configure the use of such a file, but running tomcat as a service fails to delete the file which prevents the service to start again. But it seems that starting the service deletes the file and launching it a second time will succeed.

Hope this helps...
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I made both tabs to Java, then I managed to start the service.
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic