Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Unable to recalculate Plesk AWStats and rotate its log file: your log file must have a bad format or LogFormat parameter setup does not match this format

 
2021cpudatabasehttphttps

Symptoms

  • Unable to recalculate Awstats statistics in Plesk:

    # plesk sbin statistics --calculate-one --domain-name=example.com
    Webstat: awstats
    Executing awstats...
    Execution of /var/www/cgi-bin/awstats/awstats.pl -update -configdir=/usr/local/psa/etc/awstats -config=example.com-https -LogFile=/var/www/vhosts/system/example.com/logs/access_ssl_log.webstat failed with return code 1.
    Stdout is
    Create/Update database for config "/usr/local/psa/etc/awstats/awstats.example.com-https.conf" by AWStats version 7.4 (build 20150714)
    From data in log file "/var/www/vhosts/system/example.com/logs/access_ssl_log.webstat"...
    Phase 1 : First bypass old records, searching new record...
    Direct access to last remembered record has fallen on another record.
    So searching new records from beginning of log file...
    AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
    Your log file /var/www/vhosts/system/example.com/logs/access_ssl_log.webstat must have a bad format or LogFormat parameter setup does not match this format.
    Your AWStats LogFormat parameter is:
    1
    This means each line in your web server log file need to have "combined log format" like this:
    203.0.113.1 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"
    And this is an example of records AWStats found in your log file (the record number 50 in your log):
    203.0.113.2 - - [28/Oct/2017:09:10:31 +0900] "x15x03x00x00x02x01x00" 400 166 "-" "-"
    Setup ('/usr/local/psa/etc/awstats/awstats.example.com-https.conf' file, web server or permissions) may be wrong.
    Check config file, permissions and AWStats documentation (in 'docs' directory).

  • Theaccess_ssl_log.webstat log file is not rotated. As a result, Awstats webstat page shows 0 values (statistics is empty), while in fact domain's access_log contains entries.
  • Process "AWStats" uses 100% CPU and does not terminate.

Cause

Product issue:

  • #PPPM-9832 "If web statistics are not generated properly, customers can now understand why because AWStats errors are now logged and customers can see them in the panel.log file (if the show.util_exec_io setting is set to true in the panel.ini file)."
    Fixed in:

    • Plesk Obsidian 26 January 2021 (Linux)

Resolution

Please consider updating your server:

  • How to install Plesk updates

Workaround

If update is not possible for some reason you may try the following

workaround

  1. Connect to the server via SSH
  2. Open the file from the error message (/var/www/vhosts/system/example.com/logs/access_ssl_log.webstat) in any text editor, and remove incorrectly formatted lines like:

    203.0.113.2 - - [28/Oct/2017:09:10:31 +0900] "x15x03x00x00x02x01x00" 400 166 "-" "-"

    The correct format would be:

    203.0.113.1 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"

  3. Recalculate statistics again:

    # plesk sbin statistics --calculate-one --domain-name=example.com

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Plesk with Centralized Database and Network File System

Read More »

HTTP Response Status Codes Explained

Read More »

3 Things to Monitor in your WordPress Site

Read More »
Knowledge Base

The database list in Plesk is displayed incorrectly when logged in as customer

Read More »

Plesk and websites are inaccessible after updating Plesk to Obsidian 18.0.43 on RHEL 8-based OS: DB query failed: SQLSTATE[HY000] [2002] No such file or directory

Read More »

Incorrect record for the ‘postmaster’ mailbox exists in /var/spool/postfix/plesk/virtual database

Read More »

[BUG] Unable to start or restart Apache after uninstalling Roundcube in Plesk: Could not open configuration file roundcube.htaccess.inc No such file or directory

Read More »

Hosting Wiki

  • Server Redundancy
  • Linux Containers
  • Bare Metal Server
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • HTTP/3
  • HTTP/2
  • Plesk
  • SQL database
  • NoSQL Database
  • Lighttpd
  • Web Server
  • DNS Server
  • SSH
  • HTTP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family