EDIT: Wow this was a fun one. Someone must have seriously botched an upgrade in the past, as the original server said it was 0.8.6h, but looking through the upgrade files in install/, it would appear that the version of the database was more like 0.8.6d. I went back and manually re-applied all of the schema changes from there, and made sure none of the following upgrades changed any of it.. hopefully I didn't miss anything and the next upgrade will go better. I would have some seriously harsh words for the previous maintainer of this Cacti installation if he still worked at the company (grr)
Anyway, sorry if you wasted your time looking in to this, thanks!
--------------------------------------------------
I recently inherited a Cacti installation and migrated it to a new server. Everything was working as expected after the move, poller was running properly, etc.
I upgraded to 0.8.7b, but when running through the upgrade process it failed running one of the ALTER TABLE commands (I don't remember which section it was exactly, I can run through this process again if necessary and give the full log)
So I tried to run the ALTER TABLE manually after the installation was complete.
mysql> ALTER TABLE `poller_item` ADD INDEX `rrd_next_step`(`rrd_next_step`);
ERROR 1072 (42000): Key column 'rrd_next_step' doesn't exist in table
And when I re-enabled my poller.php cron job, the logs were full of errors like this:
02/14/2008 10:35:01 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1054', SQL:"SELECT * FROM poller_item WHERE (host_id >= 184 AND host_id <= 192 AND rrd_next_step <= 0) ORDER by host_id"
02/14/2008 10:35:01 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1054', SQL:"SELECT count(*) FROM poller_item WHERE (action=2 AND host_id >= 184 AND host_id <= 192 AND rrd_next_step <= 0)"
02/14/2008 10:35:01 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"UPDATE poller_item SET rrd_next_step = rrd_next_step - 300 WHERE (host_id >= 184 AND host_id <= 192)'
02/14/2008 10:35:01 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"UPDATE poller_item SET rrd_next_step = rrd_step - 300 WHERE (rrd_next_step < 0 AND host_id >= 184 AND host_id <= 192)'
I tried reading through stickies and searching for errors similar to this but I couldn't find anything. Anyone have a clue as to what could have caused this? Could there have been something wrong with the previous Cacti installation and we just didn't notice?
Of course it would be preferable to me to be able to repair this somehow as opposed to starting over and running through the upgrade process again, as I have made a few changes since moving, but of course I am prepared to start over from scratch if that is what's necessary. Any advice would be welcome, thanks.
Oh, and if this helps:
mysql> describe poller_item;
+----------------------+-----------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------------+-----------------------+------+-----+---------+-------+
| local_data_id | mediumint(8) unsigned | | PRI | 0 | |
| poller_id | smallint(5) unsigned | | | 0 | |
| host_id | mediumint(8) | | MUL | 0 | |
| action | tinyint(2) unsigned | | MUL | 1 | |
| hostname | varchar(250) | | | | |
| snmp_community | varchar(100) | | | | |
| snmp_version | tinyint(1) unsigned | | | 0 | |
| snmp_username | varchar(50) | | | | |
| snmp_password | varchar(50) | | | | |
| snmp_auth_protocol | varchar(5) | YES | | | |
| snmp_priv_passphrase | varchar(200) | YES | | | |
| snmp_priv_protocol | varchar(6) | YES | | | |
| snmp_context | varchar(64) | YES | | | |
| snmp_port | mediumint(5) unsigned | | | 161 | |
| snmp_timeout | mediumint(8) unsigned | | | 0 | |
| rrd_name | varchar(19) | | PRI | | |
| rrd_path | varchar(255) | | | | |
| rrd_num | tinyint(2) unsigned | | | 0 | |
| arg1 | text | YES | | NULL | |
| arg2 | varchar(255) | YES | | NULL | |
| arg3 | varchar(255) | YES | | NULL | |
+----------------------+-----------------------+------+-----+---------+-------+
21 rows in set (0.00 sec)
mysql> select * from version;
+--------+
| cacti |
+--------+
| 0.8.7b |
+--------+
1 row in set (0.00 sec)
[SOLVED] Errors upgrading from 0.8.6h
Moderators: Developers, Moderators
-
- Posts: 2
- Joined: Thu Feb 14, 2008 1:42 pm
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
You're not aloneLinegod wrote:But that's me
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Who is online
Users browsing this forum: No registered users and 0 guests