Problem: SQL Backtrace (/graph_view.php: 325 grow_right_pane

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
knebb
Cacti User
Posts: 131
Joined: Tue Sep 19, 2006 11:29 am

Problem: SQL Backtrace (/graph_view.php: 325 grow_right_pane

#1 Post by knebb » Mon Dec 17, 2018 8:03 am

Hi,

since today, 4.00am I am seeing these entries in my cacti.log:

Code: Select all

2018/12/17 13:19:37 - CMDPHP SQL Backtrace: (/graph_view.php: 325 grow_right_pane_tree)(/lib/html_tree.php: 648 get_allowed_graph_templates)(/lib/auth.php: 1293 db_fetch_cell)(/lib/database.php: 234 db_fetch_cell_prepared)(/lib/database.php: 281 cacti_debug_backtrace)
2018/12/17 13:19:37 - CMDPHP SQL Backtrace: (/graph_view.php: 325 grow_right_pane_tree)(/lib/html_tree.php: 995 get_allowed_graph_templates)(/lib/auth.php: 1293 db_fetch_cell)(/lib/database.php: 234 db_fetch_cell_prepared)(/lib/database.php: 281 cacti_debug_backtrace)
2018/12/17 13:24:37 - CMDPHP SQL Backtrace: (/graph_view.php: 325 grow_right_pane_tree)(/lib/html_tree.php: 648 get_allowed_graph_templates)(/lib/auth.php: 1293 db_fetch_cell)(/lib/database.php: 234 db_fetch_cell_prepared)(/lib/database.php: 281 cacti_debug_backtrace)
Additionally, all my graphs stopped, see attached screenshot.

Anyone having an idea what is going wrong here?
Database issue? Library version issue? At 4.00am I am doing an automated "yum -y update". My Cacti is running on CentOS7.
In yum.log I see
Dec 17 04:00:44 Updated: cacti-1.1.38-3.el7.noarch
So it looks like the update broke the things here. But to troubleshoot I would need to know what exactly causes the issue...

Thanks a lot!
/KNEBB
Attachments
cacti_graph_1899.png
cacti_graph_1899.png (25.25 KiB) Viewed 363 times

User avatar
knebb
Cacti User
Posts: 131
Joined: Tue Sep 19, 2006 11:29 am

Re: Problem: SQL Backtrace (/graph_view.php: 325 grow_right_

#2 Post by knebb » Mon Dec 17, 2018 9:37 am

Restored the backup from yesterday.

Now back to
cacti-1.1.38-2.el7.noarch

Tha backtrace-error went away, looks like (according to cacti.log) the poll went fine so far.


Anyone having a clue what went wrong with the update ?

paulgevers
Cacti Pro User
Posts: 590
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Problem: SQL Backtrace (/graph_view.php: 325 grow_right_

#3 Post by paulgevers » Thu Dec 20, 2018 6:28 am

knebb wrote: Now back to
cacti-1.1.38-2.el7.noarch
I think you should really contact CentOS7 as they know best what they do in that package.
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

netniV
Cacti Guru User
Posts: 2666
Joined: Sun Aug 27, 2017 12:05 am

Re: Problem: SQL Backtrace (/graph_view.php: 325 grow_right_

#4 Post by netniV » Thu Dec 20, 2018 7:24 am

We do not have any releases after 1.1.38 as we have been concentrating on 1.2, so if there is a newer version of the package, either a dependency changed or they added an extra patch that they felt necessary.

You can do two things, report it to them as we would recommend for Debian (which Paul handles so always worth listening to his advice) and if you really feel like diagnosing the issue, extract the contents of both packages and perform a diff to see what changed.

We will try to help out depending on what change is found if we can. Please do let us know what you find.

paulgevers
Cacti Pro User
Posts: 590
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Problem: SQL Backtrace (/graph_view.php: 325 grow_right_

#5 Post by paulgevers » Thu Dec 20, 2018 7:34 am

netniV wrote:... extract the contents of both packages and perform a diff to see what changed.
Slightly out of context, but for Debian the source changes are maintained in git, and can be found here: https://salsa.debian.org/cacti-team/cacti
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

User avatar
knebb
Cacti User
Posts: 131
Joined: Tue Sep 19, 2006 11:29 am

Re: Problem: SQL Backtrace (/graph_view.php: 325 grow_right_

#6 Post by knebb » Thu Dec 20, 2018 8:44 am

Hi all,

thanks for your replies.

I indeed did now a diff of the two versions and it appears the main change has been a change of ownership:

Code: Select all

[[email protected] 3]# diff cacti.spec ../2/cacti.spec
3c3
< Release: 3%{?dist}
---
> Release: 2%{?dist}
6,7c6,7
< URL: https://www.cacti.net/
< Source0: https://www.cacti.net/downloads/%{name}-%{version}.tar.gz
---
> URL: http://www.cacti.net/
> Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz
116,124c116,117
< %post
< # Migrate file ownership to apache user
< chown -R apache:apache %{_localstatedir}/lib/%{name}/rra/
< chown -R apache:apache %{_localstatedir}/log/%{name}/
< chown root:apache %{_sysconfdir}/%{name}/db.php
<
< # Migrate cacti polller to apache user
<
< sed -i -e 's/\tcacti\t/\tapache\t/' %{_sysconfdir}/cron.d/%{name}
---
> %pre
> useradd -d %{_datadir}/%{name} -r -s /sbin/nologin cacti 2> /dev/null || :
125a119
> %post
141,142c135,136
< %dir %attr(-,apache,apache) %{_localstatedir}/log/%{name}/
< %config(noreplace) %attr(-,apache,apache) %{_localstatedir}/log/%{name}/%{name}.log
---
> %dir %attr(-,cacti,apache) %{_localstatedir}/log/%{name}/
> %config(noreplace) %attr(-,cacti,apache) %{_localstatedir}/log/%{name}/%{name}.log
146c140
< %attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/db.php
---
> %attr(0640,cacti,apache) %config(noreplace) %{_sysconfdir}/%{name}/db.php
164c158
< %attr(-,apache,apache) %{_localstatedir}/lib/%{name}/rra/
---
> %attr(-,cacti,root) %{_localstatedir}/lib/%{name}/rra/
172,177d165
< * Mon Dec 03 2018 Morten Stevens <> - 1.1.38-4
< - Spec file improvements
< - Updated logrotation settings
< - Removed cacti user
< - Changed rra file ownership to apache #1454755
<
So may I assume my error from my first post is an error because of a wrong user and so Cacti not beeing able to access the files?

/KNEBB

paulgevers
Cacti Pro User
Posts: 590
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Problem: SQL Backtrace (/graph_view.php: 325 grow_right_

#7 Post by paulgevers » Thu Dec 20, 2018 9:13 am

You should really report this to CentOS and discuss with the maintainer there.
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

netniV
Cacti Guru User
Posts: 2666
Joined: Sun Aug 27, 2017 12:05 am

Re: Problem: SQL Backtrace (/graph_view.php: 325 grow_right_

#8 Post by netniV » Fri Dec 21, 2018 5:41 am

At a glance, yes, this would appear to be an ownership issue. As Paul says, raise it with the Cacti maintainer on CentOS but I can't recall who that is off the top of my head. I just know Paul and Morten as they have been quite good at posing questions and bugs to us that have helped improve things. Morten handles Fedora's EPEL if I remember rightly but I'm not sure that covers CentOS.

If you are using the EPEL repository, then that may be Morten.

Post Reply