• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • 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.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

error in watchdog / cron modules since 1st january

GuillaumeH

Basic Pleskian
Hi,

since the 1st january I get the following errors for some cron jobs:

Cron <root@server2> /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats day

ERROR: WDExc
Error occurred while processing database query: 'MySQL query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by service_id, type, round(unix_timestamp(time) / 200, 0) having count(val' at line 3'

0: wdlib.php:1088
wd__db_query(string 'select service_id, type, unix_timestamp(min(time)) as min_time, unix_timestamp(max(time)) as max_time, avg(value) as avg
from module_watchdog_sys_stat where
group by service_id, type, round(unix_timestamp(time) / 200, 0) having count(value) > 1 limit 10000;')
1: pack-sysstats:63
pack_statistics(integer '200', boolean false, boolean false)
2: pack-sysstats:44


Cron <root@server2> /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats year

ERROR: WDExc
Error occurred while processing database query: 'MySQL query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by service_id, type, round(unix_timestamp(time) / 64800, 0) having count(v' at line 3'

0: wdlib.php:1088
wd__db_query(string 'select service_id, type, unix_timestamp(min(time)) as min_time, unix_timestamp(max(time)) as max_time, avg(value) as avg
from module_watchdog_sys_stat where
group by service_id, type, round(unix_timestamp(time) / 64800, 0) having count(value) > 1 limit 10000;')
1: pack-sysstats:63
pack_statistics(integer '64800', boolean false, boolean false)
2: pack-sysstats:44

Cron <root@server2> /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats month

ERROR: WDExc
Error occurred while processing database query: 'MySQL query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by service_id, type, round(unix_timestamp(time) / 7200, 0) having count(va' at line 3'

0: wdlib.php:1088
wd__db_query(string 'select service_id, type, unix_timestamp(min(time)) as min_time, unix_timestamp(max(time)) as max_time, avg(value) as avg
from module_watchdog_sys_stat where
group by service_id, type, round(unix_timestamp(time) / 7200, 0) having count(value) > 1 limit 10000;')
1: pack-sysstats:63
pack_statistics(integer '7200', boolean false, boolean false)
2: pack-sysstats:44
 
same Problem on Debian 5.0.7, Plesk 9.5.3 :

ERROR: WDExc
Error occurred while processing database query: 'MySQL query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by service_id, type, round(unix_timestamp(time) / 64800, 0) having count(v' at line 3'

0: wdlib.php:1088
wd__db_query(string 'select service_id, type, unix_timestamp(min(time)) as min_time, unix_timestamp(max(time)) as max_time, avg(value) as avg
from module_watchdog_sys_stat where
group by service_id, type, round(unix_timestamp(time) / 64800, 0) having count(value) > 1 limit 10000;')
1: pack-sysstats:63
pack_statistics(integer '64800', boolean false, boolean false)
2: pack-sysstats:44

ERROR: WDExc
Error occurred while processing database query: 'MySQL query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by service_id, type, round(unix_timestamp(time) / 7200, 0) having count(va' at line 3'

0: wdlib.php:1088
wd__db_query(string 'select service_id, type, unix_timestamp(min(time)) as min_time, unix_timestamp(max(time)) as max_time, avg(value) as avg
from module_watchdog_sys_stat where
group by service_id, type, round(unix_timestamp(time) / 7200, 0) having count(value) > 1 limit 10000;')
1: pack-sysstats:63
pack_statistics(integer '7200', boolean false, boolean false)
2: pack-sysstats:44

ERROR: WDExc
Error occurred while processing database query: 'MySQL query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by service_id, type, round(unix_timestamp(time) / 200, 0) having count(val' at line 3'

0: wdlib.php:1088
wd__db_query(string 'select service_id, type, unix_timestamp(min(time)) as min_time, unix_timestamp(max(time)) as max_time, avg(value) as avg
from module_watchdog_sys_stat where
group by service_id, type, round(unix_timestamp(time) / 200, 0) having count(value) > 1 limit 10000;')
1: pack-sysstats:63
pack_statistics(integer '200', boolean false, boolean false)
2: pack-sysstats:44
 
We solved the problem with these queries:

ALTER TABLE module_watchdog_report MODIFY time timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;

ALTER TABLE module_watchdog_sys_stat MODIFY time timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;
 
Hi Marco,

could you please elaborate on where to execute those queries?

Christian
 
Dear Marco,

I first made a backup of those 2 tables and successfully applied the queries (it said that a many rows were changed).

Unfortunately this didn't fix anything for me. When I manually execute "/opt/psa/libexec/modules/watchdog/cp/pack-sysstats year", I still get the error from post 1.

When I examined my backup tables, I found that the "time" field already had all the attributes that were set by the queries. I'm on Plesk 9.5.1 btw...

Christian
 
Last edited by a moderator:
Same problem here....

Plesk 10.0.1 CentOS 5.4.

Any news from Parallels about this issue?

PFM
 
We solved the problem with these queries:

ALTER TABLE module_watchdog_report MODIFY time timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;

ALTER TABLE module_watchdog_sys_stat MODIFY time timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;

does not work for Plesk 9.5.3 - tables already have these structures...
 
Response from SWSoft (via Reseller)

We contacted our hosting reseller (Peer1) to escalate the issue with SWSoft. Here is the response we received:

According to Parallels this is a known issue and they are planning on fixing the issue during the next Plesk update. Unfortunately they did not provide a time frame for the next update.

They did provide the following workaround:

---
As a workaround you can just comment out corresponding lines in cron jobs configuration, so no error notifications will be sent to you.

You should comment all pack-sysstats* lines, and in the end get this:

cat /var/spool/cron/root
1,16,31,46 * * * * /usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1
0 1 * * 1 /usr/local/psa/libexec/modules/watchdog/cp/secur-check
0 1 * * 1 /usr/local/psa/libexec/modules/watchdog/cp/send-report weekly
10 1 * * * /usr/local/psa/libexec/modules/watchdog/cp/clean-sysstats
#15 1 * * * /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats day
#15 1 * * 1 /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats week
#15 1 1 * * /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats month
#15 1 1 * * /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats year
20 1 * * * /usr/local/psa/libexec/modules/watchdog/cp/clean-events
0 3 * * 7 /usr/local/psa/libexec/modules/watchdog/cp/clean-reports
 
Back
Top