Debian update broke graph closeups

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
mAineAx
Posts: 21
Joined: Mon Oct 20, 2014 12:50 pm

Debian update broke graph closeups

Post by mAineAx »

I am using Debian Jessie 8.9 cacti 8.8b. I was way behind on updates on Debian on a server. This was not virtualized so we did not dare to update because it had been so long since the last update. So I moved it to a virtualized instance and everything was working. I took a snapshot and updated the server. there were a lot of updates including cacti and I also swapped to mariaDB from mysql at the same time. Everything appears to be working Graphs are being made and everything looks good. Except when I click on a graph to get a closeup it is like it is take the graph at the current instant for all of the graphs times instead of the given 1 minute average, 5 minute average, 30 minute avrage etc.. Not sure what happened or how to fix. Has anyone had this happen before?


I think I have found the errors not sure how to fix though:
07/25/2017 01:35:49 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select timespan,rows,steps from rra where id=4"
07/25/2017 01:35:49 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select timespan,rows,steps from rra where id=3"
07/25/2017 01:35:49 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select timespan,rows,steps from rra where id=2"
07/25/2017 01:35:49 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select timespan,rows,steps from rra where id=1"
07/25/2017 01:35:46 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select timespan,rows,steps from rra where id=4"
07/25/2017 01:35:46 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select timespan,rows,steps from rra where id=3"
07/25/2017 01:35:46 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select timespan,rows,steps from rra where id=2"
07/25/2017 01:35:46 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select timespan,rows,steps from rra where id=1"
07/25/2017 01:35:41 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select timespan,rows,steps from rra where id=4"
07/25/2017 01:35:41 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select timespan,rows,steps from rra where id=3"
07/25/2017 01:35:41 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select timespan,rows,steps from rra where id=2"
07/25/2017 01:35:41 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select timespan,rows,steps from rra where id=1"
mAineAx
Posts: 21
Joined: Mon Oct 20, 2014 12:50 pm

Re: Debian update broke graph closeups

Post by mAineAx »

Does anyone have any suggestions for this? The graphs are actually being created. If I click on the looking glass it will bring up the correct graph so I can zoom in on it. it is just not bring up the correct graphs on the page that lists the different time periods all on one page.
mAineAx
Posts: 21
Joined: Mon Oct 20, 2014 12:50 pm

Re: Debian update broke graph closeups

Post by mAineAx »

It looks like I get the exact error if i try to do this from the database directly.

MariaDB [cacti]> describe rra;
+----------------+-----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+-----------------------+------+-----+---------+----------------+
| id | mediumint(8) unsigned | NO | PRI | NULL | auto_increment |
| hash | varchar(32) | NO | | | |
| name | varchar(100) | NO | | | |
| x_files_factor | double | NO | | 0.1 | |
| steps | mediumint(8) | YES | | 1 | |
| rows | int(12) | NO | | 600 | |
| timespan | int(12) unsigned | NO | | 0 | |
+----------------+-----------------------+------+-----+---------+----------------+
7 rows in set (0.00 sec)

MariaDB [cacti]> select timespan,rows,steps from rra where id=1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows,steps from rra where id=1' at line 1
MariaDB [cacti]>

I am not proficient in mysql syntax to know what has changed. I am also not quite sure what I need to change to crrect cacti to use the correct syntax. I would appreciate any help that anyone can give on this, even if it is pointing me to the correct tutorial to figure this out.
mAineAx
Posts: 21
Joined: Mon Oct 20, 2014 12:50 pm

Re: Debian update broke graph closeups

Post by mAineAx »

OK so I have figured out that the query needs to have the fields in backticks, quotes do not work.

MariaDB [cacti]> select `timespan`,`rows`,`steps` from rra where id=2;
+----------+------+-------+
| timespan | rows | steps |
+----------+------+-------+
| 604800 | 4320 | 30 |
+----------+------+-------+
1 row in set (0.00 sec)

now the question is, where in cacti do I have to change the way this query is made?
mAineAx
Posts: 21
Joined: Mon Oct 20, 2014 12:50 pm

Re: Debian update broke graph closeups

Post by mAineAx »

Does anyone know where I need to make this change in cacti to get it to query correctly. I can see that it is not.
mAineAx
Posts: 21
Joined: Mon Oct 20, 2014 12:50 pm

Re: Debian update broke graph closeups

Post by mAineAx »

Rows was added as a reserved word in 10.2.4. So now it requires quotes. https://mariadb.com/kb/en/mariadb/reserved-words/. I can set the sql_mode so that it will use regular quotes, but I am not sure if this will help. I can't be the only one that is having this issue as this was just a regular update in Debian.
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Debian update broke graph closeups

Post by Osiris »

Only Cacti 1.1.10+ officially supports that maiadb version I think.
Before history, there was a paradise, now dust.
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Debian update broke graph closeups

Post by paulgevers »

First of, if you are using Debian, please report bugs you encounter with Debian packages to the Debian bug tracker¹. Things may very well be Debian specific.

Second, Debian Stretch only has MariaDB 10.1.23, so I understand it that you didn't use the Debian package for that? Otherwise, the bug would be so severe in Debian that I would fix the issue in Stretch.

If I understood you wrong, and you didn't upgrade Debian, than please read the FAQ linked in my signature for catches if you mix and match Debian cacti with the version from this web-site.

¹ https://www.debian.org/Bugs/Reporting
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest