apache2.2-common: mod_cgid fills error.log with [error] lines

Bug #131632 reported by Paolo Dina
4
Affects Status Importance Assigned to Milestone
Debian
Fix Released
Unknown
apache2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: apache2-common

I found that on my Ubuntu 7.04, Apache's error.log contains a lot (many per second) of error lines like:
[Thu Aug 09 19:08:45 2007] [error] cgid daemon process died, restarting
[Thu Aug 09 19:08:45 2007] [error] (2)No such file or directory: Couldn't bind unix domain socket /var/run/apache2/cgisock.544

Disabling mod_cgid (that was installed by default on my Feisty) and restarting Apache stops the file growth.
Digging into the problem I noticed that /etc/apache2/mods-enabled/cgid.conf contains this configuration:
# Socket for cgid communication
ScriptSock /var/run/apache2/cgisock

but, /var/run/apache2/ doesn't exist. Creating it or a change in cgid.conf specifying a valid directory has solved the problem.
To reproduce this behaviour it's enough to run Apache and look at the above cited lines in error.log.

The same happens in Ubuntu 6.06LTS Apache/2.0.55 (reference https://answers.launchpad.net/ubuntu/+question/11234)

Revision history for this message
Mathias Gug (mathiaz) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

I cannot reproduce your issue. The directory /var/run/apache2 should be created whenever apache2 is started with its init script.

Did this start to happen after an upgrade from apache2 ?

Changed in apache2:
status: New → Incomplete
Revision history for this message
Paolo Dina (paolodina) wrote :

Hello Mathias, thanks for your reply.

I have some further detail to add. Yes, it started to happen after an upgrade, but I don't think this could be the cause of this behaviour (if however you need more info about this I can provide them).

Rather, I discovered that the way I started Apache (using apache2ctl instead of init script) was wrong, and generates the problem (can you confirm this, trying to start Apache using apache2ctl and see if the error.log contains the above cited error lines?).

Infact, /etc/init.d/apache2 contains a line of code that takes care to create the directory /var/run/apache2 if it doesn't exist:
[ -d /var/run/apache2 ] || mkdir -p /var/run/apache2
while apache2ctl, which is used by /etc/init.d/apache2, doesn't.

For this reason, I think it'd be nice to prevent the user to call apache2ctl directly.

Thanks.

Revision history for this message
Mathias Gug (mathiaz) wrote :

The standard way to control the apache2 daemon is to use the init script.

Changed in apache2:
status: Incomplete → Invalid
Revision history for this message
Neal McBurnett (nealmcb) wrote :

This was fixed in debian, and should be in gutsy already.

Changed in apache2:
status: Invalid → 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.