Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support
It is currently Tue Oct 21, 2014 10:06 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: spine rev 5705 "Table 'cacti.host' doesn't exist"
PostPosted: Mon Mar 22, 2010 4:43 am 
Offline
User avatar

Joined: Mon Mar 22, 2010 4:27 am
Posts: 1
Location: CZ
Hi there,

Seems host was renamed to device, but still referenced as host in two lines of spine.c
Following diff shows and fixes it

Code:
ruff@toolbox ~/spine $ svn diff spine.c
Index: spine.c
===================================================================
--- spine.c     (revision 5705)
+++ spine.c     (working copy)
@@ -463,9 +463,9 @@

        /* obtain the list of hosts to poll */
        if (set.device_threads_exists) {
-               qp += sprintf(qp, "SELECT id, device_threads FROM host");
+               qp += sprintf(qp, "SELECT id, device_threads FROM device");
        }else{
-               qp += sprintf(qp, "SELECT id, '1' as device_threads FROM host");
+               qp += sprintf(qp, "SELECT id, '1' as device_threads FROM device");
        }
        qp += sprintf(qp, " WHERE disabled=''");
        if (!strlen(set.device_id_list)) {


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 22, 2010 4:55 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
Thanks. Fixed.

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 09, 2010 5:30 pm 
Offline

Joined: Sun May 09, 2010 5:22 pm
Posts: 4
Is this problem still existing in the current 0.8.7f svn checkout?
I just upgraded my cacti installation and db to the current 0.8.7 from svn, then compiled spine, but it always gives me errors upon execution.
Code:
Message:'Unknown column 'host_id

or
Code:
table .host doesn't exist


Are there any other patches to spine.c?


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 09, 2010 6:40 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
You checked out main I would think.

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 09, 2010 6:41 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
You have to be at 0.8.7f of cacti to run the current spine. It is not compatible with earlier versions of Cacti.

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 09, 2010 7:32 pm 
Offline

Joined: Sun May 09, 2010 5:22 pm
Posts: 4
after my upgrade to ubuntu 10.04 cacti gave me ugly errors due to some changes in php5:
Code:
Deprecated: Function ereg_replace() is deprecated

I checked out the complete svn
Code:
svn checkout svn://svn.cacti.net/cacti .

then I compiled spine from branches/0.8.7 which is 0.87f.
and copied the contents of cacti/branches/0.8.7 to my webserver dir. it's also 0.87f.
cacti updates my database to the new version and everything looks fine, but the freshly compiled spine can't seem to work with it, because spine.c still contains references to the .host table and cacti changed the.host table to the .device table during the upgrade of the database.
everything else looks fine.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 09, 2010 7:49 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
devices table is main and is 088, which is quite a bit out yet. It's not even alpha yet.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 10, 2010 5:03 am 
Offline

Joined: Sun May 09, 2010 5:22 pm
Posts: 4
Thanks for the information.
I experimented with 0.8.8 before but it didnt work. So I reverted to 0.8.7 and chose 'new install' from database installation options. But this didnt drop the existing tables. And therefore the database was messed up. I manually deleted the tables and imported cacti.sql.
Now it works fine.

Thanks for the help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group