Pachube Keys

12 replies [Last post]
Alanmh
Offline
Reading, United Kingdom
Joined: 7 Jul 2010

I had a xap-livebox.ini corruption and had to reset everything.

It seems that Pachube have updated their keys model and I had to generate a new one.

The thing is - it doesnt seem to be pasting all of the key into the text box on the webgui - is the new key too long?

My key is now approx 128 characters long.

My feed 10591 is now frozen.

Is this a bug?

Alanmh
Offline
Reading, United Kingdom
Joined: 7 Jul 2010
log file

Though I would post the contents of /var/log/xap-pachube.log :

 

Pachube Connector for xAP v12

Copyright (C) DBzoo 2009-2010

 

[crt][main.c:134:getDynINI] INI file missing [pachube] section1=<value>

 

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Key Change

I think you are right, the existing key can be up to 65 characters long.  The HAH code will need changing to correct this.

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Manual Edit

You could try editing the ini file directly, just don't update pachube through the web gui after you do this.  From the web gui, fill in all the details, enter a dummy apikey, and save them, then edit the xap-livebox.ini file.  Find the [pachube] section, then replace the "dummy" apikey with your new apikey, the field name in the ini file is key.

I don't have access to my system at the moment, so I'm not sure if the web gui tries to check the apikey before saving it, it might, so the above might not work.

Alanmh
Offline
Reading, United Kingdom
Joined: 7 Jul 2010
already tried that

it didnt work. 

And Accessing the webgui after that wiped the xap-livebox.ini again, so I wont be doing that again in a hurry!

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
Yep, it's a buffer overflow. 

Yep, it's a buffer overflow.  The web gui loads the data, but it's too long to fit the variable, so it overwrites stuff and corrupts things.  I'm pretty sure it's a quick fix, and Brett is always keen to get stuff like this fixed asap.  I can test what I think the fix would be tonight, and see about getting that to you, but it wouldn't surprise me if Brett's fixed it before then.

I take it you've looked everywhere for your old key? 

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Not a buffer overflow just not enough of it.

I take it nobody is using the BACKUP/RESTORE facility I put in place to prevent your data from being lost?

The internal buffers where not large enought to cope with an unforseen and unscheduled change in PACHUBE's API key length, this is pretty shitty of them actually.   I've pushed up build 302 but I've not TESTED the increases I've made - I can no longer test anything (no livebox).

Hopefully I got them all.

Brett

Alanmh
Offline
Reading, United Kingdom
Joined: 7 Jul 2010
Thanks Brett but...

After upgrading, xfx viewer now reports that my livebox has an ip address of 192.168.1.1 (the same as my router).

I cant ssh to it or get to the webgui due to the conflict.

Alanmh
Offline
Reading, United Kingdom
Joined: 7 Jul 2010
Fixed the IP address

by rebooting while holiding down the 1 key.

g7pkf
Offline
United Kingdom
Joined: 11 Jan 2011
I do

And very handy it is as well.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Wierd

Very strange might have had something to do with your corrupt .ini file when you reflashed although I don't see how.  The default IP if setting up for a static network and and you are missing the IP address we use 192.168.1.50.  DHCP should not be handing out a duplicate IP either, esp not the routers IP.   If its is using the routers IP simple leave your livebox up, and cable direct to your PC and setup a small network so you can break back in and have a look.

In anycase I didn't change any code or logic around this area in this build.  Shrug.

- Brett

Alanmh
Offline
Reading, United Kingdom
Joined: 7 Jul 2010
Shrug indeed

Anyhoo - up and running now, not quite sorted Pachube, but its got a hearbeat (more than before)

 

And I have a backup of the config - I also found one from Nov 2010 that Pachube key doesnt seem to work now

Alanmh
Offline
Reading, United Kingdom
Joined: 7 Jul 2010
Thank You Brett

As usual - sterling service!

My feeds are now back online with the new Pachube Key on build 302.

I also have a more recent backup ;-)  TBH, I did have a more recent one, but I trashed it.

Alan

Hardware Info