Waiting until scheduled time to retry because of errors

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 9 months ago by Vanessa.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #2076860
    Oliver Church
    Participant

    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 scheduled

    Note: 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.

    #2076861
    Oliver Church
    Participant
    This reply has been marked as moderator-only.
    #2076999
    Bryle Crodua
    Moderator

    Hi,

    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,
    Bryle

    #2077677
    Oliver Church
    Participant

    https://pastebin.com/bHQ01tZ4

    Here is the Pastebin. Thanks for your consideration Bryle.

    #2077682
    Oliver Church
    Participant

    the 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.

    #2077683
    Oliver Church
    Participant

    Definitely 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.

    #2077691
    Oliver Church
    Participant

    Increasing resource limits did not solve the issue I just did that test.

    #2077717
    Oliver Church
    Participant

    Can 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.

    #2078245
    Vanessa
    Moderator

    Hi 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.

    #2078915
    Oliver Church
    Participant

    Vanessa 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?

    #2078920
    Oliver Church
    Participant

    // 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.

    #2078926
    Oliver Church
    Participant

    phpseclib_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.

    #2080198
    Vanessa
    Moderator

    Hi 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.

    #2082381
    Oliver Church
    Participant

    I 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.

    #2083116
    Vanessa
    Moderator

    Hi 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

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Waiting until scheduled time to retry because of errors’ is closed to new replies.