burnley
Regular Pleskian
Username: burnley
TITLE
wp-toolkit maintenance bug in 18.0.35 (regression?)
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Plesk Obsidian Version 18.0.35, last updated on April 22, 2021 09:58 PM
CentOS Linux 7.9.2009 (Core)
PROBLEM DESCRIPTION
Initially discussed here: Disable wp-cron
We started to see the problem after upgrading to 18.0.35. The client went into Plesk and ticked the "Disable wp-cron.php" option in the WP toolkit, which will in turn create a regular scheduled task instead. The problem is, there's some DB inconsistency or some other bug, because each time /usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php is executed, a new cron entry is generated for the corresponding Unix user, example:
23,53 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
17,47 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
0,30 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
14,44 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
21,51 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
4,34 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
25,55 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
22,52 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
1,31 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
18,48 * * * * /opt/remi/php74/root/usr/bin/php -f 'httpdocs/wp-cron.php'
24,54 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
5,35 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
29,59 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
6,36 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
26,56 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
Note "php -f 'httpdocs/wp-cron.php'" entry, looks broken to me.
And an entry in panel.log:
[2021-04-26 10:34:05.960] ERR [panel] Unable to find row with id 287 in ScheduledTasks table.
[2021-04-26 10:34:35.087] ERR [panel] PleskPermissionDeniedException: Permission denied.
file: /usr/local/psa/admin/application/smb/controllers/SchedulerController.php
line: 87
code: 0
trace: #0 /usr/local/psa/admin/plib/CommonPanel/Controller/Action/Scheduler/Trait.php(158): Smb_SchedulerController->_checkAccess(object of type Db_Table_Row_ScheduledTask)
#1 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Controller/Action.php(516): Smb_SchedulerController->editTaskAction()
#2 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(string 'editTaskAction')
#3 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(object of type Zend_Controller_Request_Http, object of type Zend_Controller_Response_Http)
#4 /usr/local/psa/admin/plib/Application/Web.php(49): Zend_Controller_Front->dispatch(object of type Zend_Controller_Request_Http)
#5 /usr/local/psa/admin/htdocs/application.php(15): Plesk\Application_Web->run()
Also, why are there 2 cron entries for the same maintenance script? One for root, the other one for psaadm user:
[...]
Apr 26 08:40:01 host01 CROND[4525]: (psaadm) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 08:40:01 host01 CROND[4551]: (root) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 09:40:01 host01 CROND[17143]: (root) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 09:40:01 host01 CROND[17152]: (psaadm) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 10:40:01 host01 CROND[5374]: (root) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 10:40:01 host01 CROND[5404]: (psaadm) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
STEPS TO REPRODUCE
Disable the wp-cron.php script in the WP-toolkit for a WP instance
ACTUAL RESULT
wp-toolkit/scripts/maintenance.php keeps updating the crontab of the affected Unix user
EXPECTED RESULT
wp-toolkit/scripts/maintenance.php should only add one wp-scon.php entry for the affected WP instance to /var/spool/cron/affecteduser
ANY ADDITIONAL INFORMATION
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug
TITLE
wp-toolkit maintenance bug in 18.0.35 (regression?)
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Plesk Obsidian Version 18.0.35, last updated on April 22, 2021 09:58 PM
CentOS Linux 7.9.2009 (Core)
PROBLEM DESCRIPTION
Initially discussed here: Disable wp-cron
We started to see the problem after upgrading to 18.0.35. The client went into Plesk and ticked the "Disable wp-cron.php" option in the WP toolkit, which will in turn create a regular scheduled task instead. The problem is, there's some DB inconsistency or some other bug, because each time /usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php is executed, a new cron entry is generated for the corresponding Unix user, example:
23,53 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
17,47 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
0,30 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
14,44 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
21,51 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
4,34 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
25,55 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
22,52 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
1,31 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
18,48 * * * * /opt/remi/php74/root/usr/bin/php -f 'httpdocs/wp-cron.php'
24,54 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
5,35 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
29,59 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
6,36 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
26,56 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
Note "php -f 'httpdocs/wp-cron.php'" entry, looks broken to me.
And an entry in panel.log:
[2021-04-26 10:34:05.960] ERR [panel] Unable to find row with id 287 in ScheduledTasks table.
[2021-04-26 10:34:35.087] ERR [panel] PleskPermissionDeniedException: Permission denied.
file: /usr/local/psa/admin/application/smb/controllers/SchedulerController.php
line: 87
code: 0
trace: #0 /usr/local/psa/admin/plib/CommonPanel/Controller/Action/Scheduler/Trait.php(158): Smb_SchedulerController->_checkAccess(object of type Db_Table_Row_ScheduledTask)
#1 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Controller/Action.php(516): Smb_SchedulerController->editTaskAction()
#2 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(string 'editTaskAction')
#3 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(object of type Zend_Controller_Request_Http, object of type Zend_Controller_Response_Http)
#4 /usr/local/psa/admin/plib/Application/Web.php(49): Zend_Controller_Front->dispatch(object of type Zend_Controller_Request_Http)
#5 /usr/local/psa/admin/htdocs/application.php(15): Plesk\Application_Web->run()
Also, why are there 2 cron entries for the same maintenance script? One for root, the other one for psaadm user:
[...]
Apr 26 08:40:01 host01 CROND[4525]: (psaadm) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 08:40:01 host01 CROND[4551]: (root) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 09:40:01 host01 CROND[17143]: (root) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 09:40:01 host01 CROND[17152]: (psaadm) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 10:40:01 host01 CROND[5374]: (root) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 10:40:01 host01 CROND[5404]: (psaadm) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
STEPS TO REPRODUCE
Disable the wp-cron.php script in the WP-toolkit for a WP instance
ACTUAL RESULT
wp-toolkit/scripts/maintenance.php keeps updating the crontab of the affected Unix user
EXPECTED RESULT
wp-toolkit/scripts/maintenance.php should only add one wp-scon.php entry for the affected WP instance to /var/spool/cron/affecteduser
ANY ADDITIONAL INFORMATION
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug