tomcat6 initscript "status" action always return 0

Bug #288218 reported by Thierry Carrez on 2008-10-23
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tomcat6 (Ubuntu)
High
Unassigned

Bug Description

Binary package hint: tomcat6

The tomcat6 initscript "status" action always return 0 (even if tomcat 6 is not started).
That results in unwanted behavior, especially in all the tomcat6 webapps postinsts that test if tomcat6 is started (and may fail trying to restart it).

Mathias Gug (mathiaz) wrote :

That leads to uninstallable packages:

$ sudo apt-get install tomcat6 tomcat6-examples tomcat6-admin tomcat6-user
[...]
Setting up default-jre-headless (1.6-30ubuntu3) ...
Setting up rhino (1.7R1-1ubuntu3) ...

Setting up libaccess-bridge-java (1.24.0-0ubuntu2) ...
Setting up openjdk-6-jre-lib (6b12-0ubuntu4) ...
Setting up libcommons-daemon-java (1.0.2~svn20061127-9ubuntu2) ...

Setting up jsvc (1.0.2~svn20061127-9ubuntu2) ...
Setting up libcommons-collections-java (2.1.1-8ubuntu1) ...

Setting up libcommons-pool-java (1.3-1ubuntu2) ...

Setting up libcommons-dbcp-java (1.2.2-1ubuntu1) ...
Setting up libservlet2.5-java (6.0.18-0ubuntu3) ...
Setting up libtomcat6-java (6.0.18-0ubuntu3) ...
Setting up tomcat6-common (6.0.18-0ubuntu3) ...
Setting up tomcat6 (6.0.18-0ubuntu3) ...
Adding system user `tomcat6' (UID 107) ...
Adding new group `tomcat6' (GID 118) ...
Adding new user `tomcat6' (UID 107) with group `tomcat6' ...
Not creating home directory `/usr/share/tomcat6'.
 * Starting Tomcat servlet engine tomcat6
   ...fail!
invoke-rc.d: initscript tomcat6, action "start" failed.

Setting up tomcat6-admin (6.0.18-0ubuntu3) ...
 * Starting Tomcat servlet engine tomcat6
   ...fail!
invoke-rc.d: initscript tomcat6, action "force-reload" failed.
dpkg: error processing tomcat6-admin (--configure):
 subprocess post-installation script returned error exit status 1
Setting up tomcat6-examples (6.0.18-0ubuntu3) ...
 * Starting Tomcat servlet engine tomcat6
   ...fail!
invoke-rc.d: initscript tomcat6, action "force-reload" failed.
dpkg: error processing tomcat6-examples (--configure):
 subprocess post-installation script returned error exit status 1
Setting up tomcat6-user (6.0.18-0ubuntu3) ...
Setting up openjdk-6-jre-headless (6b12-0ubuntu4) ...
[...]

Changed in tomcat6:
importance: Undecided → High
milestone: none → ubuntu-8.10
status: New → Triaged
Mathias Gug (mathiaz) wrote :

The proposed fixe is:

diff -u tomcat6-6.0.18/debian/tomcat6.init tomcat6-6.0.18/debian/tomcat6.init
--- tomcat6-6.0.18/debian/tomcat6.init
+++ tomcat6-6.0.18/debian/tomcat6.init
@@ -184,8 +184,10 @@

   if [ -f "$CATALINA_PID" ]; then
       log_success_msg "$DESC is not running, but pid file exists."
+ exit 1
   else
       log_success_msg "$DESC is not running."
+ exit 3
   fi
  else
   log_success_msg "$DESC is running with pid `cat $CATALINA_PID`"

Martin Pitt (pitti) wrote :

Part of the diff in bug 287126, acked.

Mathias Gug (mathiaz) wrote :

uploaded

Changed in tomcat6:
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tomcat6 - 6.0.18-0ubuntu3

---------------
tomcat6 (6.0.18-0ubuntu3) intrepid; urgency=low

  * debian/tomcat6.postinst:
    - Make /var/lib/tomcat6/temp writeable by the tomcat6 user (LP: #287126)
    - Make /var/lib/tomcat6/webapps writeable by tomcat6 group (LP: #287447)
  * debian/tomcat6.init: make status return nonzero if tomcat6 is not running
    (fixes LP: #288218)

 -- Thierry Carrez <email address hidden> Thu, 23 Oct 2008 18:19:15 +0200

Changed in tomcat6:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers