how to understand and troubleshoot log messages

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

Moderators: Developers, Moderators

Post Reply
enriquet
Posts: 30
Joined: Wed May 09, 2012 11:03 am

how to understand and troubleshoot log messages

Post by enriquet »

I am working on a migration from a cacti installation version 0.8.8 that was on /usr/share/cacti/site of one debian (old one), to another new server, new debian, new cacti 1.2.17, and on /usr/share/cacti. Most of the graphs look good and i am trying to get a clear log, without errors and warnings. I got to the point when i am not sure on how to interpret and troubleshoot the following messages, and i am not very skilled in php as to analise why it is happening, so i would apreciate any help of link to documentation that helps to interpret and solve the issues reported by log.


2021-06-07 16:35:25 - CMDPHP PHP ERROR NOTICE Backtrace: (/cmd.php[325]:ping_and_reindex_check(), /cmd.php[735]:CactiErrorHandler())
2021-06-07 16:35:25 - ERROR PHP NOTICE: Undefined variable: cactiphp in file: /usr/share/cacti/cmd.php on line: 735
2021-06-07 16:35:25 - CMDPHP PHP ERROR NOTICE Backtrace: (/cmd.php[325]:ping_and_reindex_check(), /cmd.php[735]:CactiErrorHandler())
2021-06-07 16:35:25 - ERROR PHP NOTICE: Undefined variable: pipes in file: /usr/share/cacti/cmd.php on line: 735
2021-06-07 16:35:25 - CMDPHP PHP ERROR NOTICE Backtrace: (/cmd.php[325]:ping_and_reindex_check(), /cmd.php[735]:CactiErrorHandler())
2021-06-07 16:35:25 - ERROR PHP NOTICE: Undefined variable: using_proc_function in file: /usr/share/cacti/cmd.php on line: 735
2021-06-07 16:35:03 - CMDPHP PHP ERROR NOTICE Backtrace: (/cmd.php[325]:ping_and_reindex_check(), /cmd.php[735]:CactiErrorHandler())
2021-06-07 16:35:03 - ERROR PHP NOTICE: Undefined variable: cactiphp in file: /usr/share/cacti/cmd.php on line: 735
2021-06-07 16:35:03 - CMDPHP PHP ERROR NOTICE Backtrace: (/cmd.php[325]:ping_and_reindex_check(), /cmd.php[735]:CactiErrorHandler())
2021-06-07 16:35:03 - ERROR PHP NOTICE: Undefined variable: pipes in file: /usr/share/cacti/cmd.php on line: 735
2021-06-07 16:35:03 - CMDPHP PHP ERROR NOTICE Backtrace: (/cmd.php[325]:ping_and_reindex_check(), /cmd.php[735]:CactiErrorHandler())
2021-06-07 16:35:03 - ERROR PHP NOTICE: Undefined variable: using_proc_function in file: /usr/share/cacti/cmd.php on line: 735
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: how to understand and troubleshoot log messages

Post by netniV »

Basically, the code is trying to pass a variable before it has been defined. If you don't have any script server scripts in your installation, that is the most likely cause as I can't see the code populating that variable without at least one. It should have primed it as 'false' to ensure that it existed even if it wasn't set yet. If you can, log this on github so it can be fixed.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
enriquet
Posts: 30
Joined: Wed May 09, 2012 11:03 am

Re: how to understand and troubleshoot log messages

Post by enriquet »

Thanks for you answer. I do have some xml in script_servers directory. All of them were used in previous version. I am kind of lost with log messages. Since original post i changed to spine, but cacti is not working well neither with spine, nor with cmd.php, and graphs have big holes in them, in which nothing is graphed
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: how to understand and troubleshoot log messages

Post by netniV »

Sorry, I must have been half asleep the other day. the cactiphp variable is actually a built up variable that is made up of the configuration option path_php_binary (in the database) and the base path of your server (base_path in config.php). Make sure both are set.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: how to understand and troubleshoot log messages

Post by netniV »

If you still get the error, log it as a bug on github (https://github.com/cacti/cacti/issues/new/choose) and we can do some investigation on it
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
enriquet
Posts: 30
Joined: Wed May 09, 2012 11:03 am

Re: how to understand and troubleshoot log messages

Post by enriquet »

Thanks a lot for your help. I did opened a bug, but i am still facing with worse issues. Now nothing is working (graphs in nan) in my updated installation and the following message is being logged

CMDPHP ERROR: A DB Exec Failed!, Error: MySQL server has gone away

I ve googled it for a while, but without being able to solve it. No idea whats happening
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: how to understand and troubleshoot log messages

Post by netniV »

This has now been corrected on the latest sources of 1.2.x branch.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests