Fixing 502 Server Errors in JetBackup & Gdrive Backups

In case your cPanel accounts are not getting backed up correctly using Google Drive as the destination through JetBackup, you may face the following problem. You may receive 502 errors from Google, which would include a message stating that the connection was blocked. The error message could look like this:

<title>Error 502 (Server Error)!!1</title>
Error 502 (Server Error) The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds. We're sorry...</h1><p>... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.

Please note that if you are backing up multiple servers to Google Drive destinations, the backups MUST be staggered to prevent throttling/rate-limiting errors like these.

To resolve this issue, please provide a screenshot of the Google "App" Console along with your assigned scopes. You can find this information in the Google Cloud console under "APIs and Services > OAuth Consent Screen": https://console.cloud.google.com/apis/credentials/consent?project=. You can view the Scopes by clicking "Edit App".

Additionally, please make sure that the "Google Drive API" is enabled for the "App." If the Google Drive API is not explicitly enabled, it can cause unusual problems with the backup. You can check this here: https://console.cloud.google.com/apis/library/drive.googleapis.com?project=. If the button shows as "Enable," click Enable and proceed through the prompts to ensure the Drive API is enabled.

You can find documentation on setting up a Google Drive destination [ Click here... ]

If you have followed all the instructions provided by JetBackup, and the problem persists, you need to go to the terminal and run the following command to download the hook for JetBackup. The hook will sleep every request for 2 minutes, which should solve the problem.

wget -q mirror.cpanelcentral.com/jetbackup-gdrive-sleep.sh -O /root/jb4-gdrive-sleep.sh
chmod +x /root/jb4-gdrive-sleep.sh

Now add the hook at JetBackup from WHM > Plugins > JetBackup > Hooks. Click on "Create new hook" and name everything as follows:

Save the changes and then go to the "Backup Jobs" section and start the backup. To check if it is working, go to the "Logs" section. This should resolve the issue.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix IP Missing issue on cPanel/WHM

We are here to help you with solving the problem of Missing IP Server in list accounts. The...

Domain names are not showing in WHM

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...

How to Start/Stop or Restart Apache server

Apache is the HTTP server that is freely available over the internet. It is a kind of software or...

How to install Attracta SEO Tools plugin

RequirementscPanel/WHM needs to be installed on your server. Step 1: SSH into your server and go...

How to Install CpCleaner in cPanel through SSH?

Installation Run the following shell commands as root via SSH: wget -O cpc-1.0.3.tar...