Support

Akeeba Backup for Joomla!

#38168 CLI Scheduled Task full backup fails

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by nicholas on Monday, 12 December 2022 09:35 CST

lucidfox

I set up Scheduled Tasks for backups on my client site, triggered by cron. The incremental backup profile works beautifully, but the full backup fails every time with "exit code 4".

In the back end, it appears it ran twice (see attached screenshots in next comment) and (both?) backups appear as successful despite the failure email. This is not always the case, sometimes they show as failed in the back end too but Alice finds no problems.

You can see the log file of the most recent backup that gave the exit code 4 here: https://www.icloud.com/iclouddrive/053HAlJrtA0gQ9A26hKfG18ow#Akeeba_Backup_Debug_Log 

This happens on multiple sites.

EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 10MiB, please upload it on your server and post a link to it.


 
 

lucidfox

HAHAHAHAHA I pressed enter when I meant to tab. I will edit to add actual information.


 
 

lucidfox

Attachments here. Sorry. 🫠 


 
 

nicholas
Akeeba Staff
Manager

I cannot reproduce this and there is also something odd about this.

Exist status 4 is an internal error in Joomla, not a problem with the task plugin (our code). You can see it's defined in Joomla itself https://github.com/joomla/joomla-cms/blob/f520c98c64efb538e70e918acffb60d07e4d6b1e/administrator/components/com_scheduler/src/Task/Status.php#L64

The only place where this error is thrown is again in Joomla itself: https://github.com/joomla/joomla-cms/blob/ce3d724d633473c4c514f7d20be46c9617165f59/administrator/components/com_scheduler/src/Task/Task.php#L270

At this point our task has successfully executed (part of a) backup and Joomla has resumed control. Joomla then tries to release all the "locked" tasks using an update query. If that query fails for any reason Joomla will NOT log the reason the query failed (making it impossible to debug the problem…) and return false from \Joomla\Component\Scheduler\Administrator\Task\Task::releaseLock which triggers the status 4 failure for the task even though the task had nothing to do with the problem.

This is ultimately a problem in \Joomla\Component\Scheduler\Administrator\Task\Task::releaseLock which should log the query failure reason in line 400, before returning false. Since it logs nothing I can't tell you why Joomla fails to release the lock on the tasks it has locked by itself. It could be a broken table, it could be a table schema in need of an update, it could be something else database related. Without a logged error my guess is as good as anyone else's.

Please ask Benjamin to add logging there so we can troubleshoot this kind of issue.

 

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!