This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 250286 - Cannot "stop" Tomcat using the Stop command. Must Terminate the process
Summary: Cannot "stop" Tomcat using the Stop command. Must Terminate the process
Status: REOPENED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 8.0.2
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-07 16:29 UTC by jonycp
Modified: 2017-05-31 03:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jonycp 2015-02-07 16:29:03 UTC
The resolved issues seem all to be on Windows system.  I am on Mac OSX Yosemite 10.10.2.

When I attempt to stop tomcat manually, the system reports the $CATALINA_PID is gone. So the IDE must use the system PID to kill the process.

After starting the Tomcat server, by manually attempting to use the shutdown.sh script the following output is generated:
Using CATALINA_PID:    /usr/local/apache-tomcat-7.0.42/tomcat.pid
$CATALINA_PID was set but the specified file does not exist. Is Tomcat running? Stop aborted.

When I manually run the startup.sh script a .pid file is created and I can successfully use the shutdown.sh script to stop tomcat.
Comment 1 jonycp 2015-02-09 02:08:44 UTC
I added comments to my catalina scripts and noticed NetBeans uses the script to start the server, but no call appears to be made to the shutdown/catalina scripts to stop the server.  Hope that helps.
Comment 2 Petr Hejl 2015-03-18 12:50:25 UTC
So your installation of tomcat is writing to /usr/local is it running as root? That might cause troubles. Does it work for you for Tomcat installed from zip (tgz) to your home folder?
Comment 3 jonycp 2015-03-18 13:23:46 UTC
I will try that, thanks for the idea.
Comment 4 Petr Hejl 2015-04-27 15:13:16 UTC
Let us know about your observations.
Comment 5 jonycp 2015-04-27 15:36:25 UTC
Hello,

Thank you for the reminder.

My computer had to be re-imaged recently, and I had to re-install NetBeans, etc.

I have the following configuration for reference (from NetBeans About)
NetBeans IDE 8.0.2 (Build 201411181905) 
NetBeans IDE is updated to version NetBeans 8.0.2 Patch 1
Java: 1.8.0_40; Java HotSpot(TM) 64-Bit Server VM 25.40-b25
Runtime: Java(TM) SE Runtime Environment 1.8.0_40-b26
Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)


I am using a locally installed apache tomcat.  I added environment variables for JAVA_HOME and CATALINA_HOME. 

At this time, I can start and stop the tomcat server via the UI.

Please mark this issue as you see fit - resolved or if you would like any further information, please let me know.

Thanks again!
Comment 6 Petr Hejl 2015-04-27 15:38:53 UTC
Ok, marking as WORKSFORME.
Comment 7 jdesmet 2016-07-09 18:41:03 UTC
I can replicate the problem:
1. Separate CATALINA_HOME and CATALINA_BASE;
2. Customize $CATALINA_BASE/bin/setenv.sh by adding following line:
CATALINA_PID=${CATALINA_BASE}/temp/tomcat.pid

Now you should be able to start Tomcat, but shutdown will fail.

Please use a version prior to tomcat 8.5.3 to avoid another issue in netbeans during startup. I will post a separate bug in relation to that issue.