Update to 0.8.8 is not working
Moderators: Developers, Moderators
Update to 0.8.8 is not working
Hi everyone,
We're using Cacti for monitoring our networks, and we recently wanted to update to the 0.8.8 version.
I've made all the steps required (on the manual) and the last time (update to 0.8.7i) it worked.
But now, when I enter in my browser http://<IP>/cacti
I have the redirection to ==> <IP>/install that appears, and firefox send me a "broken link" error message.
Any ideas ?
(PS : sorry for english mistakes, I'm french )
We're using Cacti for monitoring our networks, and we recently wanted to update to the 0.8.8 version.
I've made all the steps required (on the manual) and the last time (update to 0.8.7i) it worked.
But now, when I enter in my browser http://<IP>/cacti
I have the redirection to ==> <IP>/install that appears, and firefox send me a "broken link" error message.
Any ideas ?
(PS : sorry for english mistakes, I'm french )
Re: Update to 0.8.8 is not working
maybe you can try to edit:
and unmark this line:
Code: Select all
include/config.php
Code: Select all
$url_path = "/cacti/";
Re: Update to 0.8.8 is not working
It worked, thanks
However, during the update of the database, I've benn warned about one query that didn't worked (something with "poller" ??)
Should I be worried ?
However, during the update of the database, I've benn warned about one query that didn't worked (something with "poller" ??)
Should I be worried ?
Re: Update to 0.8.8 is not working
I got that same error about the poller. Actually error is:
Would sure like to know if that is benign or not.
Code: Select all
[Fail] ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE
Re: Update to 0.8.8 is not working
Code: Select all
[Fail] ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE
Re: Update to 0.8.8 is not working
I would say that you can just comment out that line of code. Here is why:
First, not sure why they added "USING BTREE" to the command, as that is the default anyway.
mysql> SHOW INDEX FROM cacti.host\G
*************************** 1. row ***************************
Table: host
Non_unique: 0
Key_name: PRIMARY
Seq_in_index: 1
Column_name: id
Collation: A
Cardinality: 1
Sub_part: NULL
Packed: NULL
Null:
Index_type: BTREE
Comment:
*************************** 2. row ***************************
Table: host
Non_unique: 1
Key_name: disabled
Seq_in_index: 1
Column_name: disabled
Collation: A
Cardinality: 1
Sub_part: NULL
Packed: NULL
Null: YES
Index_type: BTREE
Comment:
2 rows in set (0.00 sec)
Second, if you issue the command at the mysql> prompt you get a better error message:
mysql> ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE;
ERROR 1068 (42000): Multiple primary key defined
Third, as you can see, those columns are already primary keys, so you wouldn't be changing anything anyway:
mysql> describe poller_output;
+---------------+-----------------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-----------------------+------+-----+---------------------+-------+
| local_data_id | mediumint(8) unsigned | NO | PRI | 0 | |
| rrd_name | varchar(19) | NO | PRI | | |
| time | datetime | NO | PRI | 0000-00-00 00:00:00 | |
| output | text | NO | | NULL | |
+---------------+-----------------------+------+-----+---------------------+-------+
4 rows in set (0.00 sec)
mysql>
Lastly, you would have to drop and add the primary keys; you can not alter them. The correct command syntax would be as follows:
ALTER TABLE `poller_output`
DROP PRIMARY KEY,
ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`);
As you can see, that works:
mysql> ALTER TABLE `poller_output`
-> DROP PRIMARY KEY,
-> ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`);
Query OK, 0 rows affected (0.06 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql>
Hope this helps.
-chadd.
First, not sure why they added "USING BTREE" to the command, as that is the default anyway.
mysql> SHOW INDEX FROM cacti.host\G
*************************** 1. row ***************************
Table: host
Non_unique: 0
Key_name: PRIMARY
Seq_in_index: 1
Column_name: id
Collation: A
Cardinality: 1
Sub_part: NULL
Packed: NULL
Null:
Index_type: BTREE
Comment:
*************************** 2. row ***************************
Table: host
Non_unique: 1
Key_name: disabled
Seq_in_index: 1
Column_name: disabled
Collation: A
Cardinality: 1
Sub_part: NULL
Packed: NULL
Null: YES
Index_type: BTREE
Comment:
2 rows in set (0.00 sec)
Second, if you issue the command at the mysql> prompt you get a better error message:
mysql> ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE;
ERROR 1068 (42000): Multiple primary key defined
Third, as you can see, those columns are already primary keys, so you wouldn't be changing anything anyway:
mysql> describe poller_output;
+---------------+-----------------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-----------------------+------+-----+---------------------+-------+
| local_data_id | mediumint(8) unsigned | NO | PRI | 0 | |
| rrd_name | varchar(19) | NO | PRI | | |
| time | datetime | NO | PRI | 0000-00-00 00:00:00 | |
| output | text | NO | | NULL | |
+---------------+-----------------------+------+-----+---------------------+-------+
4 rows in set (0.00 sec)
mysql>
Lastly, you would have to drop and add the primary keys; you can not alter them. The correct command syntax would be as follows:
ALTER TABLE `poller_output`
DROP PRIMARY KEY,
ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`);
As you can see, that works:
mysql> ALTER TABLE `poller_output`
-> DROP PRIMARY KEY,
-> ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`);
Query OK, 0 rows affected (0.06 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql>
Hope this helps.
-chadd.
Re: Update to 0.8.8 is not working
Hi chadd
Thank you for the helpful reply.
Before:
After:
Hopefully this is now all OK. Thanks again.
Thank you for the helpful reply.
Actually, I get a syntax error. Since you indicated that "USING BTREE" was the default, I thought I would try without that suffix and the command now works.Second, if you issue the command at the mysql> prompt you get a better error message:
mysql> ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE;
ERROR 1068 (42000): Multiple primary key defined
Code: Select all
ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`);
Code: Select all
describe poller_output;
+---------------+-----------------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-----------------------+------+-----+---------------------+-------+
| local_data_id | mediumint(8) unsigned | NO | | 0 | |
| rrd_name | varchar(19) | NO | | | |
| time | datetime | NO | | 0000-00-00 00:00:00 | |
| output | text | NO | | | |
+---------------+-----------------------+------+-----+---------------------+-------+
4 rows in set (0.00 sec)
Code: Select all
describe poller_output;
+---------------+-----------------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-----------------------+------+-----+---------------------+-------+
| local_data_id | mediumint(8) unsigned | NO | PRI | 0 | |
| rrd_name | varchar(19) | NO | PRI | | |
| time | datetime | NO | PRI | 0000-00-00 00:00:00 | |
| output | text | NO | | | |
+---------------+-----------------------+------+-----+---------------------+-------+
4 rows in set (0.00 sec)
Re: Update to 0.8.8 is not working
No problem. You should be fine.MikeMcr wrote:Hi chadd
Thank you for the helpful reply.
Actually, I get a syntax error. Since you indicated that "USING BTREE" was the default, I thought I would try without that suffix and the command now works.Second, if you issue the command at the mysql> prompt you get a better error message:
mysql> ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE;
ERROR 1068 (42000): Multiple primary key defined
Before:Code: Select all
ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`);
After:Code: Select all
describe poller_output; +---------------+-----------------------+------+-----+---------------------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+-----------------------+------+-----+---------------------+-------+ | local_data_id | mediumint(8) unsigned | NO | | 0 | | | rrd_name | varchar(19) | NO | | | | | time | datetime | NO | | 0000-00-00 00:00:00 | | | output | text | NO | | | | +---------------+-----------------------+------+-----+---------------------+-------+ 4 rows in set (0.00 sec)
Hopefully this is now all OK. Thanks again.Code: Select all
describe poller_output; +---------------+-----------------------+------+-----+---------------------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+-----------------------+------+-----+---------------------+-------+ | local_data_id | mediumint(8) unsigned | NO | PRI | 0 | | | rrd_name | varchar(19) | NO | PRI | | | | time | datetime | NO | PRI | 0000-00-00 00:00:00 | | | output | text | NO | | | | +---------------+-----------------------+------+-----+---------------------+-------+ 4 rows in set (0.00 sec)
If you want to confirm you are using BTREE data structure, just do this:
SHOW INDEX FROM cacti.poller_output\G
Also, I'd be curious to know what version of MySQL you are running, and on what OS? And, was this a new install, or an upgrade?
-chadd.
Re: Update to 0.8.8 is not working
Yes, SHOW INDEX indicates BTREE is already being used. Strange that it doesn't like the "USING BTREE" command. It was an upgrade. I am running this on a ReadyNAS Pro (Linux) and the MySQL version is:chadd wrote:No problem. You should be fine.
If you want to confirm you are using BTREE data structure, just do this:
SHOW INDEX FROM cacti.poller_output\G
Also, I'd be curious to know what version of MySQL you are running, and on what OS? And, was this a new install, or an upgrade?
-chadd.
Code: Select all
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 328
Server version: 5.0.32-Debian_7etch5 Debian etch distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> STATUS
--------------
mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2
Re: Update to 0.8.8 is not working
MikeMcr wrote:Yes, SHOW INDEX indicates BTREE is already being used. Strange that it doesn't like the "USING BTREE" command. It was an upgrade. I am running this on a ReadyNAS Pro (Linux) and the MySQL version is:chadd wrote:No problem. You should be fine.
If you want to confirm you are using BTREE data structure, just do this:
SHOW INDEX FROM cacti.poller_output\G
Also, I'd be curious to know what version of MySQL you are running, and on what OS? And, was this a new install, or an upgrade?
-chadd.
Code: Select all
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 328 Server version: 5.0.32-Debian_7etch5 Debian etch distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> STATUS -------------- mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2
Weird.. I am running 5.1.54-1 on my dev machine, and it wouldn't take the command minus the "use btree".. Wonder why?? Oh, well. If it works for you, then good.
-chadd.
Re: Update to 0.8.8 is not working
It looks like that command is not supported in MySQL 5.0, see here:chadd wrote: Weird.. I am running 5.1.54-1 on my dev machine, and it wouldn't take the command minus the "use btree".. Wonder why?? Oh, well. If it works for you, then good.
-chadd.
http://prattski.com/2010/06/01/mysql-us ... ng-to-5-0/
Re: Update to 0.8.8 is not working
MikeMcr wrote:It looks like that command is not supported in MySQL 5.0, see here:chadd wrote: Weird.. I am running 5.1.54-1 on my dev machine, and it wouldn't take the command minus the "use btree".. Wonder why?? Oh, well. If it works for you, then good.
-chadd.
http://prattski.com/2010/06/01/mysql-us ... ng-to-5-0/
Makes sense.. Well, hopefully this thread gets picked up by the Cacti devs
Cheers,
-chadd.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Update to 0.8.8 is not working
Yes and no. We wanted to force that BTREE type of indexchadd wrote:First, not sure why they added "USING BTREE" to the command, as that is the default anyway.
This should not happen:Second, if you issue the command at the mysql> prompt you get a better error message:
mysql> ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE;
ERROR 1068 (42000): Multiple primary key defined
Code: Select all
$_keys = array_rekey(db_fetch_assoc("SHOW KEYS FROM `poller_output`"), "Key_name", "Key_name");
if (in_array("PRIMARY", $_keys)) {
db_install_execute("0.8.8", "ALTER TABLE `poller_output` DROP PRIMARY KEY");
cacti_log(__FUNCTION__ . " table poller_output: dropping old PRIMARY KEY", false, "UPGRADE");
}
/* now the KEY we want to create is definitively NOT present */
db_install_execute("0.8.8", "ALTER TABLE `poller_output` ADD PRIMARY KEY (`local_data_id`, `rrd_name`, `time`) USING BTREE");
cacti_log(__FUNCTION__ . " upgrade table poller_output", false, "UPGRADE");
So I fear we've touched a MYSQL version that does not like BTREE type indexes.
Please: Post the mysql version used
R.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Update to 0.8.8 is not working
Looking at http://dev.mysql.com/doc/refman/5.0/en/alter-table.html it SHOULD be supported in 5.0. This is, what I was looking at when coding this bit.MikeMcr wrote:It looks like that command is not supported in MySQL 5.0, see here:chadd wrote: Weird.. I am running 5.1.54-1 on my dev machine, and it wouldn't take the command minus the "use btree".. Wonder why?? Oh, well. If it works for you, then good.
-chadd.
http://prattski.com/2010/06/01/mysql-us ... ng-to-5-0/
It was present even in earlier releases: http://dev.mysql.com/doc/refman/4.1/en/alter-table.html
But perhaps I missed sth.
R.
Re: Update to 0.8.8 is not working
Strange but it definately doesn't like that command in my version of 5.0.gandalf wrote:Looking at http://dev.mysql.com/doc/refman/5.0/en/alter-table.html it SHOULD be supported in 5.0. This is, what I was looking at when coding this bit.
It was present even in earlier releases: http://dev.mysql.com/doc/refman/4.1/en/alter-table.html
But perhaps I missed sth.
R.
Who is online
Users browsing this forum: No registered users and 2 guests