SOLVED CPANEL-36050 - Backblaze B2: Backup transport errors

phil99

Active Member
Jun 10, 2018
28
8
3
UK
cPanel Access Level
Root Administrator
We have occasional problems when uploading to Backblaze B2, with backups failing to upload.

There are errors in cpbackup_transporter.log like the following example (actual account name has been replaced with "accountx"):

Code:
[2021-02-23 05:03:19 +0000] info [cpbackup_transporter] Uploading account backup /backup_cpanel/2021-02-23/accounts/account1.tar.gz to backup_cpanel/2021-02-23/accounts/account1.tar.gz (from 2021-02-23/accounts/account1.tar.gz)
[2021-02-23 05:03:19 +0000] info [cpbackup_transporter] Attempting to upload /backup_cpanel/2021-02-23/accounts/account1.tar.gz to backup_cpanel/2021-02-23/accounts/account1.tar.gz for destination:  Backblaze B2
[2021-02-23 05:03:19 +0000] info [cpbackup_transporter] Upload attempt #1 starting for /backup_cpanel/2021-02-23/accounts/account1.tar.gz to backup_cpanel/2021-02-23/accounts/account1.tar.gz for destination:  Backblaze B2
[2021-02-23 05:03:19 +0000] warn [cpbackup_transporter] Upload attempt failed: Cpanel::Exception::HTTP::Network/(XID 4rn8t3) The system failed to send an <abbr title="Hypertext Transfer Protocol">HTTP</abbr> “GET” request to “https://api.backblazeb2.com/b2api/v1/b2_authorize_account” because of an error: CODE :500: MSG :500 Can't connect to api.backblazeb2.com:443 (Name or service not known): Can't connect to api.backblazeb2.com:443 (Name or service not known)

Name or service not known at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/LWP/Protocol/http.pm line 50.

at /usr/local/cpanel/Cpanel/Transport/Files/Backblaze.pm line 122.
    Cpanel::Transport::Files::Backblaze::_error(Cpanel::Transport::Files::Backblaze=HASH(0x37befe8), "HTTP::Network", HASH(0x31660e8)) called at /usr/local/cpanel/Cpanel/Transport/Files/Backblaze.pm line 272

[Lots more perl stuff snipped]
The backup software then immediately tries twice more:

Code:
[2021-02-23 05:03:19 +0000] info [cpbackup_transporter] Upload attempt #2 starting for /backup_cpanel/2021-02-23/accounts/account1.tar.gz to backup_cpanel/2021-02-23/accounts/account1.tar.gz for destination:  Backblaze B2
[2021-02-23 05:03:19 +0000] warn [cpbackup_transporter] Upload attempt failed: Cpanel::Exception::HTTP::Network/(XID 9ed6ug) The system failed to send an <abbr title="Hypertext Transfer Protocol">HTTP</abbr> “GET” request to “https://api.backblazeb2.com/b2api/v1/b2_authorize_account” because of an error: CODE :500: MSG :500 Can't connect to api.backblazeb2.com:443 (Name or service not known): Can't connect to api.backblazeb2.com:443 (Name or service not known)
...
[2021-02-23 05:03:19 +0000] info [cpbackup_transporter] Upload attempt #3 starting for /backup_cpanel/2021-02-23/accounts/account1.tar.gz to backup_cpanel/2021-02-23/accounts/account1.tar.gz for destination:  Backblaze B2
[2021-02-23 05:03:19 +0000] warn [cpbackup_transporter] Upload attempt failed: Cpanel::Exception::HTTP::Network/(XID 24zw5x) The system failed to send an <abbr title="Hypertext Transfer Protocol">HTTP</abbr> “GET” request to “https://api.backblazeb2.com/b2api/v1/b2_authorize_account” because of an error: CODE :500: MSG :500 Can't connect to api.backblazeb2.com:443 (Name or service not known): Can't connect to api.backblazeb2.com:443 (Name or service not known)
After failing for a third time, it gives up and immediately moves onto the next account:

Code:
[2021-02-23 05:03:19 +0000] info [cpbackup_transporter] Upload attempt #1 starting for /backup_cpanel/2021-02-23/accounts/account2.tar.gz to backup_cpanel/2021-02-23/accounts/account2.tar.gz for destination:  Backblaze B2
[2021-02-23 05:03:19 +0000] warn [cpbackup_transporter] Upload attempt failed: Cpanel::Exception::HTTP::Network/(XID amkjxg) The system failed to send an <abbr title="Hypertext Transfer Protocol">HTTP</abbr> “GET” request to “https://api.backblazeb2.com/b2api/v1/b2_authorize_account” because of an error: CODE :500: MSG :500 Can't connect to api.backblazeb2.com:443 (Name or service not known): Can't connect to api.backblazeb2.com:443 (Name or service not known)
This carries on with a number of accounts failing to upload until there is a successful upload attempt 3 seconds later:

Code:
[2021-02-23 05:03:22 +0000] info [cpbackup_transporter] Upload attempt #1 starting for /backup_cpanel/2021-02-23/accounts/account3.tar.gz to backup_cpanel/2021-02-23/accounts/account3.tar.gz for destination:  Backblaze B2
[2021-02-23 05:03:25 +0000] info [cpbackup_transporter] Successful transfer of /backup_cpanel/2021-02-23/accounts/account3.tar.gz to backup_cpanel/2021-02-23/accounts/account3.tar.gz for destination Backblaze B2
I'm assuming the "error: CODE :500" is the error code received from Backblaze. If so, then according to the Backblaze blog post below [1], an error code of 500 is to be expected. If the application receives an error 500 code, it should immediately try again after getting a new url. However, if it gets another 500 code, it should wait a few seconds before trying again. It would appear that the WHM backup software is not doing this. This has resulted in the failure to upload a number of accounts.

[1] Why You Are Getting a B2 503 or 500 Server Error and What to Do Next
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,509
567
273
cPanel Access Level
Root Administrator
Hey there! Thanks for bringing this to my attention. I've created case CPANEL-36050 to have our developer explore the possibility of introducing a delay in the Backblaze upload settings when an error is encountered. I'm following along with that case and I'll make sure to post an update here as soon as I hear something.