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>
main()
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/hub.py", line 205, in get_new_profile
response = self._api('GET', 'archive/timestamp/', attrs)
File "/usr/lib/tklbam/hub.py", line 183, in _api
return API.request(method, self.API_URL + uri, attrs, headers)
File "/usr/lib/tklbam/hub.py", line 115, in request
func(attrs)
File "/usr/lib/python2.6/dist-packages/pycurl_wrapper.py", line 55, in get
return self._perform()
File "/usr/lib/python2.6/dist-packages/pycurl_wrapper.py", line 40, in _perform
self.c.perform()
pycurl.error: (7, "couldn't connect to host")

No proxy, no firewall rule changes,...

Forum: 
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: 8.8.8.8, 8.8.4.4

The new Hub's IP address is 23.21.244.168 - 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:

ping hub.turnkeylinux.org

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

Hi

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
    address 10.1.1.100
    netmask 255.255.255.0
    gateway 10.1.1.1
    dns-nameservers 10.1.1.2 10.1.1.3

auto eth1
iface eth1 inet static
    address 10.1.2.100
    netmask 255.255.255.0
Reboot and check the routing table:
$ netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.1.1.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
10.1.2.0        0.0.0.0         255.255.255.0   U         0 0          0 eth1
0.0.0.0         10.1.1.1        0.0.0.0         UG        0 0          0 eth0
Note that there is only a single '0.0.0.0' 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