Warning messages in Cacti log

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

Moderators: Developers, Moderators

User avatar
chercen
Posts: 41
Joined: Sun Apr 09, 2006 4:16 pm
Location: Spain

Warning messages in Cacti log

Post by chercen »

Hi all,

Few weeks ago (when beta3 was released), a user posted a topic about some error messages that appeared in cacti log even in a fresh install:

.....
08/08/2006 02:30:03 PM - PHPSVR: Poller[0] WARNING: PHP Script File to be included, does not exist
08/08/2006 02:30:03 PM - PHPSVR: Poller[0] WARNING: Function does not exist
..... (dozens of times)

I have just installed cacti 0.8.6i stable version, and I have found the same messages. The graphs work OK, but it is annying seeing all those messages.

I have done some tests, and the message comes from script_server.php file. In line 150 there is a "cacti_log()" statement that issues the message. That message appears because $function variable is "", and obviously that PHP does not exist . Also one of the messages is issued because the $function variable is set to "quit".

I have changed that line with:

if ($function != "") {
cacti_log("WARNING: PHP Script File to be included, does not exist", false, "PHPSVR");
}

You need to do the same operation to erase the "Function does not exist" log message, few lines after that one.

This is an ugly workaround, and I do not know why that happens (I am not very good at php :-)). The thing is: why does that variable take those two values ("" and "quit")? I hope this post helps developers to workaround this.

Regards

PD: using cacti0.8.6i (stable release), cactid 0.8.6g, php4.3.2, apache 2.0.46, Linux RHEL3
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You should not be changing code that you do not understand. Please run 1 pass in DEBUG and post your log output.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
chercen
Posts: 41
Joined: Sun Apr 09, 2006 4:16 pm
Location: Spain

Post by chercen »

TheWitness wrote:You should not be changing code that you do not understand. Please run 1 pass in DEBUG and post your log output.

TheWitness
You are right TheWitness, but it was the first thing that came to my mind to get rid of those messages :-)

Here you are a file with the debug output. I have attached just the last lines of the debugging, since it is there where the messages appear (the full log file is 6M big, and it has lots of public IP address, so I wont attach it). If you need a longer file please tell me.

Regards,
Attachments
cacti_log.txt
(17 KiB) Downloaded 891 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Interesting. Can you please do the following:

from a command line:

php -v

Then, from mysql, do the following:

mysql -u <cacti_user> -p cacti
> select action, count(action) from poller_items group by action order by action;

Then, if action=2 is > 0, please perform the following:

mysqldump -u <cacti_user> -p cacti > cadti_dump.sql

Send it to me vi PM. Then, also, what version of Cactid are you running. This is very important. After that, we will take followup steps.

Make sure you post the output from the commands above.

You will not hear from me for another day likely as I am going to work now and my daughter has a birthday party tonight, the dog goes to the vet in the am, then I am not sure what the wife is going to have me doing :oops:

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

There are now three users reporting this. Can you please post a timely response?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

TheWitness wrote:There are now three users reporting this. Can you please post a timely response?

TheWitness
PM w/info sent.
User avatar
chercen
Posts: 41
Joined: Sun Apr 09, 2006 4:16 pm
Location: Spain

Post by chercen »

TheWitness wrote:There are now three users reporting this. Can you please post a timely response?

TheWitness
Hi all,

Sorry TheWitness, my cacti installation is at work and I dont have access to it on weekend ..... it is time to have a rest :-)

On monday I'll have a look....

Regards,
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

When you do, do the following:

php -v

rpm -qa | grep libc

does it occur in both cmd.php and cactid or just cactid?

What version of cactid?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

(PM'd and posting here so others can follow along)
TheWitness wrote:When you do, do the following:
php -v
4.3.9 on the latest Centos4
TheWitness wrote:rpm -qa | grep libc
libcap-devel-1.10-20
glibc-headers-2.3.4-2.25
libcap-1.10-20
glibc-kernheaders-2.4-9.1.98.EL
compat-libcom_err-1.0-5
glibc-2.3.4-2.25
libcroco-0.6.0-4
glibc-common-2.3.4-2.25
glibc-devel-2.3.4-2.25
and no updates available
TheWitness wrote:does it occur in both cmd.php and cactid or just cactid?
Only with cactid
TheWitness wrote:What version of cactid?
rpm reports cacti-cactid-0.8.6g-1
but when I run cactid -h it reports CACTID 0.8.6f
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

PHP cli or cgi?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

TheWitness wrote:PHP cli or cgi?

TheWitness
cli as I upgraded php to v5.0.4 and the warnings are now gone.

And while the php upgrade may be a solution on this box, I'm not sure yet if php5 is available for my production box which is running RHEL4.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Another near-term fix, might be to back off <path_cacti>/script_server.php and see if the problem also goes away. Maybe I need to consider that as well.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

Scratch the php upgrade fix. Warnings are still in the log. (stupid me didn't correct cactid.conf) :roll: :oops:
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What happens when you back off the script_server.php file?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

Backed script_server.php off to to the one in cacti-0.8.6h and no warning messages. It's run through 4 cycles now and appears to be graphing as normal.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests