Installation over Sun JVM might fail if JVM is not yet configured

Bug #274365 reported by Thierry Carrez on 2008-09-25
4
Affects Status Importance Assigned to Milestone
tomcat5.5 (Ubuntu)
Undecided
Unassigned
tomcat6 (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: tomcat6

Reproduction:
On a new intrepid install, run:
$ sudo apt-get install sun-java6-jre tomcat6

Analysis:
Tomcat 6 installation fails because Tomcat 6 postinst may try to start Tomcat before Sun's JDK is fully configured, and failure is non-recoverable.

Fix:
Tomcat 6 installation should not fail if tomcat cannot be properly started.

Related branches

Thierry Carrez (ttx) wrote :

Rather than a complex pre-depend on a virtual we should just make the installation succeed even if tomcat startup failed (use --error-handler=true in dh_installinit in debian/rules).

Changed in tomcat6:
importance: Undecided → Low
status: New → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tomcat5.5 - 5.5.26-3ubuntu2

---------------
tomcat5.5 (5.5.26-3ubuntu2) intrepid; urgency=low

  * Don't fail install if Tomcat cannot be started (LP: #274365, LP: #212536)

 -- Thierry Carrez <email address hidden> Mon, 29 Sep 2008 15:03:01 +0200

Changed in tomcat5.5:
status: New → Fix Released
Thierry Carrez (ttx) wrote :

Fix for tomcat6

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

  * debian/rules: call dh_installinit with --error-handler so that install
    doesn't fail if Tomcat cannot be started during configure (LP: #274365)

 -- Thierry Carrez <thierry.carrez@xxx> Mon, 06 Oct 2008 13:55:21 +0200

Changed in tomcat6:
status: Triaged → Confirmed
Mathias Gug (mathiaz) wrote :

I don't think a PreDepends is necessary in that case. It may be an issue with a circular dependency.

Here is a log of the postinst:

Setting up sun-java6-jre (6-07-4ubuntu2) ...

Setting up libcommons-daemon-java (1.0.2~svn20061127-9ubuntu1) ...

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

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

Setting up libcommons-dbcp-java (1.2.2-1ubuntu1) ...
Setting up libservlet2.5-java (6.0.18-0ubuntu1) ...
Setting up libtomcat6-java (6.0.18-0ubuntu1) ...
Setting up tomcat6-common (6.0.18-0ubuntu1) ...
Setting up tomcat6 (6.0.18-0ubuntu1) ...
Adding system user `tomcat6' (UID 108) ...
Adding new group `tomcat6' (GID 119) ...
Adding new user `tomcat6' (UID 108) with group `tomcat6' ...
Not creating home directory `/usr/share/tomcat6'.
 * Starting Tomcat servlet engine tomcat6
   ...fail!
invoke-rc.d: initscript tomcat6, action "start" failed.
dpkg: error processing tomcat6 (--configure):
 subprocess post-installation script returned error exit status 1
Setting up sun-java6-bin (6-07-4ubuntu2) ...

sun-java6-jre is configured before tomcat6. sun-java6-jre depends on sun-java6-bin (which is the package that provides the java binary) however sun-java6-bin is configure after sun-java6-jre (and after tomcat6 which fails).

There may be an issue in the dependencies between sun-java6-jre and sun-java6-bin:

$ apt-cache depends sun-java6-jre sun-java6-bin | grep sun-java6
sun-java6-bin
  Depends: sun-java6-jre
sun-java6-jre
 |Depends: sun-java6-bin

Mathias Gug (mathiaz) wrote :

Using aptitude instead apt-get leads to a functional tomcat6. Although tomcat6 fails to configure the first time, aptitude retries once all the package have been configured.

In the case of smart-pm it handles the installation correctly, though emitting a warning about a dependency problem:

[config] sun-java6-bin_6-07-4ubuntu2
dpkg: sun-java6-bin: dependency problems, but configuring anyway as you request:
 sun-java6-bin depends on sun-java6-jre (= 6-07-4ubuntu2); however:
  Package sun-java6-jre is not installed.
Setting up sun-java6-bin (6-07-4ubuntu2) ...

Committing transaction... ############## ( 37%)
[unpack] sun-java6-jre_6-07-4ubuntu2
Selecting previously deselected package sun-java6-jre.
(Reading database ... 28577 files and directories currently installed.)
Unpacking sun-java6-jre (from .../sun-java6-jre_6-07-4ubuntu2_all.deb) ...
sun-dlj-v1-1 license has already been accepted

Committing transaction... ################ ( 40%)
[config] sun-java6-jre_6-07-4ubuntu2
Setting up sun-java6-jre (6-07-4ubuntu2) ...

Committing transaction... ################# ( 43%)

Launchpad Janitor (janitor) wrote :

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

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

  * debian/rules: call dh_installinit with --error-handler so that install
    doesn't fail if Tomcat cannot be started during configure (LP: #274365)

 -- Thierry Carrez <email address hidden> Mon, 06 Oct 2008 13:55:21 +0200

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

Other bug subscribers