[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mailgraph] Re: Cookie error ?


Oh, this file ! Never mind.. My head was on some other planet..
Here is the init.. And with the use in the perl file, I still have the 
same issue.. This is only since the upgrade though.. I used an old 
version of MailGraph before, and everything worked perfectly.. Thank you 
again Patrick..

#!/bin/sh

# $Id: mailgraph-init 19 2005-06-13 11:23:22Z dws $
# example init script for mailgraph
#
# chkconfig: 2345 82 28
# description: mailgraph postfix log grapher.
#
# processname: mailgraph.pl
# pidfile: /var/run/mailgraph.pid


PATH=/bin:/usr/bin
MAILGRAPH_PL=/usr/local/bin/mailgraph.pl
MAIL_LOG=/var/log/maillog
PID_FILE=/var/run/mailgraph.pid
RRD_DIR=/var/lib

case "$1" in
'start')
    echo "Starting mail statistics grapher: mailgraph";
    nice -19 $MAILGRAPH_PL -l $MAIL_LOG -d \
        --daemon-pid=$PID_FILE --daemon-rrd=$RRD_DIR
    ;;

'stop')
    echo "Stopping mail statistics grapher: mailgraph";
    if [ -f $PID_FILE ]; then
        kill `cat $PID_FILE`
        rm $PID_FILE
    else
        echo "mailgraph not running";
    fi
    ;;

*)
    echo "Usage: $0 { start | stop }"
    exit 1
    ;;

esac
exit 0











Patrick G. Victoriano wrote:
> Frank,
>
> Please include this line to your mailgraph.pl and check what is the output
>
>
> use lib qw(/usr/local/rrdtool/lib/perl);
>
>  
> about the mailgraph-init
>
> mailgraph-init is used to start and stop mailgraph.
> If you do not have this file, how do you start and stop mailgraph?
>
> Also, it also directs where to create the pid file and path the RRD
> directory
>  
>  
>  
>  
> PATRICK G VICTORIANO aka TRIK
> FTCP - Network Group
> Fujitsu Ten Solutions Philippines Inc.
> 8th Floor East Tower PSE Center
> Ortigas Center Pasig City
>
> -----Original Message-----
> From: Frank [mailto:frank{at}anotherviewfor{dot}us] 
> Sent: Tuesday, March 04, 2008 7:03 AM
> To: Patrick G. Victoriano
> Cc: mailgraph@list.ee.ethz.ch
> Subject: Re: [mailgraph] Re: Cookie error ?
>
> Hi Patrick,
>
> Please find attached the .PL and .CGI.
> I don't have any mailgraph-init that i can find.. Would it be my issue !?
> Thank you
>
>
> Patrick G. Victoriano wrote:
>   
>> Frank,
>>
>> Please also include your mailgraph-init file
>>  
>>  
>>  
>>  
>>  
>>
>> -----Original Message-----
>> From: Frank [mailto:frank{at}anotherviewfor{dot}us] 
>> Sent: Tuesday, March 04, 2008 6:39 AM
>> To: Patrick G. Victoriano
>> Cc: mailgraph@list.ee.ethz.ch
>> Subject: Re: [mailgraph] Re: Cookie error ?
>>
>> Hi Trik,
>>
>> Thank you for your email..
>> This is the conf. I have in mailgraph.cgi:
>>
>> my $host = (POSIX::uname())[1];
>> my $scriptname = 'mailgraph.cgi';
>> my $xpoints = 540;
>> my $points_per_sample = 3;
>> my $ypoints = 160;
>> my $ypoints_err = 96;
>> my $rrd = 'mailgraph.rrd'; # path to where the RRD database is
>> my $rrd_virus = 'mailgraph_virus.rrd'; # path to where the Virus RRD 
>> database is
>> my $tmp_dir = '/tmpd/mailgraph'; # temporary directory where to store 
>> the images
>>
>>
>>
>> Now, when I tried to launch it, I had this in the logs:
>> [Mon Mar 03 17:32:33 2008] [error] [client 169.242.118.124] ERROR: 
>> opening 'mailgraph.rrd': No such file or directory, referer: 
>> http://sun.nasa.org/cgi-bin/mailgraph.cgi
>> [Mon Mar 03 17:32:33 2008] [error] [client 169.242.118.124] Premature 
>> end of script headers: mailgraph.cgi, referer: 
>> http://sun.nasa.gov/cgi-bin/mailgraph.cgi
>>
>>
>> and if I add the file mailgraph.rrd in the cgi-bin folder, I get another 
>> error:
>>
>> root{at}sun:/var/www/cgi-bin> touch mailgraph.rrd;chmod 755 mailgraph.rrd
>> root{at}sun:/var/www/cgi-bin> chown apache.apache mailgraph.rrd
>> root{at}sun:/var/www/cgi-bin> ls -la
>> total 20
>> drwxr-xr-x  2 root   root   4096 Mar  3 17:34 .
>> drwxr-xr-x  8 root   root   4096 Jul 14  2007 ..
>> -rwxr-xr-x  1 apache apache 6899 Mar  3 17:26 mailgraph.cgi
>> -rwxr-xr-x  1 apache apache  672 Feb  5 10:02 mailgraph.css
>> -rwxr--r--  1 apache apache    0 Mar  3 17:34 mailgraph.rrd
>>
>>
>> Mon Mar 03 17:35:39 2008] [error] [client 169.242.118.124] ERROR: 
>> reading the cookie off mailgraph.rrd faild, referer: 
>> http://sun.nasa.gov/cgi-bin/mailgraph.cgi
>> [Mon Mar 03 17:35:39 2008] [error] [client 169.242.118.124] Premature 
>> end of script headers: mailgraph.cgi, referer: 
>> http://sun.nasa.gov/cgi-bin/mailgraph.cgi
>>
>>
>>
>> thank you guys
>>
>>
>>
>>
>>
>>
>>
>> Patrick G. Victoriano wrote:
>>   
>>     
>>> Hi,
>>>
>>> Did you check your entry in the mailgraph.cgi the directory of your tmp
>>> files?
>>>
>>> You should change 
>>>
>>> my $tmp_dir = /tmp/mailgraph
>>>
>>> to
>>>
>>> my $tmp_dir = /tmpd/mailgraph
>>>
>>>
>>> -Trik
>>>  
>>>  
>>>  
>>>  
>>>  
>>> -----Original Message-----
>>> From: mailgraph-bounce@list.ee.ethz.ch
>>> [mailto:mailgraph-bounce@list.ee.ethz.ch] On Behalf Of Frank
>>> Sent: Monday, March 03, 2008 9:29 PM
>>> To: Patrick G. Victoriano
>>> Cc: mailgraph@list.ee.ethz.ch
>>> Subject: [mailgraph] Re: Cookie error ?
>>>
>>> Hi,
>>>
>>> This is my /var/www/cgi-bin/
>>> rwxr-xr-x  2 root   root   4096 Feb 16 10:29 .
>>> drwxr-xr-x  8 root   root   4096 Jul 14  2007 ..
>>> -rwxr-xr-x  1 apache apache 6898 Feb  5 09:53 mailgraph.cgi
>>> -rwxr-xr-x  1 apache apache  672 Feb  5 10:02 mailgraph.css
>>> -rwxrwxrwt  1 apache apache    0 Feb 16 10:11 mailgraph.rrd
>>>
>>>
>>> And this is /tmpd/mailgraph/
>>> drwxr-xr-x  3 apache apache 4096 Feb 28 22:37 .
>>> drwxrwxrwt  4 root   root   4096 Mar  3 08:24 ..
>>> drwxr-xr-x  2 apache apache 4096 Feb 28 22:37 ,cgi-bin
>>>
>>> /tmpd/mailgraph/,cgi-bin/
>>> drwxr-xr-x  2 apache apache 4096 Feb 28 22:37 .
>>> drwxr-xr-x  3 apache apache 4096 Feb 28 22:37 ..
>>>
>>>
>>>
>>> Any idea  ?
>>>
>>>
>>> Patrick G. Victoriano wrote:
>>>   
>>>     
>>>       
>>>> Hi Frank,
>>>>
>>>> I think it's a permission error on your configuration.
>>>> Check the permission of your mailgraph directory and /tmp/mailgraph
>>>> It should be owned by apache.
>>>>
>>>> Hope it solved your problem.
>>>>
>>>>  
>>>> -Trik 
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: mailgraph-bounce@list.ee.ethz.ch
>>>> [mailto:mailgraph-bounce@list.ee.ethz.ch] On Behalf Of Frank
>>>> Sent: Saturday, March 01, 2008 11:51 PM
>>>> Cc: mailgraph@list.ee.ethz.ch
>>>> Subject: [mailgraph] Cookie error ? 
>>>>
>>>>
>>>> hi all,
>>>>
>>>> Would anyone have any idea of what is this error in the apache logs ?
>>>> Since I upgraded mailgraph, I can't get anything on my screen anymore..
>>>>
>>>> [Sat Mar 01 10:46:27 2008] [error] [client 169.242.118.124] Premature 
>>>> end of script headers: mailgraph.cgi, referer: 
>>>> http://sun.nasa.gov/cgi-bin/mailgraph.cgi
>>>>
>>>> [Sat Mar 01 10:46:27 2008] [error] [client 169.242.118.124] ERROR: 
>>>> reading the cookie off mailgraph.rrd faild, referer: 
>>>> http://sun.nasa.gov/cgi-bin/mailgraph.cgi
>>>>
>>>>
>>>> thank you all
>>>>   
>>>>     
>>>>       
>>>>         
>>>>>   
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>> --
>>>> Unsubscribe mailto:mailgraph-request@list.ee.ethz.ch?subject=unsubscribe
>>>> Help        mailto:mailgraph-request@list.ee.ethz.ch?subject=help
>>>> Archive     http://lists.ee.ethz.ch/mailgraph
>>>> WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi
>>>>
>>>>
>>>>
>>>>   
>>>>     
>>>>       
>>>>         
>>> --
>>> Unsubscribe mailto:mailgraph-request@list.ee.ethz.ch?subject=unsubscribe
>>> Help        mailto:mailgraph-request@list.ee.ethz.ch?subject=help
>>> Archive     http://lists.ee.ethz.ch/mailgraph
>>> WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi
>>>
>>>
>>>
>>>   
>>>     
>>>       
>>   
>>     
>
>
>   

--
Unsubscribe mailto:mailgraph-request@list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mailgraph-request@list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/mailgraph
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi