Must use catalina_start.bat to start Tomcat (not c'panel)?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Must use catalina_start.bat to start Tomcat (not c'panel)?

Postby sfosparky » 30. May 2013 18:00

For XAMPP 1.8.1, Control Panel 3.1.0 Beta 6, Windows 7 64-bit.

Everything seems to be working EXCEPT that I must use catalina_start.bat and catalina_stop.bat to start and stop Tomcat. That is, I can make things run, I just can't control Tomcat from the Control Panel.

I've looked at several threads on this forum, and haven't seen this specific issue described. That is, things are pretty much working with the exception of the Tomcat Start and Stop buttons in the Control Panel.

If in the XAMPP Control Panel I click Start, Tomcat will not start. The XAMPP Control Panel displays:

Code: Select all
09:35:59 AM  [Tomcat]    Attempting to start Tomcat service...

At that point nothing further happens. (I can use other Start / Stop buttons such as Apache's in the meantime…)

What I can do to start Tomcat is use catalina_start.bat. When I do, the XAMPP Control Panel adds the green "running" status to Tomcat and displays:

Code: Select all
09:46:41 AM  [Tomcat]    Status change detected: running

However, if at this point I view Windows Services —> Apache Tomcat Tomcat7, the service's status doesn't change, even after a Refresh. Despite this, I can log in to the Tomcat Admin page (I evidently set up the password file properly) and run the demo apps: So something called Tomcat is running, anyhow.

Having used catalina_start.bat to start Tomcat, I cannot use the Control Panel's Stop button to stop it. As the complement to the Start command, when I click Stop the Control Panel displays:

Code: Select all
10:12:49 AM  [Tomcat]    Attempting to stop Tomcat service...

Again, nothing further happens.

So I use either CTRL+c in the Command Prompt window, or simply close the Command Prompt window. The XAMPP Control Panel promptly updates the status and reports the abrupt termination of Tomcat.

This is an annoyance more than a show stopper, but insofar as all other Control Panel operations work, I'd like to understand why I can't control Tomcat from the Control Panel.

Cheers & thanks for your help,
Riley
SFO
Last edited by sfosparky on 31. May 2013 16:01, edited 2 times in total.
User avatar
sfosparky
 
Posts: 3
Joined: 30. May 2013 17:16
Location: San Francisco, California USA
Operating System: Windows 7 64-bit

Re: Must use catalina_start.bat to start Tomcat (not c'panel

Postby hackattack142 » 30. May 2013 21:47

Hello,

The control panel sees the service is installed so it will try to start/stop the service directly and not use the batch files.

The batch files start/stop the local (non-service) version.

If you can start one and not the other, most likely you have a mismatch between your version of Java and Tomcat (64-bit Java with 32-bit Tomcat). The batch files avoid this conflict by how it invokes Tomcat but the service uses a different mechanism where it does matter.

Given that, you have 3 options to fix it:
1. Uninstall the service (Click the green check in the control panel) and the control panel will use the batch files which should work for you.
2. Install 32-bit Java (JRE or JDK)
3. Manually update Tomcat to the 64-bit version
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 703
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: Must use catalina_start.bat to start Tomcat (not c'panel

Postby sfosparky » 30. May 2013 23:09

Thanks hackattack142.

What I ended up doing (which I believe may have been your #1 suggestion), was:

  1. In the XAMPP Control Panel, clicked the green check mark to uninstall the Tomcat service.
  2. For the Tomcat service, clicked Start.
Tomcat started straight away. I verified it was running by logging in to the Admin console and running a few of the demo apps.

So the solution in my case, such as it is, is to not use the XAMPP Control Panel to install the Tomcat service but to simply Start Tomcat.

With that fix in hand, I suspect the JRE issue is behind it all. But since my current JRE / JDK works properly for Eclipse, jEdit, LibreOffice 4, a couple of other JRE-using things, and even all other non-Tomcat XAMPP services, I'm loath to screw around with a different Java runtime if I don't have to; Java is enough of a pain in the butt without having to manage the headaches I've encountered when the system contains two variants of it…

Cheers & thanks 'gain,
Riley
SFO
User avatar
sfosparky
 
Posts: 3
Joined: 30. May 2013 17:16
Location: San Francisco, California USA
Operating System: Windows 7 64-bit

Re: Must use catalina_start.bat to start Tomcat (not c'panel

Postby hackattack142 » 31. May 2013 03:31

Hello,

I am a bit confused as to what you are describing.

Are you saying you just hit the start button in the XAMPP Control Panel while it was not installed as a service?

As for Java, you can have 32-bit and 64-bit installed at the same time without issues.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 703
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: Must use catalina_start.bat to start Tomcat (not c'panel

Postby sfosparky » 31. May 2013 15:58

Thanks again for the response.

hackattack142 wrote:Are you saying you just hit the start button in the XAMPP Control Panel while it was not installed as a service?

Yes, that's exactly what I'm saying. It seems to be working, too. (I have a screenshot but can see no convenient way to embed it in this message.) By the by, this not-as-a-service approach also seems to work for other XAMPP components such as Apache.

hackattack142 wrote:As for Java, you can have 32-bit and 64-bit installed at the same time without issues.

Depends on what one means by "issues". My experience, acquired somewhat painfully, has been that if one has a 64-bit JRE and a 32-bit JRE, then one has to take steps to tell applications which one they should use: There is no longer a single default JRE. So having already been obliged to spend time getting my current set of JRE-using applications (jEdit, Eclipse, LibreOffice 4, a couple of other little ones) to run properly by finding The One True JRE, I'm not going to screw things up by installing another JRE just for XAMPP.

The essential point being that for the moment, at least, I've found one way to make XAMPP's Tomcat instance appear to Start. I'm going to leave it that way, at least for now.

Cheers & thanks again,
Riley
SFO
User avatar
sfosparky
 
Posts: 3
Joined: 30. May 2013 17:16
Location: San Francisco, California USA
Operating System: Windows 7 64-bit

Re: Must use catalina_start.bat to start Tomcat (not c'panel

Postby hackattack142 » 01. June 2013 16:51

Fair enough.

You do not need to run anything as a service, it is completely optional. The only real advantage of running a service is that it will automatically start with your computer otherwise they all run standalone just fine.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 703
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 47 guests