• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

stats not running

Amin Taheri

Golden Pleskian
Plesk Certified Professional
Hello,

When trying to run stats for a user I get a mysql error - same error occurs if I do not specify to calculate one and try and do them all.

Additionally the users access_log is quite big, and despite log rotate settings for the domain to be set to daily, it hasnt been rotated since May and running logrotate manually didnt do anything.


# admin/sbin/statistics --calculate-one --domain-name=domain.com
statistics: Mysql server has gone away. Trying to reconnect
statistics: Mysql server has gone away. Trying to reconnect
statistics: Unable to connect to Plesk Database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
System error 111: Connection refused
statistics: Unable to connect to Plesk Database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
System error 111: Connection refused
statistics: Unable to reconnect to the mysql database

System error 111: Connection refused
statistics: Unable to reconnect to the mysql database

System error 111: Connection refused

I saw this in the log files
# tail -n15 /var/log/mysqld.log
100729 10:39:39 InnoDB: Started; log sequence number 0 630732307
100729 10:39:39 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
100729 10:39:39 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50022, now running 50148. Please use mysql_upgrade to fix this error.
100729 10:39:39 [ERROR] mysql.user has no `Event_priv` column at position 29
100729 10:39:39 [ERROR] Cannot open mysql.event
100729 10:39:39 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
100729 10:39:39 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.48' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
100802 11:02:36 [Note] /usr/libexec/mysqld: Normal shutdown

100802 11:02:38 InnoDB: Starting shutdown...
100802 11:02:39 InnoDB: Shutdown completed; log sequence number 0 636646999
100802 11:02:39 [Note] /usr/libexec/mysqld: Shutdown complete

100802 11:02:39 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

So I ran the mysql upgrader manually
mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow `

And that seemed to solve the problem - it appears now that stats are able to run with out causing the mysql error.

Hope this helps some one.
 
Back
Top