No webalizer stat generated

Discussion in 'General' started by savago, Dec 31, 2009.

  1. savago

    savago New Member

    FC 12 perfect setup

    no webalizer stats generated

    /root/ispconfig/php/php -q /root/ispconfig/scripts/shell/webalizer.php
    Error: Can't open log file /var/www/web1/log/web.log (symlink)
    Error: Can't open log file /var/www/web6/log/web.log (symlink)
    Error: Can't open log file /var/www/web5/log/web.log (symlink)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to wait up to 24 hours until new stats get generated and there must have been pages accessed for these sites, otherwise you get the error above as there is no web.log file then.
     
  3. savago

    savago New Member

    I was run crontabs as root:
    crontab -l
    30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
    0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null
    0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/awstats.php &> /dev/null
    0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
    15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
    40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null
    05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null

    and see output
    /root/ispconfig/php/php -q ..

    p.s

    /root/ispconfig/php/php -q /root/ispconfig/scripts/shell/ftp_logs.php
    grep: /var/log/xferlog.0: No such file or directory

    /root/ispconfig/php/php -q /root/ispconfig/scripts/shell/mail_logs.php
    grep: /var/log/maillog.0: No such file or directory
    /bin/awk
    /bin/awk
    /bin/awk
     
    Last edited: Jan 4, 2010
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    ls /var/log/
     
  5. savago

    savago New Member

    ls -la /var/log/
    total 136444
    drwxr-xr-x 18 root root 4096 2010-01-04 12:51 .
    drwxr-xr-x 24 root root 4096 2009-12-18 23:59 ..
    -rw------- 1 root root 76960 2009-12-18 15:42 anaconda.log
    -rw------- 1 root root 42749 2009-12-18 15:42 anaconda.syslog
    -rw------- 1 root root 24543 2009-12-18 15:42 anaconda.xlog
    drwxr-x--- 2 root root 4096 2010-01-03 14:20 audit
    drwxr-x--- 2 backuppc backuppc 4096 2009-09-25 17:13 BackupPC
    -rw-r--r-- 1 root root 0 2010-01-03 03:13 boot.log
    -rw-r--r-- 1 root root 2985 2009-12-19 20:56 boot.log-20091220
    -rw-r--r-- 1 root root 2785 2009-12-23 14:08 boot.log-20091227
    -rw-r--r-- 1 root root 210 2009-12-30 10:20 boot.log-20100103
    -rw------- 1 root utmp 2304 2010-01-03 16:25 btmp
    -rw------- 1 root utmp 1659264 2009-12-29 10:44 btmp-20100101
    drwxr-xr-x 2 root root 4096 2009-12-18 15:55 ConsoleKit
    -rw------- 1 root root 85009 2010-01-04 13:00 cron
    -rw------- 1 root root 30634 2009-12-20 03:29 cron-20091220
    -rw------- 1 root root 145686 2009-12-27 03:16 cron-20091227
    -rw------- 1 root root 423045 2010-01-03 03:13 cron-20100103
    drwxr-xr-x 2 lp sys 4096 2009-12-23 13:25 cups
    drwxr-xr-x 2 root root 4096 2009-07-25 10:55 dirmngr
    -rw-r--r-- 1 root root 30312 2009-12-23 14:08 dmesg
    -rw-r--r-- 1 root root 31308 2009-12-23 13:22 dmesg.old
    drwx------ 2 root root 4096 2010-01-04 12:49 httpd
    -rw-r--r-- 1 root root 13321 2009-12-18 22:50 ispconfig_install.log
    -rw-r--r-- 1 root root 5840584 2010-01-04 12:42 lastlog
    drwxr-xr-x 2 root root 4096 2009-12-18 15:36 mail
    -rw------- 1 root root 1989719 2010-01-04 13:00 maillog
    -rw------- 1 root root 1365337 2009-12-20 03:26 maillog-20091220
    -rw------- 1 root root 12856950 2009-12-27 03:16 maillog-20091227
    -rw------- 1 root root 10862246 2010-01-03 03:13 maillog-20100103
    -rw-r--r-- 1 root root 31555374 2010-01-04 12:51 maillog.ispconfigsave
    -rw------- 1 root root 101842 2010-01-04 12:55 messages
    -rw------- 1 root root 11655330 2009-12-20 03:29 messages-20091220
    -rw------- 1 root root 36466820 2009-12-27 03:16 messages-20091227
    -rw------- 1 root root 24179136 2010-01-03 03:13 messages-20100103
    drwxr-xr-x 2 munin munin 4096 2010-01-04 03:31 munin
    -rw-r----- 1 mysql mysql 15969 2009-12-30 09:30 mysqld.log
    drwxr-xr-x 2 ntp ntp 4096 2009-12-09 13:49 ntpstats
    drwx------ 2 root root 4096 2009-09-16 21:03 ppp
    drwxr-xr-x 2 root root 4096 2009-12-18 19:29 prelink
    drwxr-x--- 2 root root 4096 2009-12-11 01:41 proftpd
    -rw------- 1 root root 24850 2009-12-18 15:42 program.log
    drwxr-xr-x 2 root root 4096 2010-01-03 03:13 rkhunter
    drwxr-xr-x 2 root root 4096 2010-01-04 00:00 sa
    drwx------ 3 root root 4096 2009-12-18 15:36 samba
    -rw------- 1 root root 743679 2010-01-04 12:49 secure
    -rw------- 1 root root 1608068 2009-12-20 02:05 secure-20091220
    -rw------- 1 root root 325907 2009-12-27 02:10 secure-20091227
    -rw------- 1 root root 1384892 2010-01-03 02:10 secure-20100103
    -rw------- 1 root root 0 2010-01-03 03:13 spooler
    -rw------- 1 root root 0 2009-12-18 15:33 spooler-20091220
    -rw------- 1 root root 0 2009-12-20 03:29 spooler-20091227
    -rw------- 1 root root 0 2009-12-27 03:16 spooler-20100103
    drwxr-x--- 2 squid squid 4096 2009-11-23 20:00 squid
    -rw------- 1 root root 71050 2009-12-18 15:42 storage.log
    -rw------- 1 root root 0 2009-12-18 15:33 tallylog
    -rw-r--r-- 1 root root 0 2009-12-18 15:55 wpa_supplicant.log
    -rw-rw-r-- 1 root utmp 238464 2010-01-04 12:42 wtmp
    -rw-r--r-- 1 root root 0 2010-01-03 03:13 xferlog
    -rw-r--r-- 1 root root 267 2009-12-21 03:41 xferlog-20091221.gz
    -rw-r--r-- 1 root root 68539 2009-12-27 03:16 xferlog-20091227.gz
    -rw-r--r-- 1 root root 13619 2010-01-03 03:13 xferlog-20100103.gz
    -rw-r--r-- 1 root root 1097847 2010-01-04 12:50 xferlog.ispconfigsave
    -rw------- 1 root root 0 2010-01-01 04:23 yum.log
    -rw------- 1 root root 250340 2009-12-30 09:24 yum.log-20100101
     
  6. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    getenforce
    ?
     
  7. savago

    savago New Member


    # getenforce
    Disabled
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Can you run
    Code:
    /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php
    /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php
    ?
    Do you get any error messages? Do the stats work afterwards?
     
  9. savago

    savago New Member

    No errors.
    Not working.
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Can you check the log directory of all your web sites and check if there's a web.log in it?
     
  11. savago

    savago New Member


    [root@server1 src]# cd /var/www/web1/log/
    [root@server1 log]# ls -la
    total 385260
    drwxr-xr-x 4 web1_admin web1 4096 2010-01-02 00:30 .
    drwxr-xr-x 10 web1_admin web1 4096 2010-01-07 00:23 ..
    drwxr-xr-x 3 web1_admin web1 4096 2009-12-20 00:30 2009
    drwxr-xr-x 3 web1_admin web1 4096 2010-01-02 00:30 2010
    -rw-r--r-- 1 web1_admin web1 394482111 2010-01-11 08:22 error.log
    -r-------- 1 web1_admin web1 0 2009-12-19 11:46 .no_delete
    lrwxrwxrwx 1 web1_admin web1 43 2010-01-02 00:30 web.log -> /var/www/www.sitename1.com/log/2010/01/web.log
    [root@server1 log]# cd /var/www/web6/log/
    [root@server1 log]# ls -la
    total 764
    drwxr-xr-x 4 web6_admin web6 4096 2010-01-02 00:30 .
    drwxr-xr-x 9 web6_admin web6 4096 2009-12-31 11:29 ..
    drwxr-xr-x 3 web6_admin web6 4096 2009-12-23 00:30 2009
    drwxr-xr-x 3 web6_admin web6 4096 2010-01-02 00:30 2010
    -rw-r--r-- 1 web6_admin web6 759965 2010-01-11 08:54 error.log
    -r-------- 1 web6_admin web6 0 2009-12-22 23:11 .no_delete
    lrwxrwxrwx 1 web6_admin web6 44 2010-01-02 00:30 web.log -> /var/www/www.sitename2.net/log/2010/01/web.log
    [root@server1 log]# cd /var/www/web5/log/
    [root@server1 log]# ls -la
    total 272
    drwxr-xr-x 4 web5_info web5 4096 2010-01-02 00:30 .
    drwxr-xr-x 9 web5_info web5 4096 2010-01-06 18:19 ..
    drwxr-xr-x 3 web5_info web5 4096 2009-12-22 00:30 2009
    drwxr-xr-x 3 web5_info web5 4096 2010-01-02 00:30 2010
    -rw-r--r-- 1 web5_info web5 255592 2010-01-11 08:52 error.log
    -r-------- 1 web5_info web5 0 2009-12-21 22:18 .no_delete
    lrwxrwxrwx 1 web5_info web5 42 2010-01-02 00:30 web.log -> /var/www/www.sitename3.net/log/2010/01/web.log
     
  12. falko

    falko Super Moderator ISPConfig Developer

    What are the outputs of
    Code:
    ls -la/var/www/www.sitename1.com/log/2010/01/
    ls -la/var/www/www.sitename2.com/log/2010/01/
    ls -la/var/www/www.sitename3.com/log/2010/01/
    ?
     
  13. savago

    savago New Member


    total 6436
    drwxr-xr-x 2 web1_admin web1 4096 2010-01-02 00:30 .
    drwxr-xr-x 3 web1_admin web1 4096 2010-01-02 00:30 ..
    -rw-r--r-- 1 web1_admin web1 6577308 2010-01-12 00:30 web.log


    drwxr-xr-x 2 web5_info web5 4096 2010-01-02 00:30 .
    drwxr-xr-x 3 web5_info web5 4096 2010-01-02 00:30 ..
    -rw-r--r-- 1 web5_info web5 17609158 2010-01-12 00:30 web.log

    drwxr-xr-x 2 web6_admin web6 4096 2010-01-02 00:30 .
    drwxr-xr-x 3 web6_admin web6 4096 2010-01-02 00:30 ..
    -rw-r--r-- 1 web6_admin web6 1439360 2010-01-12 00:30 web.log
     
  14. falko

    falko Super Moderator ISPConfig Developer

    Looks ok. I have no idea what's going wrong... :confused:
     
  15. savago

    savago New Member

    Well

    After updating to 2.2.36 problems still exist:
    Code:
    /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php
    grep: /var/log/xferlog.0: No such file or directory
    
    Code:
    /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php
    grep: /var/log/maillog.0: No such file or directory
    /bin/awk
    /bin/awk
    /bin/awk
    /bin/awk
    /bin/awk
    
    And some news :
    Code:
    /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php
    
    Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125
    
    Warning: asort() expects parameter 1 to be array, null given in /root/ispconfig/scripts/shell/logs.php on line 172
    
    Warning: Invalid argument supplied for foreach() in /root/ispconfig/scripts/shell/logs.php on line 173
    
    
    Code:
    cd /var/log/httpd
    [root@server1 httpd]# ls 
    access_log                     ispconfig_access_log-20100221    ispconfig_access_log_2010_06_06  ispconfig_access_log_2010_06_27  ispconfig_access_log_2010_07_17  ispconfig_access_log_2010_08_04
    access_log-20100711            ispconfig_access_log-20100228    ispconfig_access_log_2010_06_07  ispconfig_access_log_2010_06_28  ispconfig_access_log_2010_07_18  ispconfig_access_log_2010_08_05
    access_log-20100718            ispconfig_access_log-20100307    ispconfig_access_log_2010_06_08  ispconfig_access_log_2010_06_29  ispconfig_access_log-20100718    ispconfig_access_log_2010_08_06
    access_log-20100725            ispconfig_access_log-20100314    ispconfig_access_log_2010_06_09  ispconfig_access_log_2010_06_30  ispconfig_access_log_2010_07_19  ispconfig_access_log_2010_08_07
    access_log-20100801            ispconfig_access_log-20100321    ispconfig_access_log_2010_06_10  ispconfig_access_log_2010_07_01  ispconfig_access_log_2010_07_20  ssl_access_log
    eaccelerator_log               ispconfig_access_log-20100328    ispconfig_access_log_2010_06_11  ispconfig_access_log_2010_07_02  ispconfig_access_log_2010_07_21  ssl_access_log-20100711
    error_log                      ispconfig_access_log-20100404    ispconfig_access_log_2010_06_12  ispconfig_access_log_2010_07_03  ispconfig_access_log_2010_07_22  ssl_access_log-20100718
    error_log-20100711             ispconfig_access_log-20100411    ispconfig_access_log_2010_06_13  ispconfig_access_log_2010_07_04  ispconfig_access_log_2010_07_23  ssl_access_log-20100725
    error_log-20100718             ispconfig_access_log-20100418    ispconfig_access_log_2010_06_14  ispconfig_access_log_2010_07_05  ispconfig_access_log_2010_07_24  ssl_access_log-20100805
    error_log-20100725             ispconfig_access_log-20100425    ispconfig_access_log_2010_06_15  ispconfig_access_log_2010_07_06  ispconfig_access_log_2010_07_25  ssl_error_log
    error_log-20100801             ispconfig_access_log-20100502    ispconfig_access_log_2010_06_16  ispconfig_access_log_2010_07_07  ispconfig_access_log-20100725    ssl_error_log-20100711
    ispconfig_access_log           ispconfig_access_log-20100509    ispconfig_access_log_2010_06_17  ispconfig_access_log_2010_07_08  ispconfig_access_log_2010_07_26  ssl_error_log-20100718
    ispconfig_access_log-20091220  ispconfig_access_log-20100516    ispconfig_access_log_2010_06_18  ispconfig_access_log_2010_07_09  ispconfig_access_log_2010_07_27  ssl_error_log-20100725
    ispconfig_access_log-20091227  ispconfig_access_log-20100523    ispconfig_access_log_2010_06_19  ispconfig_access_log_2010_07_10  ispconfig_access_log_2010_07_28  ssl_error_log-20100801
    ispconfig_access_log-20100103  ispconfig_access_log_2010_05_30  ispconfig_access_log_2010_06_20  ispconfig_access_log_2010_07_11  ispconfig_access_log_2010_07_29  ssl_request_log
    ispconfig_access_log-20100110  ispconfig_access_log_2010_05_31  ispconfig_access_log_2010_06_21  ispconfig_access_log-20100711    ispconfig_access_log_2010_07_30  ssl_request_log-20100711
    ispconfig_access_log-20100117  ispconfig_access_log_2010_06_01  ispconfig_access_log_2010_06_22  ispconfig_access_log_2010_07_12  ispconfig_access_log_2010_07_31  ssl_request_log-20100718
    ispconfig_access_log-20100124  ispconfig_access_log_2010_06_02  ispconfig_access_log_2010_06_23  ispconfig_access_log_2010_07_13  ispconfig_access_log_2010_08_01  ssl_request_log-20100725
    ispconfig_access_log-20100131  ispconfig_access_log_2010_06_03  ispconfig_access_log_2010_06_24  ispconfig_access_log_2010_07_14  ispconfig_access_log-20100801    ssl_request_log-20100805
    ispconfig_access_log-20100207  ispconfig_access_log_2010_06_04  ispconfig_access_log_2010_06_25  ispconfig_access_log_2010_07_15  ispconfig_access_log_2010_08_02
    ispconfig_access_log-20100214  ispconfig_access_log_2010_06_05  ispconfig_access_log_2010_06_26  ispconfig_access_log_2010_07_16  ispconfig_access_log_2010_08_03
    [root@server1 httpd]# 
    
    
    P.S
    Devels, ples. resolve this errors
     
  16. oriongr

    oriongr Member

    I have the same error when I run
    /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php
    Any ideas why?
     
  17. lizzarde

    lizzarde New Member

    I have the same problem as in previous two posts. The Webalizer gets stats OK but the ispconfig_acces_log files after that are not purged. After running through the code I found where may be the problem:

    line 165 in logs.php:
    Code:
    if (preg_match('/^'.basename($dir).'_/', $file)) {
    change to this code:
    Code:
    if (preg_match('/^ispconfig_access_log_/', $file)) {
    Now the script gets old logs filenames correctly and delete them.
     

Share This Page