Koozali.org: home of the SME Server
Contribs.org Forums => General Discussion => Topic started by: bloodshoteye 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.
/bin/bash: /usr/local/awstats/wwwroot/cgi-bin/awstats.pl: No such file or directory
Now /etc/awstats/awstats.localhost.localdomain contains the following:
DirData="/var/www/awstats"
DirCgi="/awstats"
And /etc/cron.hourly/00awstats-<server_name_removed>-lan the following:
#!/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 :-)) ?
-
how did you install awstats?
ciao
Stefano
-
nenonano,
A search of .bash_history shows:
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?:
yum --enablerepo=smecontribs install smeserver-awstats
-
yes :-D
Ciao
Stefano
-
nenonano, apologies for long absence.
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?:
/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:
#!/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.
-
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
/bin/bash: /usr/local/awstats/wwwroot/cgi-bin/awstats.pl
to
/var/www/awstats.pl
and in file
/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.
-
I fix mine... by hand... with no respect to templates till now:
change on cron the path of
/bin/bash: /usr/local/awstats/wwwroot/cgi-bin/awstats.pl
to
/var/www/awstats.pl
how did you install awstats?
what cron are you talking about?
and in file
/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
rpm -qf /home/e-smith/awstats/qmail-preprocessor.sh
?
-
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.
what cron are you talking about?
I found one line at crontab file...not sure from where it came :$
where does that file come from?
what's the output of
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:
/usr/bin/test: too many arguments
ARGH!
-
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 :$
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:
/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..
-
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?
-
re-read carefully this (http://forums.contribs.org/index.php/topic,41796.msg227651.html#msg227651) message, all you need is there :-)
-
re-read carefully this (http://forums.contribs.org/index.php/topic,41796.msg227651.html#msg227651) 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
-
try to restart crond
service crond restart
-
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?
-
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
-
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.
Hum...to me that´s on other file:
[root@marreco ~]# grep awstats /etc/crontab
45 */1 * * * root /var/www/awstats/awstats.pl -update -config=mail >/dev/null
[root@marreco ~]#
-
Bug 6594 opened (hopefully in the correct place as I have a history of making mistakes in there :? )
http://bugs.contribs.org/show_bug.cgi?id=6594
-
Hum...to me that´s on other file:
[root@marreco ~]# grep awstats /etc/crontab
45 */1 * * * root /var/www/awstats/awstats.pl -update -config=mail >/dev/null
[root@marreco ~]#
I thought in this build that crontab was built from templates somewhere. Are you saying that I need to edit crontab directly?
-
YES!
I´m saying you should TEST it by direct edit crontab file.
If it works for you, edit template files to reflect that.
Test directly on file allow you to have a QUICK return and to get back (just generate file again by expand-templates!)
-
So at this point, on my testing machine I have edited the awstats template to reflect the desired path change.
I have typed:
expand-template /etc/crontab
and then I type:
service crond restart
In 15 minutes (45 after the hour) I shall see if we have a winner!
Thanks!
-E
-
Bingo! I only received the error from the production server this hour.
Thanks!
-E
-
What is the template file location that is required to be amended to sort out this problem?
Sorry if I have missed it but i've check every file mentioned in this post and made the necessary amendments and expanded templates but no change.
-
What is the template file location that is required to be amended to sort out this problem?
Sorry if I have missed it but i've check every file mentioned in this post and made the necessary amendments and expanded templates but no change.
Please read the thread... just change the REAL files BEFORE... test it. There are instructions written by myself above.
Once the problem is solved, you´ll edit the template files. To understand template scheme read the docs.
Jáder
-
"Read the docs"! Teach a man how to fish eh? Well I caught some fish and i'm willing to share mine.
If your happy it works edit the template file found in the following location.
pico /etc/e-smith/templates-custom/etc/crontab/awstats
Expand your templates and restart the service as mentioned above.
As a side note, sometimes it's nice to just read a post that covers a problem from top to bottom with straight answers not just regarding the problem itself but the to niggly questions too. I get this whole principle of helping people help themselves and agree to some extent but the net effect in most cases of not providing answers to small questions/details in posts is potentially a bunch of confused newbies forever asking silly questions (like me) creating LOTS of irritating posts for all the clever people to waste time offering variations of "self help" advice on, where as if I had found the above info in the thread I would never have posted and surely in the grand scheme of things everybody would save time? hmmmm :?