Twiki package: /usr/sbin/apachectl is not executable, exiting...

Bug #96464 reported by Jeremiah C. Foster
6
Affects Status Importance Assigned to Milestone
twiki (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: update-manager

Setting up twiki (4.0.5-9.1) ...

Configuration file `/etc/twiki/apache.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : background this process to examine the situation
 The default action is to keep your current version.
*** apache.conf (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/twiki/apache.conf ...

Configuration file `/etc/twiki/TWiki.cfg'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : background this process to examine the situation
 The default action is to keep your current version.
*** TWiki.cfg (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/twiki/TWiki.cfg ...
 * /usr/sbin/apachectl is not executable, exiting... [fail]
invoke-rc.d: initscript apache, action "reload" failed.
dpkg: error processing twiki (--configure):
 subprocess post-installation script returned error exit status 1
Setting up gnome-system-tools (2.18.0-0ubuntu1) ...

Setting up update-notifier (0.56.1) ...

Setting up ubuntu-desktop (1.39) ...
Errors were encountered while processing:
 twiki
E: Sub-process /usr/bin/dpkg returned an error code (1)

Above is a verbatim message from dpkg which I believe in this case is called from update-manager. I have apache2 installed so apache2ctl should be checked instead of apachectl, no?

Related branches

Michael Vogt (mvo)
Changed in update-manager:
importance: Undecided → High
status: Unconfirmed → Confirmed
Revision history for this message
Jeremiah C. Foster (jeremiah-foster) wrote :

I created a symlink from /usr/sbin/apache2ctl to /usr/sbin/apachectl and that fixed the problem temporarily. I am not familiar enough with apache2ctl to know if it is backwards-compatible with apachectl so I wonder if certain scripts will break because of what I did on my system but it works for me.

Revision history for this message
Steve Kowalik (stevenk) wrote :

I have this feeling that you have apache2 installed, and you also have apache removed (which is not the same as purged). If this is the case, what happens is that the twiki postinst notices that /etc/init.d/apache exists, and so runs it, which fails dismally, leading to this problem.

Revision history for this message
Jeremiah C. Foster (jeremiah-foster) wrote :

Yes, exactly. Shouldn't twiki check to see which apache is the running one (because nowadays there are at least three no? httpd, apache, apache-perl from Ubuntu, etc.)
Perhaps twiki should look at the access log to see the last access time and deduce the version of apache that way?

In any case, I suppose I should purge the earlier version of apache.

Revision history for this message
Steve Kowalik (stevenk) wrote :

Both of which are fairly prohibitive to program in shell. :-)
At this point, I don't think it's a bug that I can really do anything about this close to the Feisty release.

Revision history for this message
Jeremiah C. Foster (jeremiah-foster) wrote :

Yeah, good point. Well it is not a show-stopper, not _that_ serious a bug that it can't wait. Maybe something like this might help?

httpd_vers = $( ls -Rlc /var/log/ | grep "access.log$" | awk '{print $8}' | head -n 1 )

Revision history for this message
Steve Kowalik (stevenk) wrote :

Actually, a thought did occur me just before I got today -

We already if the init script exists before we run invoke-rc.d in the postinst, so my thought was we also check if /var/lib/dpkg/info/<package>.list exists. It's a little messy and also a little gross, and I'd personally prefer to not do it. It also isn't 100% guaranteed to work given the init script for apache2 and apache2.2 is in the common package since there are 4 MPM's.

Revision history for this message
Steve Kowalik (stevenk) wrote :

twiki (1:4.0.5-9.1ubuntu1) feisty; urgency=low

  * Add a horrible hack to try and detect if htpasswd supports -b.
    Now I feel dirty. (LP: #93669)
  * Prefer apache2 to apache in the webserver list, and add mini-httpd.
  * Only attempt to restart any of the apache's if /usr/sbin/apachectl
    exists and is executable. (LP: #96464)
  * Do the same thing for Apache 2.
  * Munge Maintainer field as per spec.

 -- Steve Kowalik <email address hidden> Sun, 8 Apr 2007 00:09:06 +1000

Changed in twiki:
status: Confirmed → Fix Committed
Revision history for this message
Steve Kowalik (stevenk) wrote :

twiki 1:4.0.5-9.1ubuntu1 has built successfully.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.