Mark's picture

Hi again,

Created a new server from a snapshot of an existing (thanks for the quick fix!), but have now hit another problem.  I haven't changed anything on the new server, no apt-get anything, and now receive a nasty error (provided below) when trying to initiate a backup.  Any ideas for this one?

Thanks in advance,

Mark

>tklbam-backup

Traceback (most recent call last): 
File "/usr/bin/tklbam-backup", line 366, in <module> 
main() 
File "/usr/bin/tklbam-backup", line 286, in main 
get_server_id()) 
File "/usr/lib/tklbam/hub.py", line 227, in new_backup_record 
response = self._api('POST', 'record/create/', 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 127, in request 
raise Error(c.response_code, name, description) 
hub.Error: (500, 'Piston/0.2.3rc1 (Django 1.4) crash report', '\n\nTraceback (most recent call last):\n\n File "/usr/local/lib/python2.6/dist-packages/newrelic-1.6.0.13-py2.6-linux-i686.egg/newrelic/hooks/component_piston.py", line 33, in __call__\n return self._nr_wrapped(*args, **kwargs)\n\n File "/volatile/hub/apps/backup/api/handlers.py", line 139, in _inner\n return func(self, request, **kwargs)\n\n File "/volatile/hub/apps/backup/api/handlers.py", line 110, in wrapper\n return func(self, request, **kwargs)\n\n File "/volatile/hub/apps/backup/api/handlers.py", line 264, in create\n backuprecord.is_key_encrypted(), extra={\'email\': self.user.email})\n\n File "/volatile/hub/apps/backup/models.py", line 71, in is_key_encrypted\n keypacket.parse(self.key, "")\n\n File "/volatile/hub/apps/backup/keypacket.py", line 75, in parse\n version, khr, kcr = struct.unpack("!BHH", packet[:5])\n\nerror: unpack requires a string argument of length 5\n') 

Forum: 
Tags: 
Alon Swartz's picture

I've been looking into the issue, and from what I can find TKLBAM is sending the Hub a null encryption key, which should never happened. My guess is that something happened when TKLBAM was initialized, resulting in a null key.

I'll try and replicate the issue, but in the meantime I'd suggest re-initializing TKLBAM and performing a new backup:

rm -rf /var/lib/tklbam
tklbam-init APIKEY
tklbam-backup

Let me know if this solves the problem.

Mark's picture

So, I was able to get the backup working using a combination of tklbam-init --force and an apt-get update/upgrade.  I'm fairly sure the apt-get upgrade made the problem worse, as I started having errors thrown about python's path module right after.  After modifying the script to load the python2.6 path (actual path not module ala sys.path.insert), all is well.  

The only other issue is currently the hub reports that the server is "Installing security updates", and has stated that since a few seconds after the clone. This message has survived several reboots also.  The server is performing very well otherwise, and I'm very happy with it overall.

Thanks for all the help,

Mark


Mark's picture

The server is still "Installing security updates"... in addition the backup page has listed this for several weeks...

Oops! Something unexpected happened

 

The error has been logged, and we will look into what caused it as soon as possible, and issue a fix.

 

Ugh.


Add new comment