/ Zope / Apsis / Pound Mailing List / Archive / 2007 / 2007-04 / logging to file and logging errors (50x)

[ << ] [ >> ]

[ Config file check option / Steve ... ] [ Pound and SSL Offloading Recommendations / ... ]

logging to file and logging errors (50x)
peceka <peceka(at)gmail.com>
2007-04-13 15:49:58 [ FULL ]
Hi,

i'm wondering if there will be possibility to set in pound config name
of file to which pound will log?
Ok, i understand that pound can log to syslog, but i want to run more
then one pound on my machine (about 20+ exaclty), one for one HTTPS
virtualhost.
And i would like to have log of all connection to specified pound
daemon in one file to generate statistics and to debug if somethings
goes wrong.

And the another question, is there any possibility to log all errors
which pound gives to clients? For example, under very heavy load i
sometimes got:
"An internal server error occurred. Please try again later." but i
can't see such message in logs.
So I don't know if other peoples get such message too.
prehaps yes, so i want to know how many such messages was displayed.

Best regards,
p.

RE: [Pound Mailing List] logging to file and logging errors (50x)
"John Snowdon" <j.p.snowdon(at)newcastle.ac.uk>
2007-04-13 16:22:15 [ FULL ]
Hi 'P',

I configure pound with '--disable-log' and do my own log file
processing. Each of my pound HTTPS instances runs in a separate process
and logs to individual files as below:

#!/bin/bash
/usr/local/sbin/pound.instance1 \
        -f /usr/local/etc/pound.instance1.cfg \
        -p /var/tmp/instance1.PID \
        >>/var/log/pound.instance1.log
2>>/var/log/pound.instance1.error.log &

... and so on for instance2, instance3 etc.

It's then pretty straight forward to do your own log file analysis on
the individual files, and combine them for archival if you want.

I'm running Pound 2.1.x, I think the logging options and syntax may have
changed in 2.2+, so your mileage may vary! .. at least I didn't get the
expected logs when I tried it with one of my above pound start
instances.

 John Snowdon - IT Support Specialist
-==========================================-
 School of Medical Education Development 
 Faculty of Medical Sciences Computing
 University of Newcastle

 Email : j.p.snowdon(at)ncl.ac.uk

[...]

Re: [Pound Mailing List] logging to file and logging errors (50x)
Kenneth Burgener <kenneth(at)mail1.ttak.org>
2007-04-14 16:59:04 [ FULL ]
John Snowdon wrote:[...]


With this setup you can't really do any log rotation unless you stop
pound.  Have you thought about maybe piping it through something else to
facilitate log rotation?

RE: [Pound Mailing List] logging to file and logging errors (50x)
"Joe Gooch" <mrwizard(at)k12system.com>
2007-04-15 01:45:39 [ FULL ]
.. Like multilog?

This will also cause problems if the drive fills or is unavailable...
the output FD buffer will fill and requests will stop.

However, to each his own.

There's also the LogFile directive. (same caveats)
LogFile /opt/pound/log/errors
AccessLog /opt/pound/log/access

Joseph Gooch
Sapphire Suite Product Manager
K12 Systems, Inc.
(866) 366-9540[...]
(50x)[...]
process[...]
to[...]
pound(at)apsis.ch.[...]

Re: [Pound Mailing List] logging to file and logging errors (50x)
peceka <peceka(at)gmail.com>
2007-04-16 08:21:17 [ FULL ]
2007/4/15, Joe Gooch <mrwizard(at)k12system.com>:[...]

Thanks, i will try it.
But this will log when an Pound error (ie. 500) will be shown to
visitor? It's important to me.
[...]
[...]
/sources/Pound-2.3[...]
I think that something like logging to file will be a good addon to Pound.

regards,
p.

Re: [Pound Mailing List] logging to file and logging errors (50x)
Stefan Lambrev <stefan.lambrev(at)sun-fish.com>
2007-04-16 10:26:26 [ FULL ]
Hi,

peceka wrote:[...]
At LogLevel 2 :
Apr 16 10:23:35 xxx4 pound: 80.121.34.246 GET /images/flag.gif HTTP/1.1 
- HTTP/1.1 200 OK (www.xxxxxx.com -> 192.168.13.4:9080) 0.001 sec
So this request was with respones 200 - OK why do not grep for "500 
Internal" ?? I'm pretty sure if Internal Error happened it is logged.
[...]

RE: [Pound Mailing List] logging to file and logging errors (50x)
"John Snowdon" <j.p.snowdon(at)newcastle.ac.uk>
2007-04-16 10:32:48 [ FULL ]
Repost, sorry... our mailhost seems to strip bash script format text
file.... :-(

Indeed, we do a scheduled restart of each Pound process in the wee hours
where the logs are rotated, scanned, new hostnames picked up, awstat
config files auto generated (we have a master awstat config file and
auto generated a config for each hostname we grok in the logs... means I
don't have to keep the list of awstat config files for each of our
hosted domains up to date!) and the logs processed then archived. 

I've attached the scripts that I use for starting/stopping my Pound
instances, and the log rotation and processing scripts; hopefully they
will be of some use to others. They will get stripped from this message,
but should appear in the list archives.

It helps being in a university as 99.9999% of our systems' use is
between the hours of 7am and 8pm... not many of you in the commercial
world can afford the luxury of nightly restarts :-) 

 John Snowdon - IT Support Specialist
-==========================================-
 School of Medical Education Development 
 Faculty of Medical Sciences Computing
 University of Newcastle

 Phone : 0191 246 4549
 Email : j.p.snowdon(at)ncl.ac.uk

[...][...][...][...][...]
72198000/1176562744000
Attachments:  
poundscripts.zip application/x-zip-compressed 2684 Bytes

Re: [Pound Mailing List] logging to file and logging errors (50x)
peceka <peceka(at)gmail.com>
2007-04-16 11:23:38 [ FULL ]
Hi,
[...]

I'm using:
LogLevel        2
pound1# cat /var/log/pound.log | grep "500"
#

But for a moment i've disabled all Back-Ends and when i'm going with
FF/IE to my website i've got:
"The service is not available. Please try again later."

So as you can see there are no errors in logfile

pound.log is generated by syslog:
!pound
*.*                                             /var/log/pound.log

regards,
p.

RE: [Pound Mailing List] logging to file and logging errors (50x)
"Joe Gooch" <mrwizard(at)k12system.com>
2007-04-16 15:06:47 [ FULL ]
Uhhh... right, my bad.

Logfile and AccessLog are added in my statistics and logging patch:

http://users.k12system.com/mrwizard/pound/

Though, I haven't yet updated them for v2.3.

The piping will work just as well, if you like that better.

Joseph Gooch
Sapphire Suite Product Manager
K12 Systems, Inc.
(866) 366-9540
[...]
(50x)[...]
unavailable...[...]
Pound.[...]
pound(at)apsis.ch.[...]

Re: [Pound Mailing List] logging to file and logging errors (50x)
Kenneth Burgener <kenneth(at)mail1.ttak.org>
2007-04-16 17:31:57 [ FULL ]
John Snowdon wrote:[...]


Attachments generally get dropped when sending to mailing lists.

RE: [Pound Mailing List] logging to file and logging errors (50x)
Robert Segall <roseg(at)apsis.ch>
2007-04-16 20:11:32 [ FULL ]
On Fri, 2007-04-13 at 15:22 +0100, John Snowdon wrote:[...]

As someone already mentioned, multilog (part of the DJB daemontools
package) would be a better solution. It would also save you the syslog
overhead, so for high-volume sites it is recommended. Configure Pound
without the supervisor thread, log to stdout/stderr, disable daemon.
Pipe output to multilog. You get the additional advantage of separating
the traffic and errors (if you want to) and automatic log rotation
without stopping and starting.[...]

Re: [Pound Mailing List] logging to file and logging errors (50x)
peceka <peceka(at)gmail.com>
2007-04-17 09:23:27 [ FULL ]
Hi,

2007/4/16, Robert Segall <roseg(at)apsis.ch>:[...]

I compiled pound 2.3 i these switches:
tests1# ./configure --with-owner=pound --with-group=pound
--disable-super --disable-log


My pound.cfg:
User            "pound"
Group           "pound"
Daemon          0
LogLevel        2
Alive           30
Client          60
Control         "/var/run/pound.socket"

ListenHTTP
        Address 192.168.1.168
        Port    80
        xHTTP   0
End

Service
        BackEnd
                # localhost
                Address 127.0.0.1
                Port    80
        End
End


Then i've started it like this:
tests1# /usr/local/sbin/pound -f /usr/local/etc/pound.cfg
17/Apr/2007 09:17:35 +0200: starting...

And nothing shows on console. I go to 192.168.1.168:80 with Opera, but
in apache log i can see:
127.0.0.1 - - [17/Apr/2007:09:18:00 +0200] "GET / HTTP/1.1" 200 1497
"-" "Opera/9.20 (Windows NT 5.1; U; pl)"
127.0.0.1 - - [17/Apr/2007:09:18:00 +0200] "GET /apache_pb.gif
HTTP/1.1" 304 - "http://192.168.1.168/"
"Opera/9.20 (Windows NT 5.1;
U; pl)"
127.0.0.1 - - [17/Apr/2007:09:18:00 +0200] "GET /favicon.ico HTTP/1.1"
404 283 "http://192.168.1.168/" "Opera/9.20
(Windows NT 5.1; U; pl)"
127.0.0.1 - - [17/Apr/2007:09:18:00 +0200] "GET / HTTP/1.1" 200 1497
"-" "Opera/9.20 (Windows NT 5.1; U; pl)"
127.0.0.1 - - [17/Apr/2007:09:18:00 +0200] "GET /apache_pb.gif
HTTP/1.1" 304 - "http://192.168.1.168/"
"Opera/9.20 (Windows NT 5.1;
U; pl)"
127.0.0.1 - - [17/Apr/2007:09:18:00 +0200] "GET /favicon.ico HTTP/1.1"
404 283 "http://192.168.1.168/" "Opera/9.20
(Windows NT 5.1; U; pl)"

Why?

Regards,
p.

Re: [Pound Mailing List] logging to file and logging errors (50x)
Robert Segall <roseg(at)apsis.ch>
2007-04-17 18:11:35 [ FULL ]
On Tue, 2007-04-17 at 09:23 +0200, peceka wrote:[...]

There is no --disable-log in 2.3.
[...]

Add in your config file

	LogFacility -

to avoid using syslog (assuming that's what you want).
[...]

Why what?[...]

Re: [Pound Mailing List] logging to file and logging errors (50x)
peceka <peceka(at)gmail.com>
2007-04-30 13:33:32 [ FULL ]
2007/4/17, Robert Segall <roseg(at)apsis.ch>:[...]

Ok, i've configured pound to log all to multilog. It works fine. But
10 minutes ago my monitoring system has send me mail that it has got
503 http error code from pound.

So i'm looking to pound logs and only what i can see is:
2007-04-30 13:22:27.057795500 30/Apr/2007 13:22:27 +0200: response
error read from 192.168.0.1:80: Operation timed out
2007-04-30 13:23:09.566900500 30/Apr/2007 13:23:09 +0200: error copy
server cont: Broken pipe
2007-04-30 13:23:48.963878500 30/Apr/2007 13:23:48 +0200: HTTP accept:
Software caused connection abort
2007-04-30 13:23:49.344886500 30/Apr/2007 13:23:49 +0200: HTTP accept:
Software caused connection abort
2007-04-30 13:24:01.919577500 30/Apr/2007 13:24:01 +0200: error flush
headers to 1.2.3.4: Broken pipe
2007-04-30 13:24:20.026884500 30/Apr/2007 13:24:20 +0200: error read
from 2.3.4.5: Connection reset by peer
2007-04-30 13:24:22.834905500 30/Apr/2007 13:24:22 +0200: HTTP accept:
Software caused connection abort
2007-04-30 13:24:29.594884500 30/Apr/2007 13:24:29 +0200: response
error read from 192.168.0.1:80: Operation timed out
2007-04-30 13:24:46.140973500 30/Apr/2007 13:24:46 +0200: error copy
server cont: Broken pipe
2007-04-30 13:24:52.247926500 30/Apr/2007 13:24:52 +0200: error copy
chunk cont: Broken pipe
2007-04-30 13:25:21.560981500 30/Apr/2007 13:25:21 +0200: error copy
server cont: Broken pipe
2007-04-30 13:26:00.164947500 30/Apr/2007 13:26:00 +0200: error read
from 83.12.55.18: Operation timed out


Where IP 192.168.0.1 is one of my BackEnds.
So everytime when i see in logs:
response error read from IP:80: Operation timed out
i must think of it like there was 503 http error code send to enduser?

regards,
p.

Re: [Pound Mailing List] logging to file and logging errors (50x)
Jean-Francois Stenuit <jfs(at)skynet.be>
2007-04-30 14:01:35 [ FULL ]
On Mon, 30 Apr 2007, peceka wrote:
[...]

Most probably, yes. In that case, you should increase the timeout to the 
backends using the "Timeout" directive.
[...]

Re: [Pound Mailing List] logging to file and logging errors (50x)
Robert Segall <roseg(at)apsis.ch>
2007-04-30 14:40:05 [ FULL ]
On Mon, 2007-04-30 at 13:33 +0200, peceka wrote:[...]

A back-end time-out will (usually) cause a 500. 503 is issued if there
is no back-end available (which may be a side effect of a time-out). In
any case you should increase the time-out.[...]

MailBoxer