[Solved] XML issues and other problem

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

Moderators: Moderators, Developers

Post Reply
Author
Message
migrec
Posts: 9
Joined: Mon Apr 07, 2014 8:13 am

[Solved] XML issues and other problem

#1 Post by migrec » Wed Aug 21, 2019 2:13 pm

Hi,

I've updated my server to Debian Buster.
I've some trouble with cacti :
  • - cacti is unable to get right values of 2 sensors (data source : interfaces - traffic). This is relative to my 2 interfaces.
  • - cacti show me errors like "Sorry, we could not process your last action. Erreur : 500 Console -> Créer de nouveaux graphiques Motif :The response to the last action was unexpected.". In the log I've :

    Code: Select all

    2019/08/21 21:08:19 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
    2019/08/21 21:08:19 - ERROR PHP ERROR: Uncaught Error: Call to undefined function xml_parser_create() in /usr/share/cacti/site/lib/xml.php:29 Stack trace: #0 /usr/share/cacti/site/lib/data_query.php(519): xml2array('<query>\n\t<name>...') #1 /usr/share/cacti/site/graphs_new.php(573): get_data_query_array('13') #2 /usr/share/cacti/site/graphs_new.php(66): graphs() #3 {main} thrown in file: /usr/share/cacti/site/lib/xml.php on line: 29
    2019/08/21 21:08:10 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
    2019/08/21 21:08:10 - ERROR PHP ERROR: Uncaught Error: Call to undefined function xml_parser_create() in /usr/share/cacti/site/lib/xml.php:29 Stack trace: #0 /usr/share/cacti/site/lib/data_query.php(519): xml2array('<query>\n\t<name>...') #1 /usr/share/cacti/site/graphs_new.php(573): get_data_query_array('13') #2 /usr/share/cacti/site/graphs_new.php(66): graphs() #3 {main} thrown in file: /usr/share/cacti/site/lib/xml.php on line: 29 
The php7.3-xml and php-xml are installed...

I don't know if thoses problems are linked but I canno't create graph in order to test it...
Can you help me ? Thanks.
--
Migrec
Last edited by migrec on Fri Aug 23, 2019 1:52 am, edited 1 time in total.

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

Re: XML issues and other problem

#2 Post by netniV » Wed Aug 21, 2019 3:08 pm

\what version of 'cacti do you have:? Since you have a debian based system, make sure you have the proper extensions enabled for both the cli and the web.

migrec
Posts: 9
Joined: Mon Apr 07, 2014 8:13 am

Re: XML issues and other problem

#3 Post by migrec » Wed Aug 21, 2019 5:19 pm

Yes, it seems that I've corrects packages. I use cacti 1.2.2.
My installation works before my upgrade to Buster. It was cacti 0.8.

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

Re: XML issues and other problem

#4 Post by netniV » Thu Aug 22, 2019 7:05 am

I dom't know how easy it is for you to try and upgrade, but 1.2.6 will be released at the end of this month. If you still have the same issue on there, it'll be a lot easier to identify in the current code. It may have been fixed by someone already so the problem may go away.

migrec
Posts: 9
Joined: Mon Apr 07, 2014 8:13 am

Re: XML issues and other problem

#5 Post by migrec » Thu Aug 22, 2019 8:15 am

After a lot of tries, a graph (traffic enp2s0) is come back and the graph is correct.
I've made a apt install --reinstall snmpd. I don't know if that is the raison why this graph works...
But the traffic enp3s0 doesn't work.

I've still errors :

Code: Select all

2019/08/22 14:51:28 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
2019/08/22 14:51:28 - ERROR PHP ERROR: Uncaught Error: Call to undefined function xml_parser_create() in /usr/share/cacti/site/lib/xml.php:112 Stack trace: #0 /usr/share/cacti/site/lib/rrd.php(2231): rrdxport2array('<?xml version="...') #1 /usr/share/cacti/site/lib/rrd.php(2249): rrdtool_function_graph(9, '0', Array, '', Array) #2 /usr/share/cacti/site/graph_xport.php(92): rrdtool_function_xport(9, '0', Array, Array) #3 {main} thrown in file: /usr/share/cacti/site/lib/xml.php on line: 112
2019/08/22 14:50:17 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
2019/08/22 14:50:17 - ERROR PHP ERROR: Uncaught Error: Call to undefined function xml_parser_create() in /usr/share/cacti/site/lib/xml.php:29 Stack trace: #0 /usr/share/cacti/site/lib/data_query.php(519): xml2array('<interface>\n\t<n...') #1 /usr/share/cacti/site/data_queries.php(728): get_data_query_array(1) #2 /usr/share/cacti/site/data_queries.php(88): data_query_item_edit() #3 {main} thrown in file: /usr/share/cacti/site/lib/xml.php on line: 29 
I've added (by error) new data source to Data Templates [edit: Interface - Traffic] and I wan't to delete them but it's impossible... A pop up says "Data template in use can not be modified"...

I can't test the new version in a easy way. I don't want to loose all my data collected since 3 years. ;-)
Attachments
20190822 - Cacti2.png
20190822 - Cacti2.png (16.15 KiB) Viewed 58 times
20190822 - Cacti.png
20190822 - Cacti.png (69.73 KiB) Viewed 58 times

migrec
Posts: 9
Joined: Mon Apr 07, 2014 8:13 am

Re: XML issues and other problem

#6 Post by migrec » Fri Aug 23, 2019 1:52 am

After multiples test, it seems that my problem was linked to my php installation.
I use php7.3 but I found some php7.0 files. I thinks apache2 uses an old module of php7.0 or php5.

I do : apt install --reinstall php7.0, apt install php7.3, a2enmod php7.3.

It works better. I can now navigate and use all the functions of cacti except remove data source but it's another problem.
Sometimes, there is php code in my browser. I thinks apache is responsible.

Post Reply