I have two instances of Tomcat running on my server. I'm in the process of getting them to run as Windows Services (using the services.bat file in the bin - making sure the two service names are unique) and i'm getting stuck getting the second instance to work as it should (first one is fine). I'm getting the apache 404 error on the second instance when I browse to it. If I stop that windows service and start it up using "catalina start" from the command line, it works as it should. I know the service runs tomcat.exe - but i'm assuming catalina start runs the catalina.bat file? Does "catalina start" do anything additional to running the tomcat.exe file? If so, how do I start it up that way via a service? Thanks in advance!

Recommended Answers

All 5 Replies

First of all why do you wish to run multiple tomcat instances on the same machine ?

Thanks for replying. I inherited the server from a friend who set it up that way. Production and Development. 80, and 8080 respectively. I've got 80 running fine as a service, but 8080 requires access to network drives (privledge-based resources). When I am logged in as myself, and manually start the .bat file 8080 starts up as normal. But when I create a windows service, and point the Application key to that same .bat file and start the service, it looks as if the service starts normaly, but I get 404 errors on the website - meaning to me, whatever permission level the service is running in is not sufficient to access the network places. How do I run the service so that it's acting like me? I don't want to be perpetually logged onto this server in order for it to stay running. Thanks!

Click on Tomcat Icon that comes up in the System tray, and go to Configure Tomcat (Alternatively you go to the Services section in Administrative tools and right click and select configure on the Tomcat Instance you wish to run as "you"), I remember that one of the tabs has a "username" and "password" field to make the tomcat service run as a different user.

Sanjana.reddy.5201: this thread is several years old, it's doubtfull the OP is still following it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.