Cactid 0.8.6g Out

Important information about Cacti developments that all users should be interested in.

Moderators: Developers, Moderators

pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

script server communications lost

Post by pepj »

TheWitness wrote:Need more of the log. Also, what versions of the various code are you running: cygwin, mysql, php, net-snmp libraries, etc?

TheWitness
Hi

Here the whole log and poller info.
All the versions are in my signature.

PS: could it be a problem of PHP with upercase ? (I put in cacti all paths in lowercase but in the log in can see some with uppercase)

Thanks

NO MORE DEBUG FILE ATTACHED (my account reached the quotas) problem solved in http://bugs.cacti.net/main_page.php
Last edited by pepj on Fri Apr 14, 2006 4:58 am, edited 1 time in total.
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

seems to me that this was a problem when I developed this thing in Windows. Can you please test the script server:

cd <cacti_webroot>
php script_server.php

You should get a "ready" or "started" message with no other warnings.

Then, type the command. In your case:

"D:/Programme/Cacti-NetworkMonitoring/scripts/ss_fping.php ss_fping usterix 10 ICMP"

You should get a response. If not, post that information here.

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?
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

script server communications lost

Post by pepj »

TheWitness wrote:seems to me that this was a problem when I developed this thing in Windows. Can you please test the script server:

cd <cacti_webroot>
php script_server.php

You should get a "ready" or "started" message with no other warnings.

Then, type the command. In your case:

"D:/Programme/Cacti-NetworkMonitoring/scripts/ss_fping.php ss_fping usterix 10 ICMP"

You should get a response. If not, post that information here.

TheWitness
It seems OK.

01/23/2006 12:03:53 PM - PHPSVR: Poller[0] ERROR: The PHP Script Server MUST be started using the full path to the file and in lower case. This is a PHP Bug!!!

D:\Programme\Cacti-NetworkMonitoring>php d:/programme/cacti-networkmonitoring/script_server.php
PHP Script Server has Started - Parent is cmd
D:/Programme/Cacti-NetworkMonitoring/scripts/ss_fping.php ss_fping usterix 10 ICMP
min:0.1800 avg:2.2050 max:4.3100 dev:1.4573 loss:0.0000

the log is anexed
Attachments
cactitest20060123.txt
(11.84 KiB) Downloaded 671 times
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

So, is this working now? I need to revisit that issue and take the warning message out of the script_server. However, before I do that, I have to somehow manage to get some time to verify that it's fixed in all versions of PHP that we think are important.

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?
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

TheWitness wrote:So, is this working now? I need to revisit that issue and take the warning message out of the script_server. However, before I do that, I have to somehow manage to get some time to verify that it's fixed in all versions of PHP that we think are important.

TheWitness
I don't really understand.
without full path it doesn't function:
D:\Programme\Cacti-NetworkMonitoring>php script_server.php
01/23/2006 12:03:53 PM - PHPSVR: Poller[0] ERROR: The PHP Script Server MUST be started using the full path to the file and in lower case. This is a PHP Bug!!!

it seems to function only with full path... and direct from shell.

Or do you mind about something else ? problem of ss_fping ?

with poller.php I get always the error:
01/23/2006 01:32:47 PM - CACTID: Poller[0] ERROR: SS[0] PHP Script Server communications lost.
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Your path must be in lower case. Otherwise, you may remove that section of code from script_server.php and test.

Code: Select all

/* PHP Bug.  Not yet logged */
if ($config["cacti_server_os"] == "win32") {
	$guess = substr(__FILE__,0,2);
	if ($guess == strtoupper($guess)) {
		$response = "ERROR: The PHP Script Server MUST be started using the full path to the file and in lower case.  This is a PHP Bug!!!";
		print "\n";
		cacti_log($response, true, "PHPSVR");
		exit(-1);
	}
}
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?
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

TheWitness wrote:Your path must be in lower case. Otherwise, you may remove that section of code from script_server.php and test.
change NOT only there !!

The problem could be when cactid starts the php script under windows. cactid has to starts with lowercase ... after that in the script we can use uppercase ... see here

Code: Select all

D:\Programme\Cacti-NetworkMonitoring>php d:/programme/cacti-networkmonitoring/script_server.php
PHP Script Server has Started - Parent is cmd
D:/Programme/Cacti-NetworkMonitoring/scripts/ss_fping.php ss_fping usterix 10 ICMP
min:0.2000 avg:1.2440 max:3.3500 dev:1.1944 loss:0.0000
quit
PHP Script Server Shutdown request received, exiting
--> IS OK

Code: Select all

D:\Programme\Cacti-NetworkMonitoring>php script_server.php
PHP Script Server has Started - Parent is cmd
D:/Programme/Cacti-NetworkMonitoring/scripts/ss_fping.php ss_fping usterix 10 ICMP
--> DO NOTHING

Code: Select all

D:\Programme\Cacti-NetworkMonitoring>php D:/Programme/Cacti-Networkmonitoring/script_server.php
PHP Script Server has Started - Parent is cmd
d:/programme/cacti-networkMonitoring/scripts/ss_fping.php ss_fping usterix 10 ICMP
--->do NOTHING

something else interessant

Code: Select all

D:\Programme\Cacti-NetworkMonitoring>php script_server.php
PHP Script Server has Started - Parent is cmd
./scripts/ss_fping.php ss_fping usterix 10 ICMP
min:0.1500 avg:0.1710 max:0.2700 dev:0.0388 loss:0.0000
[/code]
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

looks like bad coding on my part from my early days of PHP. :oops:
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?
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Bug PHP -> bug Cactid

Post by pepj »

Hi

About my problem (Windows with Uppercase and Cactid -> no scripts are executed).
I don't know if it is the best way to solve it, but it functions and the scripts are sucessful and fast executed. I have won almost 2/3 of the time.
I have done the following changes in the poller.php:

in poller.php
first in order to be sure
/* Update web paths for the poller */
$newpathwin = strtr(strtolower(substr(dirname(__FILE__), 0, 1) . substr(dirname(__FILE__), 1)),"\\", "/");
$newpath= addslashes(($config["cacti_server_os"] == "win32") ? $newpathwin : dirname(__FILE__));
db_execute("replace into settings (name,value) values ('path_webroot','" . $newpath . "')");
and
the correction (for my issue)
/* process poller commands */
if (db_fetch_cell("select count(*) from poller_command") > 0) {
if ($config["cacti_server_os"] == "win32") {
$command_string = strtolower(read_config_option("path_php_binary"));
$extra_args = "-q " . strtolower($config["base_path"]) . "/poller_commands.php";
} else {
$command_string = read_config_option("path_php_binary");
$extra_args = "-q " . $config["base_path"] . "/poller_commands.php";
}
exec_background($command_string, "$extra_args");
}
PS:If you want to solve the problem in an other way, please tell me that.
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
SHaRKTooTH
Posts: 1
Joined: Mon Feb 07, 2005 12:21 pm

Post by SHaRKTooTH »

lvm wrote:What about scripts given by

Code: Select all

unix_disk.xml:  <script_path>perl |path_cacti|/scripts/query_unix_partitions.pl</script_path>
without full path? Suppose, they will need update as well?
Reinhard
This one got me during the upgrade. :roll:
mfreeman451
Posts: 4
Joined: Wed Aug 23, 2006 1:14 pm

Cactid won't compile on sun4u/solaris9

Post by mfreeman451 »

gcc -DHAVE_CONFIG_H -I. -I. -I./config -D_POSIX_PTHREAD_SEMANTICS -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/mysql/include -g -O2 -c `test -f 'nft_popen.c' || echo './'`nft_popen.c
nft_popen.c: In function `nft_pclose':
nft_popen.c:317: error: `SIGTERM' undeclared (first use in this function)
nft_popen.c:317: error: (Each undeclared identifier is reported only once
nft_popen.c:317: error: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target `nft_popen.o'

Added to line 69:

#include <signal.h>

Compiles fine ;)
mfreeman451
Posts: 4
Joined: Wed Aug 23, 2006 1:14 pm

Re: Cactid won't compile on sun4u/solaris9

Post by mfreeman451 »

Nevermind.. Just noticed a few others saying the same things.
mfreeman451 wrote:gcc -DHAVE_CONFIG_H -I. -I. -I./config -D_POSIX_PTHREAD_SEMANTICS -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/local/mysql/include -g -O2 -c `test -f 'nft_popen.c' || echo './'`nft_popen.c
nft_popen.c: In function `nft_pclose':
nft_popen.c:317: error: `SIGTERM' undeclared (first use in this function)
nft_popen.c:317: error: (Each undeclared identifier is reported only once
nft_popen.c:317: error: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target `nft_popen.o'

Added to line 69:

#include <signal.h>

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

Post by TheWitness »

Yea, this is fixed. Use the beta, it's pretty much just waiting on the 0.8.6i release to be released itself.

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?
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: script server communications lost

Post by pepj »

pepj wrote:
TheWitness wrote:seems to me that this was a problem when I developed this thing in Windows. Can you please test the script server:

cd <cacti_webroot>
php script_server.php

You should get a "ready" or "started" message with no other warnings.

Then, type the command. In your case:

"D:/Programme/Cacti-NetworkMonitoring/scripts/ss_fping.php ss_fping usterix 10 ICMP"

You should get a response. If not, post that information here.

TheWitness
It seems OK.

01/23/2006 12:03:53 PM - PHPSVR: Poller[0] ERROR: The PHP Script Server MUST be started using the full path to the file and in lower case. This is a PHP Bug!!!

D:\Programme\Cacti-NetworkMonitoring>php d:/programme/cacti-networkmonitoring/script_server.php
PHP Script Server has Started - Parent is cmd
D:/Programme/Cacti-NetworkMonitoring/scripts/ss_fping.php ss_fping usterix 10 ICMP
min:0.1800 avg:2.2050 max:4.3100 dev:1.4573 loss:0.0000

the log is anexed

attachement removed because of Post size limitation (problem can be solved in using the function lowercase in poller.php)
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests