public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Apache is running but its log is not
@ 2011-05-01  6:04 Kevin O'Gorman
  2011-05-01  6:37 ` Adam Carter
  2011-05-01  8:39 ` Neil Bothwick
  0 siblings, 2 replies; 15+ messages in thread
From: Kevin O'Gorman @ 2011-05-01  6:04 UTC (permalink / raw
  To: gentoo-user

I just noticed a failure in a dynamic web page that I haven't touched
in years.  So I looked in
/var/log/apache2 and found that no files have been touched since
February.  I've rebooted
and kept the system current by regular emerges, so it's been
restarted, but until now I did
not notice a failure (it's a feature not commonly used).  I want to
find out the exact error
from my CGI program (the web error says the system logs will have more
info but they don't).

How do I find out where/if Apache thinks its logging things?

-- 
Kevin O'Gorman, PhD



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-01  6:04 [gentoo-user] Apache is running but its log is not Kevin O'Gorman
@ 2011-05-01  6:37 ` Adam Carter
  2011-05-02 16:25   ` Kevin O'Gorman
  2011-05-01  8:39 ` Neil Bothwick
  1 sibling, 1 reply; 15+ messages in thread
From: Adam Carter @ 2011-05-01  6:37 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 136 bytes --]

> How do I find out where/if Apache thinks its logging things?
>
>
In /etc/apache check httpd.conf and modules.d/00_mod_log_config.conf

[-- Attachment #2: Type: text/html, Size: 298 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-01  6:04 [gentoo-user] Apache is running but its log is not Kevin O'Gorman
  2011-05-01  6:37 ` Adam Carter
@ 2011-05-01  8:39 ` Neil Bothwick
  2011-05-02 16:36   ` Kevin O'Gorman
  1 sibling, 1 reply; 15+ messages in thread
From: Neil Bothwick @ 2011-05-01  8:39 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]

On Sat, 30 Apr 2011 23:04:35 -0700, Kevin O'Gorman wrote:

> I just noticed a failure in a dynamic web page that I haven't touched
> in years.  So I looked in
> /var/log/apache2 and found that no files have been touched since
> February.

Are permissions correct for the apache user to created and write to
files? Does syslog show any messages from Apache?


-- 
Neil Bothwick

War does not determine who is right -- only who is left.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-01  6:37 ` Adam Carter
@ 2011-05-02 16:25   ` Kevin O'Gorman
  0 siblings, 0 replies; 15+ messages in thread
From: Kevin O'Gorman @ 2011-05-02 16:25 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

On Sat, Apr 30, 2011 at 11:37 PM, Adam Carter <adamcarter3@gmail.com> wrote:

>
> How do I find out where/if Apache thinks its logging things?
>>
>>
> In /etc/apache check httpd.conf and modules.d/00_mod_log_config.conf
>

in /etc/apache2, I find
   ServerRoot "/usr/lib/apache2"
but no log files, and no special logfile paths, so it seems it must use the
default.

However in /var/log/apache2 I find log files that have not been touched
since February.


-- 
Kevin O'Gorman, PhD

[-- Attachment #2: Type: text/html, Size: 1000 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-01  8:39 ` Neil Bothwick
@ 2011-05-02 16:36   ` Kevin O'Gorman
  2011-05-02 18:10     ` Kevin O'Gorman
  0 siblings, 1 reply; 15+ messages in thread
From: Kevin O'Gorman @ 2011-05-02 16:36 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 3727 bytes --]

On Sun, May 1, 2011 at 1:39 AM, Neil Bothwick <neil@digimed.co.uk> wrote:

> On Sat, 30 Apr 2011 23:04:35 -0700, Kevin O'Gorman wrote:
>
> > I just noticed a failure in a dynamic web page that I haven't touched
> > in years.  So I looked in
> > /var/log/apache2 and found that no files have been touched since
> > February.
>
> Are permissions correct for the apache user to created and write to
> files? Does syslog show any messages from Apache?
>
> Permissions are generous:

treat apache2 # ls -lad /var
drwxr-xr-x 17 root root 4096 Apr 30 23:06 /var
treat apache2 # ls -lad /var/log
drwxr-xr-x 17 root root 4096 May  2 03:14 /var/log
treat apache2 # ls -lad /var/log/apache2
drwxrwxrwx 2 apache apache 4096 Apr 30 22:16 /var/log/apache2
treat apache2 # ls -l /var/log/apache2
total 1584
-rw-rw-rw- 1 apache apache      0 Feb  4 03:10 access_log
-rw-rw-rw- 1 apache apache 191438 Jun 15  2009 access_log.1.gz
-rw-rw-rw- 1 apache apache 111538 Dec 26 03:10 access_log-20101226.gz
-rw-rw-rw- 1 apache apache  15152 Jan 18 03:10 access_log-20110118.gz
-rw-rw-rw- 1 apache apache 179611 Jan 25 03:10 access_log-20110125.gz
-rw-rw-rw- 1 apache apache  16844 Feb  4 03:10 access_log-20110204.gz
-rw-rw-rw- 1 apache apache 234663 Jun  8  2009 access_log.2.gz
-rw-rw-rw- 1 apache apache 270349 Jun  1  2009 access_log.3.gz
-rw-rw-rw- 1 apache apache 277761 May 25  2009 access_log.4.gz
-rw-rw-rw- 1 apache apache      0 Feb  4 03:10 error_log
-rw-rw-rw- 1 apache apache 117611 Jun 15  2009 error_log.1.gz.out
-rw-rw-rw- 1 apache apache  33793 Dec 26 03:10 error_log-20101226.gz
-rw-rw-rw- 1 apache apache   3729 Jan 18 03:10 error_log-20110118.gz
-rw-rw-rw- 1 apache apache  34184 Jan 25 03:10 error_log-20110125.gz
-rw-rw-rw- 1 apache apache   4350 Feb  4 03:10 error_log-20110204.gz
-rw-rw-rw- 1 apache apache   5706 Jun  8  2009 error_log.2.gz
-rw-rw-rw- 1 apache apache   5628 Jun  1  2009 error_log.3.gz
-rw-rw-rw- 1 apache apache   6344 May 25  2009 error_log.4.gz
-rw-rw-rw- 1 apache apache      0 Feb  6 03:10 ssl_access_log
-rw-rw-rw- 1 apache apache     89 Dec 31 03:10 ssl_access_log-20101231.gz
-rw-rw-rw- 1 apache apache    137 Jan 22 03:10 ssl_access_log-20110122.gz
-rw-rw-rw- 1 apache apache    182 Jan 30 03:10 ssl_access_log-20110130.gz
-rw-rw-rw- 1 apache apache     89 Feb  6 03:10 ssl_access_log-20110206.gz
-rw-rw-rw- 1 apache apache      0 Feb  7 03:10 ssl_error_log
-rw-rw-rw- 1 apache apache    122 Dec 20 03:10 ssl_error_log-20101220.gz
-rw-rw-rw- 1 apache apache    122 Jan 18 03:10 ssl_error_log-20110118.gz
-rw-rw-rw- 1 apache apache    208 Jan 30 03:10 ssl_error_log-20110130.gz
-rw-rw-rw- 1 apache apache    203 Feb  7 03:10 ssl_error_log-20110207.gz
-rw-rw-rw- 1 apache apache      0 Feb  6 03:10 ssl_request_log
-rw-rw-rw- 1 apache apache    102 Dec 31 03:10 ssl_request_log-20101231.gz
-rw-rw-rw- 1 apache apache    158 Jan 22 03:10 ssl_request_log-20110122.gz
-rw-rw-rw- 1 apache apache    197 Jan 30 03:10 ssl_request_log-20110130.gz
-rw-rw-rw- 1 apache apache    103 Feb  6 03:10 ssl_request_log-20110206.gz
treat apache2 #

There is one syslog entry for apache in the last 7 days:
May  1 08:44:13 treat named[5150]: error (unexpected RCODE SERVFAIL)
resolving 'maven.apache.org/A/IN': 199.19.57.1#53

This does not seem to have anything to do with the problem, which is that my
CGI script associated with hex.kosmanor.com/hex/bin/newdump was failing.

In the meanwhile, I'll be opening a different thread because things got lots
worse when I did a --depclean, which deleted the one copy of python that
everything seems to use: my CGI scripts are now the least of my problems.  I
can no longer run portage, vim or even untar my extensive collection of
binary packages.

-- 
Kevin O'Gorman, PhD

[-- Attachment #2: Type: text/html, Size: 4532 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-02 16:36   ` Kevin O'Gorman
@ 2011-05-02 18:10     ` Kevin O'Gorman
  2011-05-03  3:30       ` Adam Carter
  0 siblings, 1 reply; 15+ messages in thread
From: Kevin O'Gorman @ 2011-05-02 18:10 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 4076 bytes --]

On Mon, May 2, 2011 at 9:36 AM, Kevin O'Gorman <kogorman@gmail.com> wrote:

>
>
> On Sun, May 1, 2011 at 1:39 AM, Neil Bothwick <neil@digimed.co.uk> wrote:
>
>> On Sat, 30 Apr 2011 23:04:35 -0700, Kevin O'Gorman wrote:
>>
>> > I just noticed a failure in a dynamic web page that I haven't touched
>> > in years.  So I looked in
>> > /var/log/apache2 and found that no files have been touched since
>> > February.
>>
>> Are permissions correct for the apache user to created and write to
>> files? Does syslog show any messages from Apache?
>>
>> Permissions are generous:
>
> treat apache2 # ls -lad /var
> drwxr-xr-x 17 root root 4096 Apr 30 23:06 /var
> treat apache2 # ls -lad /var/log
> drwxr-xr-x 17 root root 4096 May  2 03:14 /var/log
> treat apache2 # ls -lad /var/log/apache2
> drwxrwxrwx 2 apache apache 4096 Apr 30 22:16 /var/log/apache2
> treat apache2 # ls -l /var/log/apache2
> total 1584
> -rw-rw-rw- 1 apache apache      0 Feb  4 03:10 access_log
> -rw-rw-rw- 1 apache apache 191438 Jun 15  2009 access_log.1.gz
> -rw-rw-rw- 1 apache apache 111538 Dec 26 03:10 access_log-20101226.gz
> -rw-rw-rw- 1 apache apache  15152 Jan 18 03:10 access_log-20110118.gz
> -rw-rw-rw- 1 apache apache 179611 Jan 25 03:10 access_log-20110125.gz
> -rw-rw-rw- 1 apache apache  16844 Feb  4 03:10 access_log-20110204.gz
> -rw-rw-rw- 1 apache apache 234663 Jun  8  2009 access_log.2.gz
> -rw-rw-rw- 1 apache apache 270349 Jun  1  2009 access_log.3.gz
> -rw-rw-rw- 1 apache apache 277761 May 25  2009 access_log.4.gz
> -rw-rw-rw- 1 apache apache      0 Feb  4 03:10 error_log
> -rw-rw-rw- 1 apache apache 117611 Jun 15  2009 error_log.1.gz.out
> -rw-rw-rw- 1 apache apache  33793 Dec 26 03:10 error_log-20101226.gz
> -rw-rw-rw- 1 apache apache   3729 Jan 18 03:10 error_log-20110118.gz
> -rw-rw-rw- 1 apache apache  34184 Jan 25 03:10 error_log-20110125.gz
> -rw-rw-rw- 1 apache apache   4350 Feb  4 03:10 error_log-20110204.gz
> -rw-rw-rw- 1 apache apache   5706 Jun  8  2009 error_log.2.gz
> -rw-rw-rw- 1 apache apache   5628 Jun  1  2009 error_log.3.gz
> -rw-rw-rw- 1 apache apache   6344 May 25  2009 error_log.4.gz
> -rw-rw-rw- 1 apache apache      0 Feb  6 03:10 ssl_access_log
> -rw-rw-rw- 1 apache apache     89 Dec 31 03:10 ssl_access_log-20101231.gz
> -rw-rw-rw- 1 apache apache    137 Jan 22 03:10 ssl_access_log-20110122.gz
> -rw-rw-rw- 1 apache apache    182 Jan 30 03:10 ssl_access_log-20110130.gz
> -rw-rw-rw- 1 apache apache     89 Feb  6 03:10 ssl_access_log-20110206.gz
> -rw-rw-rw- 1 apache apache      0 Feb  7 03:10 ssl_error_log
> -rw-rw-rw- 1 apache apache    122 Dec 20 03:10 ssl_error_log-20101220.gz
> -rw-rw-rw- 1 apache apache    122 Jan 18 03:10 ssl_error_log-20110118.gz
> -rw-rw-rw- 1 apache apache    208 Jan 30 03:10 ssl_error_log-20110130.gz
> -rw-rw-rw- 1 apache apache    203 Feb  7 03:10 ssl_error_log-20110207.gz
> -rw-rw-rw- 1 apache apache      0 Feb  6 03:10 ssl_request_log
> -rw-rw-rw- 1 apache apache    102 Dec 31 03:10 ssl_request_log-20101231.gz
> -rw-rw-rw- 1 apache apache    158 Jan 22 03:10 ssl_request_log-20110122.gz
> -rw-rw-rw- 1 apache apache    197 Jan 30 03:10 ssl_request_log-20110130.gz
> -rw-rw-rw- 1 apache apache    103 Feb  6 03:10 ssl_request_log-20110206.gz
> treat apache2 #
>
> There is one syslog entry for apache in the last 7 days:
> May  1 08:44:13 treat named[5150]: error (unexpected RCODE SERVFAIL)
> resolving 'maven.apache.org/A/IN': 199.19.57.1#53
>
> This does not seem to have anything to do with the problem, which is that
> my CGI script associated with hex.kosmanor.com/hex/bin/newdump was
> failing.
>
> In the meanwhile, I'll be opening a different thread because things got
> lots worse when I did a --depclean, which deleted the one copy of python
> that everything seems to use: my CGI scripts are now the least of my
> problems.  I can no longer run portage, vim or even untar my extensive
> collection of binary packages.
>
> --
> Kevin O'Gorman, PhD
>
> Okay, there was already a thread about that, and my Python problem seems
solved.  I still have no log entries.


-- 
Kevin O'Gorman, PhD

[-- Attachment #2: Type: text/html, Size: 5128 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-02 18:10     ` Kevin O'Gorman
@ 2011-05-03  3:30       ` Adam Carter
  2011-05-04  3:19         ` Kevin O'Gorman
  0 siblings, 1 reply; 15+ messages in thread
From: Adam Carter @ 2011-05-03  3:30 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]

>
>> Okay, there was already a thread about that, and my Python problem seems
> solved.  I still have no log entries.
>
>
Ok, as root, try lsof | grep apache and see if there are any open log files.
You may need to emerge lsof first if you dont already have it.

IIRC apache fails to start if it cant write to the log directory - could be
wrong on that tho.

[-- Attachment #2: Type: text/html, Size: 730 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-03  3:30       ` Adam Carter
@ 2011-05-04  3:19         ` Kevin O'Gorman
  2011-05-04  3:24           ` Kevin O'Gorman
  0 siblings, 1 reply; 15+ messages in thread
From: Kevin O'Gorman @ 2011-05-04  3:19 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 8431 bytes --]

On Mon, May 2, 2011 at 8:30 PM, Adam Carter <adamcarter3@gmail.com> wrote:

>
>
>>> Okay, there was already a thread about that, and my Python problem seems
>> solved.  I still have no log entries.
>>
>>
> Ok, as root, try lsof | grep apache and see if there are any open log
> files. You may need to emerge lsof first if you dont already have it.
>
> IIRC apache fails to start if it cant write to the log directory - could be
> wrong on that tho.
>

Well, the results are sort of consistent with what I'm seeing, but I have a
hard time making sense of it.  There were so many files open that I grepped
on "log" as well

treat ~ # lsof|grep apache|grep log
apache2    4096     apache  DEL       REG       8,44              1008213
/var/tmp/portage/www-servers/apache-2.2.17/image/usr/lib/apache2/modules/mod_log_config.so
apache2    4096     apache  DEL       REG       8,44              1008230
/var/tmp/portage/www-servers/apache-2.2.17/image/usr/lib/apache2/modules/mod_logio.so
apache2    4096     apache    2w      REG       8,44  16957886     204999
/var/log/apache2/error_log-20110204 (deleted)
apache2    4096     apache    8w      REG       8,44      7694     206327
/var/log/apache2/ssl_error_log-20110207 (deleted)
apache2    4096     apache    9w      REG       8,44  57327591     204998
/var/log/apache2/access_log-20110204 (deleted)
apache2    4096     apache   10w      REG       8,44      6696     206326
/var/log/apache2/ssl_access_log-20110206 (deleted)
apache2    4096     apache   11w      REG       8,44      7864     206328
/var/log/apache2/ssl_request_log-20110206 (deleted)
apache2    5288       root  DEL       REG       8,44              1008213
/var/tmp/portage/www-servers/apache-2.2.17/image/usr/lib/apache2/modules/mod_log_config.so
apache2    5288       root  DEL       REG       8,44              1008230
/var/tmp/portage/www-servers/apache-2.2.17/image/usr/lib/apache2/modules/mod_logio.so
apache2    5288       root    2w      REG       8,44  16957886     204999
/var/log/apache2/error_log-20110204 (deleted)
apache2    5288       root    8w      REG       8,44      7694     206327
/var/log/apache2/ssl_error_log-20110207 (deleted)
apache2    5288       root    9w      REG       8,44  57327591     204998
/var/log/apache2/access_log-20110204 (deleted)
apache2    5288       root   10w      REG       8,44      6696     206326
/var/log/apache2/ssl_access_log-20110206 (deleted)
apache2    5288       root   11w      REG       8,44      7864     206328
/var/log/apache2/ssl_request_log-20110206 (deleted)
apache2    5290     apache  DEL       REG       8,44              1008213
/var/tmp/portage/www-servers/apache-2.2.17/image/usr/lib/apache2/modules/mod_log_config.so
apache2    5290     apache  DEL       REG       8,44              1008230
/var/tmp/portage/www-servers/apache-2.2.17/image/usr/lib/apache2/modules/mod_logio.so
apache2    5290     apache    2w      REG       8,44  16957886     204999
/var/log/apache2/error_log-20110204 (deleted)
apache2    5290     apache    8w      REG       8,44      7694     206327
/var/log/apache2/ssl_error_log-20110207 (deleted)
apache2    5290     apache    9w      REG       8,44  57327591     204998
/var/log/apache2/access_log-20110204 (deleted)
apache2    5290     apache   10w      REG       8,44      6696     206326
/var/log/apache2/ssl_access_log-20110206 (deleted)
apache2    5290     apache   11w      REG       8,44      7864     206328
/var/log/apache2/ssl_request_log-20110206 (deleted)
apache2   23596     apache  DEL       REG       8,44              1008213
/var/tmp/portage/www-servers/apache-2.2.17/image/usr/lib/apache2/modules/mod_log_config.so
apache2   23596     apache  DEL       REG       8,44              1008230
/var/tmp/portage/www-servers/apache-2.2.17/image/usr/lib/apache2/modules/mod_logio.so
apache2   23596     apache    2w      REG       8,44  16957886     204999
/var/log/apache2/error_log-20110204 (deleted)
apache2   23596     apache    8w      REG       8,44      7694     206327
/var/log/apache2/ssl_error_log-20110207 (deleted)
apache2   23596     apache    9w      REG       8,44  57327591     204998
/var/log/apache2/access_log-20110204 (deleted)
apache2   23596     apache   10w      REG       8,44      6696     206326
/var/log/apache2/ssl_access_log-20110206 (deleted)
apache2   23596     apache   11w      REG       8,44      7864     206328
/var/log/apache2/ssl_request_log-20110206 (deleted)
treat ~ #

Why is everything being deleted?


In 00_mod_log_config.conf I have
<IfModule log_config_module>
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-Agent}i" agent
LogFormat "%v %h %l %u %t \"%r\" %>s %b %T" script
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
VLOG=%{VLOG}e" vhost

<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I
%O" combinedio
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
%I %O" vhostio
</IfModule>

# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here.  Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
CustomLog /var/log/apache2/access_log common

# If you would like to have agent and referer logfiles,
# uncomment the following directives.
#CustomLog /var/log/apache2/referer_log referer
#CustomLog /var/log/apache2/agent_logs agent

# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#CustomLog /var/log/apache2/access_log combined
</IfModule>

# vim: ts=4 filetype=apache

So there should be an access_log, and there is, but it has not been touched
in a while:
treat apache2 # ls -l
total 1584
-rw-rw-rw- 1 apache apache      0 Feb  4 03:10 access_log
-rw-rw-rw- 1 apache apache 191438 Jun 15  2009 access_log.1.gz
-rw-rw-rw- 1 apache apache 111538 Dec 26 03:10 access_log-20101226.gz
-rw-rw-rw- 1 apache apache  15152 Jan 18 03:10 access_log-20110118.gz
-rw-rw-rw- 1 apache apache 179611 Jan 25 03:10 access_log-20110125.gz
-rw-rw-rw- 1 apache apache  16844 Feb  4 03:10 access_log-20110204.gz
-rw-rw-rw- 1 apache apache 234663 Jun  8  2009 access_log.2.gz
-rw-rw-rw- 1 apache apache 270349 Jun  1  2009 access_log.3.gz
-rw-rw-rw- 1 apache apache 277761 May 25  2009 access_log.4.gz
-rw-rw-rw- 1 apache apache      0 Feb  4 03:10 error_log
-rw-rw-rw- 1 apache apache 117611 Jun 15  2009 error_log.1.gz.out
-rw-rw-rw- 1 apache apache  33793 Dec 26 03:10 error_log-20101226.gz
-rw-rw-rw- 1 apache apache   3729 Jan 18 03:10 error_log-20110118.gz
-rw-rw-rw- 1 apache apache  34184 Jan 25 03:10 error_log-20110125.gz
-rw-rw-rw- 1 apache apache   4350 Feb  4 03:10 error_log-20110204.gz
-rw-rw-rw- 1 apache apache   5706 Jun  8  2009 error_log.2.gz
-rw-rw-rw- 1 apache apache   5628 Jun  1  2009 error_log.3.gz
-rw-rw-rw- 1 apache apache   6344 May 25  2009 error_log.4.gz
-rw-rw-rw- 1 apache apache      0 Feb  6 03:10 ssl_access_log
-rw-rw-rw- 1 apache apache     89 Dec 31 03:10 ssl_access_log-20101231.gz
-rw-rw-rw- 1 apache apache    137 Jan 22 03:10 ssl_access_log-20110122.gz
-rw-rw-rw- 1 apache apache    182 Jan 30 03:10 ssl_access_log-20110130.gz
-rw-rw-rw- 1 apache apache     89 Feb  6 03:10 ssl_access_log-20110206.gz
-rw-rw-rw- 1 apache apache      0 Feb  7 03:10 ssl_error_log
-rw-rw-rw- 1 apache apache    122 Dec 20 03:10 ssl_error_log-20101220.gz
-rw-rw-rw- 1 apache apache    122 Jan 18 03:10 ssl_error_log-20110118.gz
-rw-rw-rw- 1 apache apache    208 Jan 30 03:10 ssl_error_log-20110130.gz
-rw-rw-rw- 1 apache apache    203 Feb  7 03:10 ssl_error_log-20110207.gz
-rw-rw-rw- 1 apache apache      0 Feb  6 03:10 ssl_request_log
-rw-rw-rw- 1 apache apache    102 Dec 31 03:10 ssl_request_log-20101231.gz
-rw-rw-rw- 1 apache apache    158 Jan 22 03:10 ssl_request_log-20110122.gz
-rw-rw-rw- 1 apache apache    197 Jan 30 03:10 ssl_request_log-20110130.gz
-rw-rw-rw- 1 apache apache    103 Feb  6 03:10 ssl_request_log-20110206.gz
treat apache2 #

-- 
Kevin O'Gorman, PhD

[-- Attachment #2: Type: text/html, Size: 10852 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-04  3:19         ` Kevin O'Gorman
@ 2011-05-04  3:24           ` Kevin O'Gorman
  2011-05-04  3:48             ` Adam Carter
  0 siblings, 1 reply; 15+ messages in thread
From: Kevin O'Gorman @ 2011-05-04  3:24 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 3284 bytes --]

On Tue, May 3, 2011 at 8:19 PM, Kevin O'Gorman <kogorman@gmail.com> wrote:

> On Mon, May 2, 2011 at 8:30 PM, Adam Carter <adamcarter3@gmail.com> wrote:
>
>>
>>
>>>> Okay, there was already a thread about that, and my Python problem seems
>>> solved.  I still have no log entries.
>>>
>>>
>> Ok, as root, try lsof | grep apache and see if there are any open log
>> files. You may need to emerge lsof first if you dont already have it.
>>
>> IIRC apache fails to start if it cant write to the log directory - could
>> be wrong on that tho.
>>
>
>
> So there should be an access_log, and there is, but it has not been touched
> in a while:
> treat apache2 # ls -l
>
> total 1584
> -rw-rw-rw- 1 apache apache      0 Feb  4 03:10 access_log
> -rw-rw-rw- 1 apache apache 191438 Jun 15  2009 access_log.1.gz
> -rw-rw-rw- 1 apache apache 111538 Dec 26 03:10 access_log-20101226.gz
> -rw-rw-rw- 1 apache apache  15152 Jan 18 03:10 access_log-20110118.gz
> -rw-rw-rw- 1 apache apache 179611 Jan 25 03:10 access_log-20110125.gz
> -rw-rw-rw- 1 apache apache  16844 Feb  4 03:10 access_log-20110204.gz
> -rw-rw-rw- 1 apache apache 234663 Jun  8  2009 access_log.2.gz
> -rw-rw-rw- 1 apache apache 270349 Jun  1  2009 access_log.3.gz
> -rw-rw-rw- 1 apache apache 277761 May 25  2009 access_log.4.gz
> -rw-rw-rw- 1 apache apache      0 Feb  4 03:10 error_log
> -rw-rw-rw- 1 apache apache 117611 Jun 15  2009 error_log.1.gz.out
> -rw-rw-rw- 1 apache apache  33793 Dec 26 03:10 error_log-20101226.gz
> -rw-rw-rw- 1 apache apache   3729 Jan 18 03:10 error_log-20110118.gz
> -rw-rw-rw- 1 apache apache  34184 Jan 25 03:10 error_log-20110125.gz
> -rw-rw-rw- 1 apache apache   4350 Feb  4 03:10 error_log-20110204.gz
> -rw-rw-rw- 1 apache apache   5706 Jun  8  2009 error_log.2.gz
> -rw-rw-rw- 1 apache apache   5628 Jun  1  2009 error_log.3.gz
> -rw-rw-rw- 1 apache apache   6344 May 25  2009 error_log.4.gz
> -rw-rw-rw- 1 apache apache      0 Feb  6 03:10 ssl_access_log
> -rw-rw-rw- 1 apache apache     89 Dec 31 03:10 ssl_access_log-20101231.gz
> -rw-rw-rw- 1 apache apache    137 Jan 22 03:10 ssl_access_log-20110122.gz
> -rw-rw-rw- 1 apache apache    182 Jan 30 03:10 ssl_access_log-20110130.gz
> -rw-rw-rw- 1 apache apache     89 Feb  6 03:10 ssl_access_log-20110206.gz
> -rw-rw-rw- 1 apache apache      0 Feb  7 03:10 ssl_error_log
> -rw-rw-rw- 1 apache apache    122 Dec 20 03:10 ssl_error_log-20101220.gz
> -rw-rw-rw- 1 apache apache    122 Jan 18 03:10 ssl_error_log-20110118.gz
> -rw-rw-rw- 1 apache apache    208 Jan 30 03:10 ssl_error_log-20110130.gz
> -rw-rw-rw- 1 apache apache    203 Feb  7 03:10 ssl_error_log-20110207.gz
> -rw-rw-rw- 1 apache apache      0 Feb  6 03:10 ssl_request_log
> -rw-rw-rw- 1 apache apache    102 Dec 31 03:10 ssl_request_log-20101231.gz
> -rw-rw-rw- 1 apache apache    158 Jan 22 03:10 ssl_request_log-20110122.gz
> -rw-rw-rw- 1 apache apache    197 Jan 30 03:10 ssl_request_log-20110130.gz
> -rw-rw-rw- 1 apache apache    103 Feb  6 03:10 ssl_request_log-20110206.gz
> treat apache2 #
>
> --
> Kevin O'Gorman, PhD
>
>
Well, 2.2.17 is indeed my server, but I decided to stop it and start it
again.  Current log files showed up.
Problem solved, by brute force again, and without any epiphanies of
understanding.

Thanks for your help.


-- 
Kevin O'Gorman, PhD

[-- Attachment #2: Type: text/html, Size: 4598 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-04  3:24           ` Kevin O'Gorman
@ 2011-05-04  3:48             ` Adam Carter
  2011-05-04  6:15               ` Joost Roeleveld
  0 siblings, 1 reply; 15+ messages in thread
From: Adam Carter @ 2011-05-04  3:48 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

>
>
> Well, 2.2.17 is indeed my server, but I decided to stop it and start it
> again.  Current log files showed up.
> Problem solved, by brute force again, and without any epiphanies of
> understanding.
>
>
Last guess - logrotate is managing the log files but not reloading apache
afterwards. Check that the entries in /etc/logrotate.d/apache2 have a line
in there that runs /etc/init.d/apache2 reload.

[-- Attachment #2: Type: text/html, Size: 562 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-04  3:48             ` Adam Carter
@ 2011-05-04  6:15               ` Joost Roeleveld
  2011-05-04 14:00                 ` Kevin O'Gorman
  2011-05-04 14:38                 ` Alan McKinnon
  0 siblings, 2 replies; 15+ messages in thread
From: Joost Roeleveld @ 2011-05-04  6:15 UTC (permalink / raw
  To: gentoo-user

On Wednesday 04 May 2011 13:48:48 Adam Carter wrote:
> > Well, 2.2.17 is indeed my server, but I decided to stop it and start it
> > again.  Current log files showed up.
> > Problem solved, by brute force again, and without any epiphanies of
> > understanding.
> 
> Last guess - logrotate is managing the log files but not reloading apache
> afterwards. Check that the entries in /etc/logrotate.d/apache2 have a line
> in there that runs /etc/init.d/apache2 reload.

Adam,

I think you got a really good guess. :)
Especially as the log-files listed by lsof have status "deleted":
**
apache2    5288       root    9w      REG       8,44  57327591     204998
/var/log/apache2/access_log-20110204 (deleted)
**

Interesting things happen when a file is deleted while a process still has 
access.

--
Joost



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-04  6:15               ` Joost Roeleveld
@ 2011-05-04 14:00                 ` Kevin O'Gorman
  2011-05-04 14:38                 ` Alan McKinnon
  1 sibling, 0 replies; 15+ messages in thread
From: Kevin O'Gorman @ 2011-05-04 14:00 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]

On Tue, May 3, 2011 at 11:15 PM, Joost Roeleveld <joost@antarean.org> wrote:

> On Wednesday 04 May 2011 13:48:48 Adam Carter wrote:
> > > Well, 2.2.17 is indeed my server, but I decided to stop it and start it
> > > again.  Current log files showed up.
> > > Problem solved, by brute force again, and without any epiphanies of
> > > understanding.
> >
> > Last guess - logrotate is managing the log files but not reloading apache
> > afterwards. Check that the entries in /etc/logrotate.d/apache2 have a
> line
> > in there that runs /etc/init.d/apache2 reload.
>
> Adam,
>
> I think you got a really good guess. :)
> Especially as the log-files listed by lsof have status "deleted":
> **
> apache2    5288       root    9w      REG       8,44  57327591     204998
> /var/log/apache2/access_log-20110204 (deleted)
> **
>
> Interesting things happen when a file is deleted while a process still has
> access.
>
> --
> Joost
>
> Indeed they do.  I used to teach it to my students as a "technique" for
getting
a *really* temporary private file (combined with O_EXCL).

I'm about to try this, and I may change it a bit because when I restarted
apache,
reload didn't work.  I had to stop it and restart it.  Maybe I'll submit a
bug if I
can make sense out of what happens with 'reload' and it always happens.

-- 
Kevin O'Gorman, PhD

[-- Attachment #2: Type: text/html, Size: 1893 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-04  6:15               ` Joost Roeleveld
  2011-05-04 14:00                 ` Kevin O'Gorman
@ 2011-05-04 14:38                 ` Alan McKinnon
  2011-05-04 17:14                   ` kashani
  1 sibling, 1 reply; 15+ messages in thread
From: Alan McKinnon @ 2011-05-04 14:38 UTC (permalink / raw
  To: gentoo-user; +Cc: Joost Roeleveld

Apparently, though unproven, at 08:15 on Wednesday 04 May 2011, Joost 
Roeleveld did opine thusly:

> On Wednesday 04 May 2011 13:48:48 Adam Carter wrote:
> > > Well, 2.2.17 is indeed my server, but I decided to stop it and start it
> > > again.  Current log files showed up.
> > > Problem solved, by brute force again, and without any epiphanies of
> > > understanding.
> > 
> > Last guess - logrotate is managing the log files but not reloading apache
> > afterwards. Check that the entries in /etc/logrotate.d/apache2 have a
> > line in there that runs /etc/init.d/apache2 reload.
> 
> Adam,
> 
> I think you got a really good guess. :)
> Especially as the log-files listed by lsof have status "deleted":
> **
> apache2    5288       root    9w      REG       8,44  57327591     204998
> /var/log/apache2/access_log-20110204 (deleted)
> **
> 
> Interesting things happen when a file is deleted while a process still has
> access.

You mean like as in it's name goes away and absolutely nothing else changes 
whatsoever?

The only trouble you can run into is that new process that did not have the 
file open now cannot find it. 

-- 
alan dot mckinnon at gmail dot com



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-04 14:38                 ` Alan McKinnon
@ 2011-05-04 17:14                   ` kashani
  2011-05-04 21:31                     ` Mick
  0 siblings, 1 reply; 15+ messages in thread
From: kashani @ 2011-05-04 17:14 UTC (permalink / raw
  To: gentoo-user

On 5/4/2011 7:38 AM, Alan McKinnon wrote:
> Apparently, though unproven, at 08:15 on Wednesday 04 May 2011, Joost
> Roeleveld did opine thusly:
>
>> On Wednesday 04 May 2011 13:48:48 Adam Carter wrote:
>>>> Well, 2.2.17 is indeed my server, but I decided to stop it and start it
>>>> again.  Current log files showed up.
>>>> Problem solved, by brute force again, and without any epiphanies of
>>>> understanding.
>>>
>>> Last guess - logrotate is managing the log files but not reloading apache
>>> afterwards. Check that the entries in /etc/logrotate.d/apache2 have a
>>> line in there that runs /etc/init.d/apache2 reload.
>>
>> Adam,
>>
>> I think you got a really good guess. :)
>> Especially as the log-files listed by lsof have status "deleted":
>> **
>> apache2    5288       root    9w      REG       8,44  57327591     204998
>> /var/log/apache2/access_log-20110204 (deleted)
>> **
>>
>> Interesting things happen when a file is deleted while a process still has
>> access.
>
> You mean like as in it's name goes away and absolutely nothing else changes
> whatsoever?
>
> The only trouble you can run into is that new process that did not have the
> file open now cannot find it.
>

	If you're doing it poorly enough, you can fill the filesystem with 
"deleted" files. The other fun one is having a daemon grow larger and 
larger because it's not letting go of files that were deleted while it 
had them open.

kashani



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Apache is running but its log is not
  2011-05-04 17:14                   ` kashani
@ 2011-05-04 21:31                     ` Mick
  0 siblings, 0 replies; 15+ messages in thread
From: Mick @ 2011-05-04 21:31 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: Text/Plain, Size: 1833 bytes --]

On Wednesday 04 May 2011 18:14:49 kashani wrote:
> On 5/4/2011 7:38 AM, Alan McKinnon wrote:
> > Apparently, though unproven, at 08:15 on Wednesday 04 May 2011, Joost
> > 
> > Roeleveld did opine thusly:
> >> On Wednesday 04 May 2011 13:48:48 Adam Carter wrote:
> >>>> Well, 2.2.17 is indeed my server, but I decided to stop it and start
> >>>> it again.  Current log files showed up.
> >>>> Problem solved, by brute force again, and without any epiphanies of
> >>>> understanding.
> >>> 
> >>> Last guess - logrotate is managing the log files but not reloading
> >>> apache afterwards. Check that the entries in /etc/logrotate.d/apache2
> >>> have a line in there that runs /etc/init.d/apache2 reload.
> >> 
> >> Adam,
> >> 
> >> I think you got a really good guess. :)
> >> Especially as the log-files listed by lsof have status "deleted":
> >> **
> >> apache2    5288       root    9w      REG       8,44  57327591    
> >> 204998 /var/log/apache2/access_log-20110204 (deleted)
> >> **
> >> 
> >> Interesting things happen when a file is deleted while a process still
> >> has access.
> > 
> > You mean like as in it's name goes away and absolutely nothing else
> > changes whatsoever?
> > 
> > The only trouble you can run into is that new process that did not have
> > the file open now cannot find it.
> 
> 	If you're doing it poorly enough, you can fill the filesystem with
> "deleted" files. The other fun one is having a daemon grow larger and
> larger because it's not letting go of files that were deleted while it
> had them open.

Does your /etc/logrotate.d/apache2 script contain something like this:

/var/log/apache2/*log {
  missingok
  notifempty
  sharedscripts
  postrotate
  /etc/init.d/apache2 reload > /dev/null 2>&1 || true
  endscript
}

-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-05-04 21:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-01  6:04 [gentoo-user] Apache is running but its log is not Kevin O'Gorman
2011-05-01  6:37 ` Adam Carter
2011-05-02 16:25   ` Kevin O'Gorman
2011-05-01  8:39 ` Neil Bothwick
2011-05-02 16:36   ` Kevin O'Gorman
2011-05-02 18:10     ` Kevin O'Gorman
2011-05-03  3:30       ` Adam Carter
2011-05-04  3:19         ` Kevin O'Gorman
2011-05-04  3:24           ` Kevin O'Gorman
2011-05-04  3:48             ` Adam Carter
2011-05-04  6:15               ` Joost Roeleveld
2011-05-04 14:00                 ` Kevin O'Gorman
2011-05-04 14:38                 ` Alan McKinnon
2011-05-04 17:14                   ` kashani
2011-05-04 21:31                     ` Mick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox