|
|
| Author |
Message |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Fri Jan 20, 2006 9:36 pm Post subject: |
|
|
Please goto Utilities->View Poller Cache and look for "Action: 2". There you will find the script server information. Please post your output.
If you are running *nix environment, you poller cron job must be running as root in order to utilize ICMP pings do to the inability to create raw sockets in PHP. If you change availability to SNMP only, you may have better luck. Then your pings will be snmp pings.
The problem is that seteuid only exists in if you utilize the POSIX PHP extension, which the PHP group recommends against for security reasons.
However, the "script server communications lost" may also be indicative of an issue with the script server which would result in the Advance Ping breaking. You should run the poller 1 time in DEBUG and post that output as well.
TheWitness
|
|
| Back to top |
|
 |
pepj Cacti User
Joined: 29 Sep 2005 Posts: 288 Location: switzerland
|
Posted: Sat Jan 21, 2006 6:05 pm Post subject: script server communications lost |
|
|
Hi
| TheWitness wrote: | Please goto Utilities->View Poller Cache and look for "Action: 2". There you will find the script server information. Please post your output.
However, the "script server communications lost" may also be indicative of an issue with the script server which would result in the Advance Ping breaking. You should run the poller 1 time in DEBUG and post that output as well.
TheWitness |
It is window2003.
I've annexed the debug and poller output for one host
NO MORE DEBUG FILE ATTACHED (my account reached the quotas) problem solved in http://bugs.cacti.net/main_page.php
Thanks
Last edited by pepj on Fri Apr 14, 2006 5:00 am; edited 1 time in total |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Sat Jan 21, 2006 10:51 pm Post subject: |
|
|
Need more of the log. Also, what versions of the various code are you running: cygwin, mysql, php, net-snmp libraries, etc?
TheWitness
|
|
| Back to top |
|
 |
pepj Cacti User
Joined: 29 Sep 2005 Posts: 288 Location: switzerland
|
Posted: Sun Jan 22, 2006 3:21 pm Post subject: script server communications lost |
|
|
| 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 |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Sun Jan 22, 2006 4:57 pm Post subject: |
|
|
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
|
|
| Back to top |
|
 |
pepj Cacti User
Joined: 29 Sep 2005 Posts: 288 Location: switzerland
|
Posted: Mon Jan 23, 2006 6:28 am Post subject: script server communications lost |
|
|
| 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
| Description: |
|
 Download |
| Filename: |
cactitest20060123.txt |
| Filesize: |
11.84 KB |
| Downloaded: |
384 Time(s) |
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Mon Jan 23, 2006 7:13 am Post subject: |
|
|
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
|
|
| Back to top |
|
 |
pepj Cacti User
Joined: 29 Sep 2005 Posts: 288 Location: switzerland
|
Posted: Mon Jan 23, 2006 7:40 am Post subject: |
|
|
| 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.
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Mon Jan 23, 2006 9:39 pm Post subject: |
|
|
Your path must be in lower case. Otherwise, you may remove that section of code from script_server.php and test.
| Code: | /* 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);
}
} |
|
|
| Back to top |
|
 |
pepj Cacti User
Joined: 29 Sep 2005 Posts: 288 Location: switzerland
|
Posted: Tue Jan 24, 2006 4:38 am Post subject: |
|
|
| 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: | 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: | 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: | 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: | 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]
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9736 Location: MI, USA
|
Posted: Thu Jan 26, 2006 9:34 pm Post subject: |
|
|
looks like bad coding on my part from my early days of PHP.
|
|
| Back to top |
|
 |
pepj Cacti User
Joined: 29 Sep 2005 Posts: 288 Location: switzerland
|
Posted: Tue Feb 07, 2006 3:55 pm Post subject: Bug PHP -> bug Cactid |
|
|
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
| Quote: |
/* 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)
| Quote: |
/* 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.
|
|
| Back to top |
|
 |
SHaRKTooTH
Joined: 07 Feb 2005 Posts: 1
|
Posted: Thu Mar 16, 2006 12:21 am Post subject: |
|
|
| lvm wrote: | What about scripts given by | Code: | | 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.
|
|
| Back to top |
|
 |
mfreeman451
Joined: 23 Aug 2006 Posts: 4
|
Posted: Tue Aug 29, 2006 2:07 pm Post subject: Cactid won't compile on sun4u/solaris9 |
|
|
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
|
|
| Back to top |
|
 |
mfreeman451
Joined: 23 Aug 2006 Posts: 4
|
Posted: Tue Aug 29, 2006 2:10 pm Post subject: Re: Cactid won't compile on sun4u/solaris9 |
|
|
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  |
|
|
| Back to top |
|
 |
|