• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Watchdog cron failed

Bart_NL

Basic Pleskian
TITLE:
Watchdog cron failed
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:
OS: CentOS Linux 7.4.1708 (Core)‬
Plesk: 17.8.6
Watchdog: 2.0-11
PROBLEM DESCRIPTION:
After update from 17.8.5 to 17.8.6, Cron Deamon send's error after running the 'pack-sysstats day' cron. The 'pack-sysstats week' cron gives the same error.​
STEPS TO REPRODUCE:
Login to plesk
Go to: Tools & Settings
Go to: Scheduled Tasks
Click 'Run Now' for the '/usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats day' or '/usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats week' task​
ACTUAL RESULT:
Code:
PHP Warning:  mktime() expects at most 6 parameters, 7 given in /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats on line 23 PHP Warning:  mktime() expects at most 6 parameters, 7 given in /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats on line 24
[2017-10-17 01:15:01] ERR [panel] Error occurred while processing database query: 'DB query failed: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB 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, query was: 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;':
0: /usr/local/psa/admin/plib/modules/watchdog/wdlib.php:1042
    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: /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats:67
    pack_statistics(integer '200', boolean false, boolean false)
2: /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats:48
ERROR: WDExc: Error occurred while processing database query: 'DB query failed: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB 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, query was: 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;' (wdlib.php:1042)
EXPECTED RESULT:
Cron succesfull​
ANY ADDITIONAL INFORMATION:
Thanks!
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:
Confirm bug
 
Can't reproduce it in my Plesk Onyx Version 17.8.7
Seems fixed in the update 7.
Have you tried to fix it with

# plesk repair db

?
 
Code:
#plesk repair db

Checking the Plesk database using the native database server tools .. [OK]

Checking the structure of the Plesk database ........................ [OK]

Checking the consistency of the Plesk database ...................... [OK]

Error messages: 0; Warnings: 0; Errors resolved: 0

No fix, I dont see a changelog voor update 7, not available yet?
 
Note, that 17.8 is Preview version, not stable. Just wait for update 7 and update this report if problem not fixed.
 
Back
Top