Auto-update through proxy server

Hi,

In our environnment we cannot directly connect to the internet. All internet connections must go through a proxy server.
How can we specify to UrBackup server to get updates through a proxy server ?
Tried to set the http_proxy env variable in /etc/profile but i didn’t work as expected :

2016-04-21 11:54:11: ERROR: Error while downloading version info from http://update3.urbackup.org/version.txt: Couldn't resolve host name(ec=6), Could not resolve host: update3.urbackup.org
2016-04-21 11:54:20: ERROR: Error downloading server version information: Couldn't resolve host name(ec=6), Could not resolve host: update3.urbackup.org

UrBackup Server 2.0.12 on Debian 8 with BTRFS storage

Thanks.

Well you don’t have a proxy problem…
You have a DNS problem…
The server can’t even resolve the ip address it should connect to…

Hi tarakesh and thanks for your response !

Sure because DNS requests should be proxified as well !
Our internal DNS resolve only internal addresses, this is a wanted design. If a client want to access the web, the proxy is mandatory. We have no problems with wget for example, if we specify the proxy in wgetrc of course.

Regards

It is not set from environement correctly. Will be fixed.

Okay thank you !

another small problem, i tried to set up the client autoupdate manually but there is a signature mismatch.
Here what i did :

  • Download manually files into /var/urbackup :
cd /var/urbackup
wget http://update3.urbackup.org/version.txt
wget http://update3.urbackup.org/UrBackupUpdate.exe
wget http://update3.urbackup.org/UrBackupUpdate.sig
chown urbackup.urbackup version.txt UrBackupUpdate.exe UrBackupUpdate.sig
  • And then activate “Autoupdate clients” in GUI

In the server’s log we now have multiple entries :

2016-04-21 13:10:44: ERROR: Error opening sigfile
2016-04-21 13:10:44: ERROR: Error opening sigfile
2016-04-21 13:10:44: ERROR: Error opening sigfile
2016-04-21 13:10:44: ERROR: Error opening sigfile
2016-04-21 13:10:44: ERROR: Error opening sigfile
2016-04-21 13:10:44: ERROR: Error opening sigfile
2016-04-21 13:10:45: ERROR: Error opening sigfile
2016-04-21 13:10:45: ERROR: Error opening sigfile
2016-04-21 13:10:45: ERROR: Error opening sigfile
2016-04-21 13:10:45: ERROR: Error opening sigfile
2016-04-21 13:10:45: ERROR: Error opening sigfile
2016-04-21 13:10:45: ERROR: Error opening sigfile
  • When creating a new internet client, if we click on the link to download the autoinstaller :

2016-04-22 11:38:59: ERROR: Exception occured in CryptoFactory::verifyFile: FileStore: error opening file for reading: urbackup/UrBackupUpdate.sig2 2016-04-22 11:38:59: ERROR: Signature verification failed

Any ideas / how to fix ?

Thanks

Make that wget http://update3.urbackup.org/UrBackupUpdate.sig2. UrBackupUpdate.sig is for upgrading 1.x clients to 2.x.

Yeah it rocks :sunglasses:

Thank you very much !

Hi

I’ve purchased a CBT licence this afternoon to make some tests before buying more licences.
Since the autoupdate still doesn’t work correctly behind a proxy server (even with the env http_proxy=http://myproxy.mydomain:8080, dns doesn’t resolve through proxy), i was updating the client manually from the server through a script and wget with /etc/wgetrc configured to use proxy :

#/bin/bash

cd /var/urbackup/
rm version.txt UrBackupUpdate.exe UrBackupUpdate.sig UrBackupUpdate.sig2 UrBackupUpdateLinux.sh UrBackupUpdateLinux.sig2

wget http://update3.urbackup.org/version.txt
wget http://update3.urbackup.org/UrBackupUpdate.exe
wget http://update3.urbackup.org/UrBackupUpdate.sig
wget http://update3.urbackup.org/UrBackupUpdate.sig2
wget http://update3.urbackup.org/UrBackupUpdateLinux.sh
wget http://update3.urbackup.org/UrBackupUpdateLinux.sig2
chown urbackup.urbackup version.txt UrBackupUpdate.exe UrBackupUpdate.sig UrBackupUpdate.sig2 UrBackupUpdateLinux.sh UrBackupUpdateLinux.sig2

Since we go to CBT, i put the server_update_location.url in /var/urbackup and add two entries in the /etc/host file in order to make the client auto-update working :

107.170.103.177    cbt.urbackup.com
80.237.132.195    update3.urbackup.org

Client update and sig files are correctly downloaded in /var/urbackup, clients have been updated but there is still an error in urbackup.log :

ERROR: Error downloading server version information: HTTP response code said error(ec=22), The requested URL returned error: 404 Not Found

Should i safely ignore this message ? Does the urbackup server need an internet access to work with CBT clients ?

Thanks.

Regards,

Yes, that is only for the “New server update available” messages on the status page, which I am currently not updating for 2.0.x.

UrBackup uses curl to download the files, so if it works with curl --proxy xyz http://update3.urbackup.org/UrBackupUpdate.exe -O it should work with export http_proxy=xyz; urbackupsrv run. What kind of proxy are you using?

It’s a Squid 3 proxy
curl was not installed on the server, maybe this should be installed as dependency…
I’ve installed it, it works with command line, i’ll test removing urbackup entries in hosts file and see if auto-updates works as expected.

Regards,

Still have the same problem :disappointed: :

2016-06-09 13:38:56: ERROR: Error while downloading version info from http://cbt.urbackup.com/autoupdate/<myguid>/version.txt: Couldn't resolve host name(ec=6), Could not resolve host: cbt.urbackup.com

I set the proxy by adding :

export http_proxy=http://myproxy.mydomain.local:8080/

at the end of /etc/profile file.

Through root SSH session to the server it seems to be well configured:

root@urbackup:~# env
...
http_proxy=http://myproxy.mydomain.local:8080/
...

As i say in my precedent post, it’s working fine with curl in CLI …

Regards

I tested it and it seems to work. Maybe the environment variable is not set when it is started?

I have added a HTTP_PROXY variable to the command line config file (-c option /etc/default/urbackupsrv on Debian) to override/set the proxy in the latest version.

Awesome !
It’s now working fine with setting the HTTP_PROXY=“http://myproxy.mydomain.local:8080/” line in file /etc/defaut/urbackupsrv

Many thanks for fix this !

Hi,
Still not working with proxy authentication.
curl --proxy is OK.
Setting HTTP_PROXY with “http://user:pass@proxy:port” in /etc/defaut/urbackupsrv is not enough…

Christophe.