Galen's picture

Backups (daily) worked fine for months, nothing changed and now 4 servers say when running tklbam-backup:

Traceback (most recent call last):
File "/usr/bin/tklbam-backup", line 266, in <module>
File "/usr/bin/tklbam-backup", line 195, in main
conf.profile = get_profile(hb)
File "/usr/bin/tklbam-backup", line 122, in get_profile
new_profile = hb.get_new_profile(turnkey_version, profile_timestamp)
File "/usr/lib/tklbam/", line 205, in get_new_profile
response = self._api('GET', 'archive/timestamp/', attrs)
File "/usr/lib/tklbam/", line 183, in _api
return API.request(method, self.API_URL + uri, attrs, headers)
File "/usr/lib/tklbam/", line 115, in request
File "/usr/lib/python2.6/dist-packages/", line 55, in get
return self._perform()
File "/usr/lib/python2.6/dist-packages/", line 40, in _perform
pycurl.error: (7, "couldn't connect to host")

No proxy, no firewall rule changes,...

Alon Swartz's picture

The Hub's frontend IP was changed a few days ago, so my guess is the DNS servers you are using have not updated their cache. In general, I recommend using Googles public DNS service:,

The new Hub's IP address is - you can use that to test your server is getting the correct IP. But do not hardcode that in your hosts file, that's what DNS is for:


I hope the above helps. If you still have issues please post back.

BTW, we took very careful care before the change to reduce the Hub records TTL to the minimum, wait over 24 hours for propagation to happen, and only then make the change.

Chris Partington's picture


I've entered the API key and when I click continue I get the following error:

Error: (7, "couldn't connect to host")

Any ideas? I presume it is nothing to do with the machine with the Turnkey installation on it as this was provided by Turnkey. Could it be something to do with a firewall? Do we need to open certain ports to enable the connection to work?

Thanks for any advice.

Jeremy Davis's picture

or something else to do with networking.

For starters I'd be testing that the TKL appliance can ping other machines and can also be pinged...

Chris Partington's picture

Will give it a test - thank you

Andy Stenger's picture

I had the same error (7, "couldn't connect to host") after configuring a second interface on my turnkey linux vm. I may have messed up the configuration through the frontend or the scripts generating the config add a default gateway on the second interface as well. This can be straightened out by editing /etc/network/interfaces as root. Here's an example configuration that uses the default route and gateway via eth0. Note that the first two lines indicating an automated setup have been deleted and that the second interface does not list neither a gateway nor DNS servers.

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

auto eth1
iface eth1 inet static
Reboot and check the routing table:
$ netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface   U         0 0          0 eth0   U         0 0          0 eth1         UG        0 0          0 eth0
Note that there is only a single '' destination. When you see two of these you are likely to have a problem. With the single default gateway tklbam worked as expected.

Add new comment