UpdraftPlus Home › Forums › Paid support forum – UpdraftPlus backup plugin › Waiting until scheduled time to retry because of errors
- This topic has 14 replies, 3 voices, and was last updated 7 months, 2 weeks ago by Vanessa.
-
AuthorPosts
-
March 19, 2024 at 11:48 am #2076860Oliver ChurchParticipant
SFTP / SCP: upload: attempt: backup_2024-03-19-1133_site_name_b3ccd20b2132-db.gz
0496.636 (2) PHP Fatal error (Error) has occurred during backup uploads to the sftp. Error Message: Undefined constant “NET_SCP_LOCAL_FILE” (Code: 0, line 245 in /var/www/wordpressroot/wp-content/plugins/updraftplus/addons/sftp.php)
0496.646 (2) An error condition has occurred for the first time during this job
0496.652 (2) Resume backup (b3ccd20b2132, 2): finish run
0496.671 (2) [Info] Lock option (updraft_lock_b3ccd20b2132, wp_options) released
0496.680 (2) There were errors in the uploads, so the ‘resume’ event is remaining scheduled
0496.691 (2) No email will/can be sent – the user has not configured an email address.
0496.701 (2) The backup has not finished; a resumption is scheduledNote: i replaced the site name to keep privacy but all other details are correct.
Please explain what the fix is for this issue, I did apt get upgrade which should already have updated PHP FPM so it’s probably an issue with the plugin itself. It’s definitely an issue with PHP as there’s an undefined constant error but I am unsure if this is because I need to manually ‘upgrade’ Updraftplus from this website, or just update PHP.
I just checked though and the version of Updraft I have is actually newer than one I download here, 2.24.1.26 is what I have and 2.24.1.0 I think is the version I can download from this site.
March 19, 2024 at 11:48 am #2076861Oliver ChurchParticipantThis reply has been marked as moderator-only.March 19, 2024 at 2:48 pm #2076999Bryle CroduaModeratorHi,
To help us work out the cause of your problem, can you please send us a copy of the full backup log?
This can be found in the UpdraftPlus Existing Backups tab. The contents will be too long to post here directly, but you can use an online service such as Dropbox or Pastebin, and post the link here.Kind Regards,
BryleMarch 20, 2024 at 8:15 am #2077677Oliver ChurchParticipantHere is the Pastebin. Thanks for your consideration Bryle.
March 20, 2024 at 8:26 am #2077682Oliver ChurchParticipantthe admin deployment that we use for the backend I realized probably had too low limits e.g. 2gb requests 4gb hard limit. I am going to double these limits and see if it helps. But it seems like the NET_SCP_LOCAL_FILE undefined error is some kind of bug, but there’s a very small chance that it’s all related to cron jobs not running efficiently. I have to disable WP_CRON via the wp-config file because otherwise the site runs slow but I can run cron jobs manually via other ways e.g. launching wp-cron.php directly on a schedule.
March 20, 2024 at 8:28 am #2077683Oliver ChurchParticipantDefinitely a resource constrain issue as Prometheus showed me that admin deployment was using 4GB, which is already the limit. So this might help but may not fix the issue so you might notice a solution from the log.
March 20, 2024 at 8:40 am #2077691Oliver ChurchParticipantIncreasing resource limits did not solve the issue I just did that test.
March 20, 2024 at 9:16 am #2077717Oliver ChurchParticipantCan You Omit the Third Parameter?
If you’re considering omitting the third parameter (NET_SCP_LOCAL_FILE or correctly NET_SFTP_LOCAL_FILE), it’s important to understand the default behavior of the put method. By default, if the mode is not specified, phpseclib assumes the data to upload is provided directly as a string (i.e., NET_SFTP_STRING mode). This means that if you omit the third parameter when intending to upload a file from the filesystem, the method will not behave as expected, as it will treat the second parameter as the content to upload rather than a file path.Therefore, if your intention is to upload a file from the local filesystem, you should not omit this parameter. Instead, ensure it’s correctly specified as NET_SFTP_LOCAL_FILE to indicate that the source is a local file. This will ensure the put method reads the file from your server’s filesystem and uploads it to the specified path on the remote SFTP server.
Would changing it to NET_SFTP_LOCAL_FILE be a good solution? I will try.
March 20, 2024 at 8:49 pm #2078245VanessaModeratorHi Oliver,
The issue looks to be that your subscription has expired therefore you don’t have the relevant entitlements.
Once you have renewed and your licences are updated, the issue should resolve.March 21, 2024 at 1:46 pm #2078915Oliver ChurchParticipantVanessa this issue has been going on for longer than 24 hours, at least a few days.
But I took your word for it and renewed my license and the issue still exists. Do I need to completely reinstall the plugin at this point?
March 21, 2024 at 1:50 pm #2078920Oliver ChurchParticipant// SCP
$rfile = empty($this->path) ? $file : trailingslashit($this->path).$file;
if ($sftp->put($rfile, $updraft_dir.’/’.$file, NET_SCP_LOCAL_FILE, array($this, ‘sftp_progress_callback’))) {
$updraftplus->uploaded_file($file);
} else {
$any_failures = true;
$this->log(‘ERROR: SCP: Failed to upload file: ‘.$file);
$this->log(sprintf(__(‘%s Error: Failed to upload’, ‘updraftplus’), ‘SCP’).”: $file”, ‘error’);
}This is the block in question.
Anyway I changed to SFTP and it works so it must just be a bug in your code. Anyway I don’t have any issue with renewing the plugin, as I am happy to support your plugin and I think it is powerful and useful, just happy the issue is resolved now.
March 21, 2024 at 1:51 pm #2078926Oliver ChurchParticipantphpseclib_Net_SFTP::SOURCE_LOCAL_FILE
Since this is the ‘working’ code for SCP you might want to find something similar in the phpseclib for SCP such as phpseclib_Net_SCP::SOURCE_LOCAL_FILE
But from my research it seems the phpseclib was updated and your older coder no longer compatible for SCP requests.
March 22, 2024 at 7:16 pm #2080198VanessaModeratorHi Oliver,
I checked your licences and everything looks up to date. There is no need to reinstall the plugin.
Is it just since the latest version that you have started having this issue or did it start before then.March 25, 2024 at 4:23 am #2082381Oliver ChurchParticipantI guess latest version as I always keep plugins up to date.
But no big deal as I switched to SFTP and works fine, just SCP that isn’t working. Sorry I meant to say “Since this is the ‘working’ code for SFTP”
So in the code, it looks like the developer updated the parameter for SFTP to be compatible with the latest phpseclib version but did not update SCP. I’m guessing less people use SCP, I used it for a long time but I can see why SFTP is probably a better choice.
Looks like SCP and SFTP are both protocols that connect over the SSH protocol, so they are kind of like a protocol encapsulated over another (in this case SSH).
But it seems SFTP has more functionality and SCP is slightly faster. I would guess SCP was already there but then SFTP was invented later to be an improvement though both have their own advantages, maybe SCP is easier for command line operations as it’s simpler. Both have replaced the original protocols of FTP and FTPS which have not been considered secure enough for many years.
Sorry for the boring history lesson lol.
March 25, 2024 at 10:04 pm #2083116VanessaModeratorHi Oliver,
On the contrary, it’s all very interesting. I will create a ticket for it (I realise your issue has resolved) but just in case it affects other users
-
AuthorPosts
- The topic ‘Waiting until scheduled time to retry because of errors’ is closed to new replies.