Statistics not compiling.

Discussion in 'Installation/Configuration' started by thevinster, Sep 14, 2005.

  1. nenad

    nenad Member

    server200:/var/www/web2# ls -lah /var/log/httpd
    total 14M
    drwxr-xr-x 2 root root 4.0K 2006-05-27 00:00 .
    drwxr-xr-x 10 root root 4.0K 2006-05-27 06:25 ..
    lrwxrwxrwx 1 root root 46 2006-05-27 00:00 ispconfig_access_log -> /var/log/httpd/ispconfig_access_log_2006_05_27
    -rw-r--r-- 1 root root 4.1K 2006-05-10 22:36 ispconfig_access_log_2006_05_10
    -rw-r--r-- 1 root root 1.8M 2006-05-11 23:59 ispconfig_access_log_2006_05_11
    -rw-r--r-- 1 root root 460K 2006-05-12 23:59 ispconfig_access_log_2006_05_12
    -rw-r--r-- 1 root root 401K 2006-05-13 23:59 ispconfig_access_log_2006_05_13
    -rw-r--r-- 1 root root 1001K 2006-05-14 23:59 ispconfig_access_log_2006_05_14
    -rw-r--r-- 1 root root 248K 2006-05-15 23:59 ispconfig_access_log_2006_05_15
    -rw-r--r-- 1 root root 427K 2006-05-16 23:59 ispconfig_access_log_2006_05_16
    -rw-r--r-- 1 root root 2.0M 2006-05-17 23:59 ispconfig_access_log_2006_05_17
    -rw-r--r-- 1 root root 1.8M 2006-05-18 23:59 ispconfig_access_log_2006_05_18
    -rw-r--r-- 1 root root 573K 2006-05-19 23:59 ispconfig_access_log_2006_05_19
    -rw-r--r-- 1 root root 650K 2006-05-20 23:59 ispconfig_access_log_2006_05_20
    -rw-r--r-- 1 root root 422K 2006-05-21 23:58 ispconfig_access_log_2006_05_21
    -rw-r--r-- 1 root root 380K 2006-05-22 23:59 ispconfig_access_log_2006_05_22
    -rw-r--r-- 1 root root 520K 2006-05-24 23:59 ispconfig_access_log_2006_05_24
    -rw-r--r-- 1 root root 444K 2006-05-25 23:59 ispconfig_access_log_2006_05_25
    -rw-r--r-- 1 root root 752K 2006-05-26 23:59 ispconfig_access_log_2006_05_26
    -rw-r--r-- 1 root root 1.4M 2006-05-27 16:30 ispconfig_access_log_2006_05_27
     
  2. nenad

    nenad Member

    server200:/var/www/web2# ls -lah /var/log/apache2
    total 808K
    drwxr-xr-x 2 root root 4.0K 2006-05-21 06:26 .
    drwxr-xr-x 10 root root 4.0K 2006-05-27 06:25 ..
    -rw-r----- 1 root adm 78 2006-05-25 20:21 access.log
    -rw-r----- 1 root adm 304 2006-05-21 01:50 access.log.1
    -rw-r----- 1 root adm 295 2006-05-21 06:26 access.log.2.gz
    -rw-r----- 1 root adm 393K 2006-05-27 16:22 error.log
    -rw-r----- 1 root adm 370K 2006-05-21 06:26 error.log.1
    -rw-r----- 1 root adm 9.9K 2006-05-21 06:26 error.log.2.gz
    server200:/var/www/web2#
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, this means the logs where written by apache but the ISPConfig logsplitting script is not run.

    Did you get any errors when you run the following command as root user on the shell:

    /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php
     
  4. nenad

    nenad Member

    /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php

    there are no errors at all ?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    How long has it take to run the file? Please check your syslog for cron errors that occur in the morning.
     
  6. nenad

    nenad Member

    It takes just a second. Where is exactly syslog filew where should I check for errors?

    server200:/var/www/web2# /var/log/syslog

    IW /var/log/syslog Row 1 Col 1 4:52 Ctrl-K H for help
    May 27 06:25:26 server200 syslogd 1.4.1#17: restart.
    May 27 06:25:29 server200 proftpd[3483]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
    May 27 06:25:29 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
    May 27 06:25:29 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
    May 27 06:26:29 server200 proftpd[3581]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
    May 27 06:26:34 server200 proftpd[3581]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
    May 27 06:26:34 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
    May 27 06:26:34 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
    May 27 06:27:34 server200 proftpd[3599]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
    May 27 06:27:39 server200 proftpd[3599]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
    May 27 06:27:40 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
    May 27 06:27:40 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
    May 27 06:28:40 server200 proftpd[3615]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
    May 27 06:28:45 server200 proftpd[3615]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
    May 27 06:28:45 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
    May 27 06:28:45 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
    May 27 06:29:45 server200 proftpd[3633]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
    May 27 06:29:50 server200 proftpd[3633]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
    May 27 06:29:50 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
    May 27 06:29:50 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
    May 27 06:30:02 server200 /USR/SBIN/CRON[3643]: (root) CMD ([ -x /etc/munin/plugins/apt ] && /etc/munin/plugins/apt update 7
    May 27 06:30:02 server200 /USR/SBIN/CRON[3644]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi)
    May 27 06:30:50 server200 proftpd[3878]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
    May 27 06:30:55 server200 proftpd[3878]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
    May 27 06:30:55 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
    May 27 06:30:55 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
    May 27 06:31:55 server200 proftpd[3896]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
    May 27 06:32:00 server200 proftpd[3896]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
    May 27 06:32:00 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
    May 27 06:32:00 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
    May 27 06:33:00 server200 proftpd[3912]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
    May 27 06:33:05 server200 proftpd[3912]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
    May 27 06:33:05 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
    May 27 06:33:05 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
    May 27 06:34:05 server200 proftpd[3930]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
    May 27 06:34:10 server200 proftpd[3930]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
    May 27 06:34:10 server200 postfix/smtpd[32478]: connect from localhost.localdomain[127.0.0.1]
    May 27 06:34:10 server200 postfix/smtpd[32478]: disconnect from localhost.localdomain[127.0.0.1]
    May 27 06:35:01 server200 /USR/SBIN/CRON[3946]: (root) CMD ([ -x /etc/munin/plugins/apt ] && /etc/munin/plugins/apt update 7
    May 27 06:35:01 server200 /USR/SBIN/CRON[3947]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi)
    May 27 06:35:10 server200 proftpd[4174]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session opened.
    May 27 06:35:15 server200 proftpd[4174]: localhost.localdomain (localhost.localdomain[127.0.0.1]) - FTP session closed.
     
    Last edited: May 27, 2006
  7. falko

    falko Super Moderator Howtoforge Staff

    Actually, the logging is working...
     
  8. nenad

    nenad Member

    ???

    Then what might be wrong? I didn't restarted server for 2 weeks.
    Maybie I should try that?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    The file /var/log/syslog is the correct file. You can try to find the errors by running

    cat /var/log/syslog | grep error
     
  10. nenad

    nenad Member

    server200:~# cat /var/log/syslog | grep error
    May 28 17:02:59 server200 postfix/smtp[7144]: 944A76C296: to=<[email protected]>, relay=none, delay=57, status=deferred (Host or domain name not found. Name service error for name=neobee.net type=MX: Host not found, try again)
    May 28 20:34:17 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:35:24 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:36:30 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:37:37 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:38:44 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:39:50 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:40:57 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:42:04 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:43:11 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:44:17 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:45:23 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:46:29 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:47:36 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:48:42 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:49:48 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:50:54 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:52:01 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:53:07 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:54:13 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:55:19 server200 monit[1659]: HTTP error: Server returned status 404
    May 28 20:56:26 server200 monit[1659]: HTTP error: Server returned status 404
    server200:~#

    (I temporararly disabled server200 throught ruter panel, that is why there is HTTP error)
     
  11. nenad

    nenad Member

    Is there something wrong within this crontab file?

    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,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
     
  12. falko

    falko Super Moderator Howtoforge Staff

    No, it's looking good. :)
     
  13. Mountainman

    Mountainman New Member

    Got a similar/same problem here...

    I installed ISPConfig on Debian Sarge according to the Perfect Setup Guide.

    When I want to view website statistics ( and yes the site has been visited...), I go to http://website.com/stats and log in with a correct Username / Pass. After I logged in I'm presented with a 403.

    When I look into the stats-dir, it appears to be empty ( together with it's web# directory ).

    I did a grep on cron-errors in /var/log/syslog and /var/log/messages, in syslog it says:

    Code:
    Jun  4 00:02:01 highmountain /USR/SBIN/CRON[9720]: (logcheck) CMD (   if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi)
    Jun  4 00:09:01 highmountain /USR/SBIN/CRON[10587]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Jun  4 00:17:01 highmountain /USR/SBIN/CRON[10706]: (root) CMD (   run-parts --report /etc/cron.hourly)
    Jun  4 00:39:01 highmountain /USR/SBIN/CRON[10999]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Jun  4 01:02:01 highmountain /USR/SBIN/CRON[11308]: (logcheck) CMD (   if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi)
    Jun  4 01:09:01 highmountain /USR/SBIN/CRON[12159]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    Jun  4 01:17:01 highmountain /USR/SBIN/CRON[12274]: (root) CMD (   run-parts --report /etc/cron.hourly)
    Jun  4 01:30:22 highmountain crontab[12466]: (root) BEGIN EDIT (root)
    Jun  4 01:31:03 highmountain crontab[12466]: (root) REPLACE (root)
    Jun  4 01:31:03 highmountain crontab[12466]: (root) END EDIT (root)
    
    The grep on /var/log/messages doesn't show anything.

    Then I did the /etc/init.d/cron stop and the pkill cron, crontab -e and a save of the crontab. After 24 hours stats still won't compile.

    When I do a :

    Code:
    /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php
    The shell doesn't give any feedback...
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    How long did you wait? It may take half an hour or longer, depending on the traffic of your sites. Did the cursor return?

    Please post the output of:

    ls -la /var/log/httpd
     
  15. falko

    falko Super Moderator Howtoforge Staff

    Is webalizer installed? What's the output of
    Code:
    which webalizer
    ?
     
  16. Mountainman

    Mountainman New Member

    @ Till:

    the cursor returned almost instantly

    ls -la /var/log/httpd:
    Code:
    
    total 9184
    drwxr-xr-x   2 root root    4096 2006-06-04 02:53 .
    drwxr-xr-x  13 root root    4096 2006-06-03 06:25 ..
    lrwxrwxrwx   1 root root      46 2006-06-04 02:53 ispconfig_access_log -> /var/l                                                 og/httpd/ispconfig_access_log_2006_06_04
    -rw-r--r--   1 root root    5269 2006-05-29 23:43 ispconfig_access_log_2006_05_2                                                 9
    -rw-r--r--   1 root root 1006171 2006-05-30 23:59 ispconfig_access_log_2006_05_3                                                 0
    -rw-r--r--   1 root root 2486815 2006-05-31 23:59 ispconfig_access_log_2006_05_3                                                 1
    -rw-r--r--   1 root root 3364061 2006-06-01 23:57 ispconfig_access_log_2006_06_0                                                 1
    -rw-r--r--   1 root root  940818 2006-06-02 23:19 ispconfig_access_log_2006_06_0                                                 2
    -rw-r--r--   1 root root  671685 2006-06-03 23:56 ispconfig_access_log_2006_06_0                                                 3
    -rw-r--r--   1 root root  883059 2006-06-04 20:26 ispconfig_access_log_2006_06_0                                                 4
    
    @Falko:

    yes I've got webalizer installed;

    which webalizer:
    Code:
    /usr/bin/webalizer
    
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run the script:

    /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php

    Did you get any errors? If not, run the webalizer script afterwards:

    /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php
     
  18. Mountainman

    Mountainman New Member

    Hi Till,

    I did get some errors :( :

    Code:
    Warning: include(/home/admispconfig/ispconfig/lib/config.inc.php): failed to open stream: Permission denied in /root/ispconfig/scripts/lib/config.inc.php on line 30
    
    Warning: include(): Failed opening '/home/admispconfig/ispconfig/lib/config.inc.php' for inclusion (include_path='.:') in /root/ispconfig/scripts/lib/config.inc.php on line 30
    Could not connect to MySQL server!
    
    What should i do?
     
  19. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /home/admispconfig/ispconfig/lib
    ?
     
  20. Mountainman

    Mountainman New Member

    Code:
    highmountain:/# ls -la /home/admispconfig/ispconfig/lib
    total 76
    drwxr-xr-x  6 admispconfig admispconfig  4096 2006-05-29 11:46 .
    drwxr-xr-x  8 admispconfig admispconfig  4096 2006-06-05 13:08 ..
    -rwxr-xr-x  1 admispconfig admispconfig  6340 2006-05-22 22:17 app.inc.php
    -rwxr-xr-x  1 admispconfig admispconfig  1768 2006-05-22 22:17 banner.inc.php
    drwxr-xr-x  2 admispconfig admispconfig  4096 2006-05-22 22:17 classes
    -rw-------  1 admispconfig admispconfig  6433 2006-05-29 11:46 config.inc.php
    -rwxr-xr-x  1 admispconfig admispconfig   354 2006-05-22 22:17 copyright.inc.php
    -rwxr-xr-x  1 admispconfig admispconfig  7502 2006-05-22 22:17 go_info.inc.php
    drwxr-xr-x  2 admispconfig admispconfig  4096 2006-05-22 22:17 help
    -rwxr-xr-x  1 admispconfig admispconfig   324 2006-05-22 22:17 index.php
    drwxr-xr-x  2 admispconfig admispconfig  4096 2006-05-22 22:17 lang
    drwxr-xr-x  2 admispconfig admispconfig  4096 2006-05-22 22:17 plugins
    -rwxr-xr-x  1 admispconfig admispconfig     5 2006-05-22 22:17 preload.inc.php
    -rwxr-xr-x  1 admispconfig admispconfig 11876 2006-05-22 22:17 session.inc.php
    
     

Share This Page