Koozali.org: home of the SME Server

Awstats cron error

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Awstats cron error
« on: August 08, 2008, 11:21:33 AM »
Hi all,

For some time now I've been receiving this cron error - I've delayed resolution till now as awstat reports have not been essential till now.
Quote
/bin/bash: /usr/local/awstats/wwwroot/cgi-bin/awstats.pl: No such file or directory

Now /etc/awstats/awstats.localhost.localdomain contains the following:
Quote
DirData="/var/www/awstats"
DirCgi="/awstats"

And /etc/cron.hourly/00awstats-<server_name_removed>-lan the following:
Quote
#!/bin/bash

if [ -f /var/log/httpd/access_log ] ; then
   exec /usr/bin/awstats_updateall.pl now       -confdir="/etc"       -awstatsprog="/var/www/awstats/awstats.pl" >/dev/null
fi
exit 0

I can't figure out why cron is looking in /../cgi-bin/ for awstats.pl
Am I missing something (other than a bit of grey matter :-)) ?


« Last Edit: August 08, 2008, 11:24:04 AM by ardugh »
SME Server is a fantastic product - thank you!

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Awstats cron error
« Reply #1 on: August 08, 2008, 11:42:15 AM »
how did you install awstats?

ciao
Stefano

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Awstats cron error
« Reply #2 on: August 08, 2008, 12:54:49 PM »
nenonano,

A search of .bash_history shows:
Quote
wget -c wget http://prdownloads.sourceforge.net/awstats/awstats-6.7-1.noarch.rpm
/usr/bin/yum -y localinstall awstats-6.7-1.noarch.rpm

Should I uninstall that and go for the contribs version?:
Quote
yum --enablerepo=smecontribs install smeserver-awstats
SME Server is a fantastic product - thank you!

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Awstats cron error
« Reply #3 on: August 08, 2008, 02:14:02 PM »
yes :-D

Ciao
Stefano

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Awstats cron error
« Reply #4 on: August 22, 2008, 02:09:20 PM »
nenonano, apologies for long absence.

Quote
Should I uninstall that and go for the contribs version?:
I did that Plus reconfigure, etc. Also enabled awstats in the sme panel.

But I still get these errors - any ideas?:
Quote
/bin/bash: /usr/local/awstats/wwwroot/cgi-bin/awstats.pl: No such file or directory
I looked and, of course, there is no file there.

BTW, cron.hourly is the only cron that has an awstats entry:
Quote
Code: [Select]
#!/bin/bash

if [ -f /var/log/httpd/access_log ] ; then
exec /usr/bin/awstats_updateall.pl now -confdir="/etc" -awstatsprog="/var/www/awstats/awstats.pl" >/dev/null
fi
exit 0
I looked and awstats.pl is there.
SME Server is a fantastic product - thank you!

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Awstats cron error
« Reply #5 on: August 13, 2010, 05:31:03 PM »
But I still get these errors - any ideas?:I looked and, of course, there is no file there.

I fix mine... by hand... with no respect to templates till now:
change on cron the path of
Code: [Select]
/bin/bash: /usr/local/awstats/wwwroot/cgi-bin/awstats.plto
Code: [Select]
/var/www/awstats.pl

and in file
Code: [Select]
/home/e-smith/awstats/qmail-preprocessor.sh this:
/bin/cat $SRC /var/log/qmail/current | /usr/local/bin/tai64nlocal | /usr/bin/perl /usr/bin/maillogconvert.pl standard | /bin/grep -v ' alias-localdelivery-'


I hope this thread survive long enough to someone find out why it´s using wrong path.


...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Awstats cron error
« Reply #6 on: August 13, 2010, 09:34:02 PM »
I fix mine... by hand... with no respect to templates till now:
change on cron the path of
Code: [Select]
/bin/bash: /usr/local/awstats/wwwroot/cgi-bin/awstats.plto
Code: [Select]
/var/www/awstats.pl

how did you install awstats?
what cron are you talking about?

Quote
and in file
Code: [Select]
/home/e-smith/awstats/qmail-preprocessor.sh this:
/bin/cat $SRC /var/log/qmail/current | /usr/local/bin/tai64nlocal | /usr/bin/perl /usr/bin/maillogconvert.pl standard | /bin/grep -v ' alias-localdelivery-'

where does that file come from?
what's the output of
Code: [Select]
rpm -qf /home/e-smith/awstats/qmail-preprocessor.sh
?


Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Awstats cron error
« Reply #7 on: August 13, 2010, 09:42:32 PM »
how did you install awstats?
I think I installed AWStats and later awstats-qmail
get a problem, remove awstats, reinstall awstast using yum command from wiki, reinstall awstats-qmail as per wiki page.

Quote
what cron are you talking about?
I found one line at crontab file...not sure from where it came :$

Quote
where does that file come from?
what's the output of

Code: [Select]
rpm -qf /home/e-smith/awstats/qmail-preprocessor.sh
?

[root@marreco ~]# rpm -qf /home/e-smith/awstats/qmail-preprocessor.sh
file /home/e-smith/awstats/qmail-preprocessor.sh is not owned by any package
[root@marreco ~]#



BTW: I´m still getting error messages:
Code: [Select]
/usr/bin/test: too many arguments
ARGH!
...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Awstats cron error
« Reply #8 on: August 13, 2010, 10:36:23 PM »
I think I installed AWStats and later awstats-qmail
get a problem, remove awstats, reinstall awstast using yum command from wiki, reinstall awstats-qmail as per wiki page.

I found one line at crontab file...not sure from where it came :$

Code: [Select]
rpm -qf /home/e-smith/awstats/qmail-preprocessor.sh
?

[root@marreco ~]# rpm -qf /home/e-smith/awstats/qmail-preprocessor.sh
file /home/e-smith/awstats/qmail-preprocessor.sh is not owned by any package
[root@marreco ~]#



BTW: I´m still getting error messages:
Code: [Select]
/usr/bin/test: too many arguments
ARGH!

- remove awstats ad install smeserver-awstats contrib: this should solve the first issue
- the wrong path in mweinber script is due to the fact he was using SF awstats rpm. I will contact him..

Offline Elliott

  • ****
  • 150
  • +0/-0
Re: Awstats cron error
« Reply #9 on: April 06, 2011, 10:55:52 PM »
So I am having the same error come up after the most recent updates. I see the same

/bin/bash: /usr/local/awstats/wwwroot/cgi-bin/awstats.pl: No such file or directory

Come up every hour.

I uninstalled the manual AWSTATS rpm that I had installed and then I installed the contribs version ala:

    yum --enablerepo=smecontribs install smeserver-awstats

Yet the errors continue. What was the solution for this scenario?
Elliott

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Awstats cron error
« Reply #10 on: April 06, 2011, 11:09:39 PM »
re-read carefully this message, all you need is there :-)

Offline Elliott

  • ****
  • 150
  • +0/-0
Re: Awstats cron error
« Reply #11 on: April 13, 2011, 10:04:00 PM »
re-read carefully this message, all you need is there :-)

I believe that I have done what that message is indicating. I say I believe because I think I understand what he is saying to do. What I did was edit /etc/cron.hourly/00awstats as indicated.

I also edited /home/e-smith/awstats/qmail-preprocessor.sh and replaced what was in there with what is in boldface in the message you are referring to.

I am still getting the messages every hour. Does this require a reboot or the restarting of any services?

Thanks,
E
« Last Edit: April 13, 2011, 10:06:17 PM by Elliott »
Elliott

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Awstats cron error
« Reply #12 on: April 13, 2011, 10:13:29 PM »
try to restart crond

Code: [Select]
service crond restart

Offline Elliott

  • ****
  • 150
  • +0/-0
Re: Awstats cron error
« Reply #13 on: April 13, 2011, 10:49:37 PM »
I have 2 SME's both with this issue. One, I restated cron. The other I fully rebooted.

Both are still sending the error.

Anything else to try?
Elliott

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Awstats cron error
« Reply #14 on: April 13, 2011, 11:02:22 PM »
I have 2 SME's both with this issue. One, I restated cron. The other I fully rebooted.

Both are still sending the error.

Anything else to try?

open a bug in bugzilla and report here the reference, thank you