Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

apache2 fails w/ "could not open transfer log file"

169 views
Skip to first unread message

Eric d'Halibut

unread,
Dec 28, 2011, 10:40:01 PM12/28/11
to
I recently did an apt-get dist-upgrade to an old lenny, bringing him to squeezy.

apache 2 now refuses to start, with this message found in
/var/log/apache2/error.log

[Wed Dec 28 22:10:21 2011] [error] (2)No such file or directory: could not open
transfer log file /etc/apache2/${APACHE_LOG_DIR}/other_vhosts_access.log.
Unable to open logs

There are many old 'other_vhosts_access.log' files in this same
/var/log/apache2 dir:

-rw-r----- 1 root adm 0 Oct 23 06:25 other_vhosts_access.log
-rw-r----- 1 root adm 1202 Oct 18 21:39 other_vhosts_access.log.1
-rw-r----- 1 root adm 302 Oct 15 17:30 other_vhosts_access.log.2.gz
-rw-r----- 1 root adm 271 Sep 27 21:06 other_vhosts_access.log.3.gz
-rw-r----- 1 root adm 269 Aug 21 21:42 other_vhosts_access.log.4.gz
-rw-r----- 1 root adm 392 Jul 25 01:05 other_vhosts_access.log.5.gz
-rw-r----- 1 root adm 870 Jun 24 2011 other_vhosts_access.log.6.gz
-rw-r----- 1 root adm 542 May 22 2011 other_vhosts_access.log.7.gz
-rw-r----- 1 root adm 254 May 14 2011 other_vhosts_access.log.8.gz
-rw-r----- 1 root adm 737 Mar 14 2011 other_vhosts_access.log.9.gz

Things seem to have run swimmingly for a long time, and then...kaput!

Here's what I have now for packages:

# dpkg -l |grep apache2
ii apache2
2.2.16-6+squeeze4 Apache HTTP Server metapackage
ii apache2-doc
2.2.16-6+squeeze4 Apache HTTP Server documentation
ii apache2-mpm-worker
2.2.16-6+squeeze4 Apache HTTP Server - high speed
threaded model
ii apache2-utils
2.2.16-6+squeeze4 utility programs for webservers
ii apache2.2-bin
2.2.16-6+squeeze4 Apache HTTP Server common binary files
ii apache2.2-common
2.2.16-6+squeeze4 Apache HTTP Server common files

TIA if anyone can shed any light on this dys/mal/function!

--
No no no, my fish's name is Eric, Eric the fish. He's an halibut. I am
not a looney! Why should I be tarred with the epithet looney merely
because I have a pet halibut?

http://trollboy.thruhere.net:8080/MontyPython/fish.htm


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/CAJvq95PDMFgoa7ThcGz8x8Gf...@mail.gmail.com

Scott Ferguson

unread,
Dec 28, 2011, 11:20:01 PM12/28/11
to
On 29/12/11 14:38, Eric d'Halibut wrote:
> I recently did an apt-get dist-upgrade to an old lenny, bringing him to squeezy.
>
> apache 2 now refuses to start, with this message found in
> /var/log/apache2/error.log
>
> [Wed Dec 28 22:10:21 2011] [error] (2)No such file or directory: could not open
> transfer log file /etc/apache2/${APACHE_LOG_DIR}/other_vhosts_access.log.
> Unable to open logs
>
> There are many old 'other_vhosts_access.log' files in this same
> /var/log/apache2 dir:
>
> -rw-r----- 1 root adm 0 Oct 23 06:25 other_vhosts_access.log
> -rw-r----- 1 root adm 1202 Oct 18 21:39 other_vhosts_access.log.1
> -rw-r----- 1 root adm 302 Oct 15 17:30 other_vhosts_access.log.2.gz
> -rw-r----- 1 root adm 271 Sep 27 21:06 other_vhosts_access.log.3.gz
> -rw-r----- 1 root adm 269 Aug 21 21:42 other_vhosts_access.log.4.gz
> -rw-r----- 1 root adm 392 Jul 25 01:05 other_vhosts_access.log.5.gz
> -rw-r----- 1 root adm 870 Jun 24 2011 other_vhosts_access.log.6.gz
> -rw-r----- 1 root adm 542 May 22 2011 other_vhosts_access.log.7.gz
> -rw-r----- 1 root adm 254 May 14 2011 other_vhosts_access.log.8.gz
> -rw-r----- 1 root adm 737 Mar 14 2011 other_vhosts_access.log.9.gz
>
> Things seem to have run swimmingly for a long time, and then...kaput!

Check your log dir settings:-
grep -i log_dir /etc/apache2/envvars

Mine all have:-
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX

Which is what I suspect yours is... - so check your permissions.


Mine:-
ls -al /var/log/apache2
total 208
drwxr-x--- 2 root adm 4096 Dec 16 12:46 .
drwxr-xr-x 14 root root 4096 Dec 29 16:00 ..
-rw-r----- 1 root adm 2829 Dec 16 12:37 access.log
-rw-r----- 1 root adm 132561 Dec 29 16:00 error.log
-rw-r--r-- 1 root root 49300 Dec 28 19:05 other_vhosts_access.log
-rw-r--r-- 1 root www-data 782 Dec 28 19:03 suexec.log

>
> Here's what I have now for packages:
>
> # dpkg -l |grep apache2
> ii apache2
> 2.2.16-6+squeeze4 Apache HTTP Server metapackage
> ii apache2-doc
> 2.2.16-6+squeeze4 Apache HTTP Server documentation
> ii apache2-mpm-worker
> 2.2.16-6+squeeze4 Apache HTTP Server - high speed
> threaded model
> ii apache2-utils
> 2.2.16-6+squeeze4 utility programs for webservers
> ii apache2.2-bin
> 2.2.16-6+squeeze4 Apache HTTP Server common binary files
> ii apache2.2-common
> 2.2.16-6+squeeze4 Apache HTTP Server common files
>
> TIA if anyone can shed any light on this dys/mal/function!
>

Basic package selections
ii apache2 2.2.16-6+squeeze4
Apache HTTP Server metapackage
ii apache2-mpm-prefork 2.2.16-6+squeeze4
Apache HTTP Server - traditional non-threaded model
ii apache2-suexec-custom 2.2.16-6+squeeze4
Configurable suexec program for Apache 2 mod_suexec
ii apache2-utils 2.2.16-6+squeeze4
utility programs for webservers
ii apache2.2-bin 2.2.16-6+squeeze4
Apache HTTP Server common binary files
ii apache2.2-common 2.2.16-6+squeeze4
Apache HTTP Server common files
ii libapache2-mod-fcgid 1:2.3.6-1 an
alternative module compat with mod_fastcgi
ii libapache2-mod-php5 5.3.3-7+squeeze3
server-side, HTML-embedded scripting language (Apache 2 module)
ii libapache2-mod-ruby 1.2.6-2
Embedding Ruby in the Apache2 web server
ii libapache2-svn 1.6.12dfsg-6
Subversion server modules for Apache



Cheers

--
Iceweasel/Firefox extensions for finding answers to Debian questions:-
https://addons.mozilla.org/en-US/firefox/collections/Scott_Ferguson/debian/


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/4EFBE8DF...@gmail.com

Bob Proulx

unread,
Dec 29, 2011, 1:10:01 AM12/29/11
to
Eric d'Halibut wrote:
> I recently did an apt-get dist-upgrade to an old lenny, bringing him to squeezy.
>
> apache 2 now refuses to start, with this message found in
> /var/log/apache2/error.log
>
> [Wed Dec 28 22:10:21 2011] [error] (2)No such file or directory: could not open
> transfer log file /etc/apache2/${APACHE_LOG_DIR}/other_vhosts_access.log.
> Unable to open logs

The problem is that when you upgraded you kept part of your old Lenny
style configuration and upgraded other parts to the new Squeeze
configuration. You are betwixt and between. You have some old and
some new. The APACHE_LOG_DIR is from the new part.

Look for files with a .dpkg ending.

# find /etc/apache2 -name '*.dpkg*'

Review those files. I expect you will see a file:

/etc/apache2/envvars.dpkg-new

The new Squeeze version of that file is quite different from the
previous Lenny version. Merge your changes into the new file. Or
better yet simply move the new file into place and don't make any
local edits to it. But I assume you must have made a local edit for a
reason. But instead of setting variables in /etc/apache2/envvars I
think it is better to set them in /etc/default/apache2 where they are
easier to preserve across upgrades. But of course everything depends
upon your particular needs. What were you setting there?

You should review all of the files in /etc that have been changed.
Run find across all of /etc looking for packaged files that were
either upgraded or not.

# find /etc/apache2 -name '*.dpkg*'

Review and merge as needed. Clean them up as you go and then future
changes will be easier to spot.

Bob
signature.asc

Eric d'Halibut

unread,
Dec 29, 2011, 6:10:02 PM12/29/11
to
On 12/29/11, Bob Proulx <b...@proulx.com> wrote:

> Look for files with a .dpkg ending.

Aha! Copying those into place and then adding my custom stuff fixed
everything up.

Thank you!


--
No no no, my fish's name is Eric, Eric the fish. He's an halibut. I am
not a looney! Why should I be tarred with the epithet looney merely
because I have a pet halibut?

http://trollboy.thruhere.net:8080/MontyPython/fish.htm


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/CAJvq95NHP92DecUs9_ta58Lm6FOKVHm=Eq1aDixCQ...@mail.gmail.com

Bob Proulx

unread,
Dec 29, 2011, 6:40:02 PM12/29/11
to
Eric d'Halibut wrote:
> Aha! Copying those into place and then adding my custom stuff fixed
> everything up.

Good! Then it is time for you to look for other lint left elsewhere
since the upgrade and deal with those similarly. Most of the time you
can probably simply remove the old file.

find /etc -name '*.dpkg*'

Bob
signature.asc
0 new messages