Google Cloud Storage configuration?

I’m trying to configure Google Cloud Storage as a backup destination without any luck. The Test Connection option result in a timeout error.

If I go ahead and configure the backend and try running it I get this error in the logs in the WebUI:

System.Net.WebException: GetResponse timed out ---> System.Net.WebException: Aborted.
  at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) <0x40e83ab0 + 0x001a3> in <filename unknown>:0 
  at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.OnAsync (IAsyncResult r) <0x40e82f80 + 0x000eb> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Duplicati.Library.Main.BackendManager.List () <0x40ef9d80 + 0x0016b> in <filename unknown>:0 
  at Duplicati.Library.Main.Operation.FilelistProcessor.RemoteListAnalysis (Duplicati.Library.Main.BackendManager backend, Duplicati.Library.Main.Options options, Duplicati.Library.Main.Database.LocalDatabase database, IBackendWriter log, System.String protectedfile) <0x40ef6970 + 0x0015f> in <filename unknown>:0 
  at Duplicati.Library.Main.Operation.FilelistProcessor.VerifyRemoteList (Duplicati.Library.Main.BackendManager backend, Duplicati.Library.Main.Options options, Duplicati.Library.Main.Database.LocalDatabase database, IBackendWriter log, System.String protectedfile) <0x40ef2430 + 0x000cb> in <filename unknown>:0 
  at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify (Duplicati.Library.Main.BackendManager backend, System.String protectedfile) <0x40ef14a0 + 0x001af> in <filename unknown>:0 

Here is my config, I have a valid AuthID configured.

I’m running version 2.0.2.1_beta_2017-08-01 on a headless Ubuntu 16.04 server.

Not sure if this is related, but here is another current issue with Google:

Where can I find more logs or details on exactly what requests duplicati is making to GCS? It would be fairly easy to debug if I had that information.

Did you try searching the forum for log or log files?

Yes but all of those are windows paths. I’m running on Ubuntu.

I added --log-file=/var/log/duplicati/duplicati.log to DAEMON_OPTS in /etc/default/duplicati and restarted the service.

That created the log file, but nothing is getting written there.

Even weirder, now my Google Cloud Storage backup works. Apparently I needed to restart the service after configuring the destination?

That does sound really strange. The stack trace does not really explain which part of the code is currently running. If you get the problem again, try running something like:

nslookup duplicati-oauth-handler.appspot.com

This gives the IP of the server that handles the login, and you can try to ping it, to see if it responds to pings:

ping duplicati-oauth-handler.appspot.com
``

So finally circled back to this. I think the root cause was running an old version of mono (4.x) on Ubuntu 16.04 I updated to the latest version from the mono project repo and everything “just works”. It appears most of the problems were caused by the lack of a cert store in the 4.x mono install.

1 Like

Glad to hear it!

I hope you don’t mind but I went ahead and flagged your previous post as the solution in case others read this thread.

@kenkendk, would it make sense to include a mono version check as part of the backend manager error handler?

A warning in the UI or logs about being on an old mono version would be great!

While I agree that would be nice to have, it would require keeping up on mono versions to know if mono was “out of date”. I was thinking more along the lines of a warning if the mono version was older than the minimum version known to work well with Duplicati.

Of course I’m no Linux expert so it’s possible the issue is less mono version than the SSL certificates that come with the various versions…

Right, that is what I meant, just a “you’re on an unsupported version”.

I think it was an issue with how Mono 4.x resolved SSL certs. I updated the local cert store and verified it contained the right parent certs. I had found a bunch of posts across mono projects about versions before mono 5 having issues with SSL certs.

1 Like

Each version has quirks, but basically, Duplicati works with Mono as old as 3.0.

The problem is the SSL certificates are not updated, and they are not even updated in the new 5.x versions, but the tool cert-sync is run as part of the install/update. This is a bad fix, as it will eventually be out-of-sync with the OS cert store, and cause problems. (4.x uses Mozilla’s cert store, and needs the tool mozroots.exe to sync the Mono store).

I suspect that the Mono team tries to get it working for all distros and that is why they chose an external tool, instead of hooking directly into the cert store.

Anyway, there is a check that lists all Mono’s certificates, and if this is empty it will show a message suggesting to run cert-sync, but I guess it is not working as expected in al cases.

1 Like