Google Drive 401 errors on Comcast only?

OK. Here’s a weird one: I have five different drives backing up on Duplicati (as five separate database definitions) to a Google Drive (different subdirectories). I took my laptop for on a week-long trip, so I was only backing up the local (OSX) hard drive, although I let the Duplicati weekly schedule of backups run as usual. When I got back, and reconnected the external (USB) drives, the internal hard drive and two of the external drive backups kept failing with “401” errors, while the other two worked fine.

To make this weirder: I have VPN software on my laptop (Avast). Without the VPN, I go through Comcast/Xfinity to Google Drive, and get “401” errors on the three drive backups. When I enable the VPN, the “401” errors go away.

Note that all of these backups have been running successfully for several years. Also, I’ve recreated the “credentials” for the failing backups with no effect.

Since I have the VPN workaround, I’m think I may be able to back up all of my drives, but does anyone have insight as to why I can back up through VPN on all of my drives, but only some without VPN?

Thanks… Steve

BT broadband using google drive was a DNS problem where local DNS was bad. There might be some other explanations on the Internet. I found the one above from looking at summaries from Google search.

Of course, your situation is odder than that because it varies with drives, I suppose you could look at the About → Show log → Live → Retry logs to see what’s up. You can click on an error to see some details.

number-of-retries defaults to 5, and you won’t see the Duplicati error until those are used up, but the logs show retries, and in the job log’s Complete log you can see RetryAttempts to see how flaky things got.

Thanks for getting back to me.

Yes, I saw the 5 retries for each backup error, always “401”. I suspect that Comcast has a bad DNS. They’ve had some recent service issues on the network, including “502” errors (bad gateway) which may be related. I can’t explain why some backups succeeded and others failed, but it isn’t costing me anything to leave the VPN running, so I’ll stick with that for now, and test again in a month or so. Troubleshooting with Comcast and Google is way more effort than I’m ready to expend now.

Thank you again… Steve

Hello again. I’m still seeing “401” (unauthorized) errors trying to use Duplicati with Google Drive, but only on three out of my five backups.

I can get around this by running the failing backups through a VPN, but that reduced my network speed for all activities to 1/10th of what I’m paying for from Comcast.

I’ve recreated the Duplicati authorization strings without VPN, and each reported a successful connection. I’m stumped! I see the “401” failure for each transaction with the Google Drive, even with 5 retries, but only on these three backups, and I’m running the latest “canary” Duplicati.

Help?

Might need to debug the code on this one either Duplicati or their special web tool. Its possible they have a situation not coded for or even a library update is needed or a library update caused it.

But, it would have to be from you or someone else with the exact same problem. I don’t know if anyone else can do it unless its reproducible. Since you’re probably not a programmer, it might go unsolved for a long while.

I don’t think it has to do only with one internet provider though. I would expect you’re using the internet provider at some point to connect through the VPN unless you’re using mobile data to do it. Internet has to be connected at some point.

Its possibly something stupid and silly and maybe even a real pain to track down (many hours).

Although I’m basically stumped why Google is doing that, would it be worth trying a DNS provider change?

How to change IPv4 DNS server address to public DNS in Windows?

It’s possible (after its setup) to examine unencrypted network tracing for additional clues, but per example, there might not be any new information that the 401 Invalid Credentials doesn’t already imply in that status.

How long did it stay working? If there’s a problem with an OAuth access token, the good one might not last long. One report (from 2012) said 1 hour. Duplicati is supposed to refresh as needed, from a refresh token.

There have been some other reports of weirdness in Google’s authentication, but I can’t recall any recently.

Are all five using the same AuthID? If using different AuthID, is there any relationship to success or failure?

I ran a traceroute both with and without the VPN, and got different addresses for drive.google.com. So I added the address I got from the VPN trace to /etc/hosts and reran the backup without VPN, but I still got the 401 errors (I then reran the backups with VPN and they worked fine). Also, I retried both traceroutes and got a different set of IP addresses this time for drive.google.com (no surprise as they probably do load leveling). I don’t know whether OSX or duplicati use the current /etc/hosts (without a reboot), but it looks like this isn’t a DNS issue to me. Thanks for the suggestions tho. …Steve

Heavily editied for clarifications

I know with my own Drive application code (in my own application that uses it) that I can go between multiple connections and internet providers without any issue at all. Been doing that for years now,

If it used to connect then I don’t think its a normal system problem (in reference to /etc/hosts). It would have to be something that changed and broke it without going through a VPN.

I’m sure if I used it that it would connect without a VPN. That’s normal so the application wouldn’t be at fault there. It can only do what its given and what its given must be correct or issues happen.

Who knows I’m just throwing a bunch more ideas. Maybe it will spark something. I don’t use VPN’s so not familiar with how Duplicati code handles the difference. If its just a connection and Dupilcati sees basically the same thing then it shouldn’t really be Duplicati at fault unless it did something or something else happened at some point such as with the token or something else like I mention above. They do it differently than I would do it.

For all I know like I said in my 1st post that it could simply be something that the devs never have happen in their development and tests and Duplicati doesn’t know what else to do.

Okay, I’m tentatively closing this because I may have stumbled on the cause: I was using the Avast “Anti-track” app, which I discovered seemed to be causing unrelated “502” errors in my browser. After disabling the Avast app, both my 502 and Duplicati 401 errors have stopped.

My guess is that the VPN bypassed the “Anti-track” intercept of web traffic, which is why it prevented the 401 errors.

Thank you to all who of you who posted possible solutions… Steve

2 Likes