Cactid doesn't execute my script...

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

Moderators: Developers, Moderators

Post Reply
Jeb
Posts: 38
Joined: Tue May 24, 2005 2:50 am

Cactid doesn't execute my script...

Post by Jeb »

Hello,

I have a problem with cactid on windows (but i'am not sur it's windows specific).
I have a Data Input Methods that execute 'd:/perl/bin/perl.exe E:/Cacti/Apache/Apache2/htdocs/cacti-0.8.6i/scripts/isup-win32.pl <ip>'

If i use cmd.php it work well, but i have more than 30k datasource, so i must use cactid...
Here is what i get when using cactid

11/17/2006 06:45:07 PM - CACTID: Poller[0] Host[538] ERROR: Empty result [1.2.3.4]: 'd:/perl/bin/perl.exe E:/Cacti/Apache/Apache2/htdocs/cacti-0.8.6i/scripts/isup-win32.pl 1.2.3.4'
I have tried to use both / and \ in path, to call directly the .pl file etc...
But nothing work

Here is cactid --verbose=5 log

CACTID: Host[538] DEBUG: The POPEN returned the following File Descriptor 7
CACTID: Host[538] ERROR: Empty result [1.2.3.4]: 'd:/perl/bin/perl.exe E:/Cacti/Apache/Apache2/htdocs/cacti-0.8.6i/scripts/isup-win32.pl 1.2.3.4'
CACTID: Host[538] DS[8114] WARNING: Result from SCRIPT not valid. Partial Result: ...
CACTID: Host[538] DS[8114] SCRIPT: d:/perl/bin/perl.exe E:/Cacti/Apache/Apache2/htdocs/cacti-0.8.6i/scripts/isup-win32.pl 1.2.3.4, output: U

PS: i use cactid 0.8.6i
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please see if this binary helps your problem. Note, you must be running cygwin 1.5.22 in order for this to work100%.

TheWitness
Attachments
cactid.zip
(521.06 KiB) Downloaded 673 times
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?
Jeb
Posts: 38
Joined: Tue May 24, 2005 2:50 am

Post by Jeb »

Thanks for you quick answer !
This one work :)

I had to update sh.exe also to make it work (but my old cactid.exe with new sh.exe doesn't work).

But now I got theses error :
11/17/2006 11:20:54 PM - CACTID: Poller[0] FATAL: Cactid Encountered a Segmentation Fault (fork)
I'am not sure but it seem to append only when a configure "lot" of threads/process (I put it to 10), i have changed to 5 and did not see another segmentation fault for the moment..

11/17/2006 11:20:53 PM - CACTID: Poller[0] ERROR: Some internal error caused snmp to return null response in snmp_get
This one append when an host did now answer to SNMP, i think it shouldn't make an Error but just the "WARNING: SNMP timeout detected [500 ms], ..."
Jeb
Posts: 38
Joined: Tue May 24, 2005 2:50 am

Post by Jeb »

Hum, in fact Segmentation Fault seems to append after lot of "ERROR: Some internal error caused snmp to return null response in snmp_get" and this one seems to append quite randomly...
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

You need to be AT CYGWIN 1.5.22. Download the package and your should be Ok. It's likely cygwin1.dll
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?
Jeb
Posts: 38
Joined: Tue May 24, 2005 2:50 am

Post by Jeb »

I have upgraded to cygwin 1.5.22.

But i explain my installation, i may have a .dll error but i don't think so.

On the cacti server i also have a Cisco software that use cygwin, so that there is an "old" cygwin1.dll somewhere in a directory which is in the Windows PATH. (the software use cygwin just by having some cygwin .dll in a directory)

So i have installed a real cygwin which is not in the PATH to do not broke the Cisco software
So for cactid to find the good cygwin1.dll i copy it to cactid directory.
When running cactid from CLI from any directory if i have cygwin1.dll in cactid directory all is Ok, if i remove it i got error like this :

6 [main] ? (13024) E:\cygwin\bin\sh.exe: *** fatal error - system shared memory version mismatch detected - 0x75BE
007A/0x2D1E009C.

So in this case it use Cisco cygwin1.dll, the message is clear...
So it seems that the .dll in the same directory than the .exe is taken first.
But when running cactid from CLI i also got segment fault.

Could you confirm me that cactid only use cygwin1.dll, cygz.dll and cygcrypto-0.9.8.dll ?
May be i have forget to copy one .dll, so that it is loaded from the Cisco cygwin...

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

Post by TheWitness »

You also need to copy sh.exe from 1.5.22, and two additional DLL's. One moment.

sh.exe requires:

cygintl-8.dll
cygreadline6.dll

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?
Jeb
Posts: 38
Joined: Tue May 24, 2005 2:50 am

Post by Jeb »

It's ok for sh.exe and the 2 dll.

I'have done some test, running cactid from cli, and each time it crash (it crash 90% of time) it's with a log like this one:

...
CACTID: Host[319] DS[9787] SNMP: v1: .... 317484
CACTID: Host[319] DS[9786] SNMP: v1: .... 161892
CACTID: Host[322] SNMP Result: Host responded to SNMP
CACTID: Host[323] SNMP Result: Host responded to SNMP
[same from 324 to 441]
CACTID: Host[442] SNMP Result: Host responded to SNMP
CACTID: Host[443] SNMP Result: Host responded to SNMP
CACTID: ERROR: Some internal error caused snmp to return null response in snmp_get
CACTID: ERROR: Some internal error caused snmp to return null esponse in snmp_get
CACTID: Host[444] SNMP Result: Host did not respond to SNMP
CACTID: ERROR: Some internal error caused snmp to return null response in snmp_get
CACTID: ERROR: Some internal error caused snmp to return null response in snmp_get
CACTID: Host[445] SNMP Result: Host did not respond to SNMP
[same from 446 to 473]
CACTID: Host[474] SNMP Result: Host did not respond to SNMP
CACTID: ERROR: Some internal error caused snmp to return null response in snmp_get
CACTID: ERROR: Some internal error caused snmp to return null response in snmp_get
CACTID: Host[475] SNMP Result: Host did not respond to SNMP
CACTID: FATAL: Cactid Encountered a Segmentation Fault (fork)

There is nothing about host 320/321 i don't understand why...
I have checked host config but it seems to be OK.
I have added hosts with a WWW::Mechanize perl script, so all host has been added the same way...
Note that each time i got same problem for same host numbers...
E:\Cacti\cactid\cactid.exe --verbosity=4 --conf E:\Cacti\cactid\cactid.conf 319 323 work well for 319 and 320, but i got "SNMP Result: Host responded to SNMP" for 321 322 323

i have tracked difference between
E:\Cacti\cactid\cactid.exe --verbosity=5 --conf E:\Cacti\cactid\cactid.conf 323 323
and
E:\Cacti\cactid\cactid.exe --verbosity=5 --conf E:\Cacti\cactid\cactid.conf 319 319

I noticed that SELECT action, hostname, snmp_community, snmp_version, snmp_username, snmp_password, rrd_name, rrd_path, arg1, arg2, arg3, local_data_id, rrd_num, snmp_port, snmp_timeout FROM poller_item WHERE host_id=323 ORDER BY arg1 return nothing

Ok now i don't understand why :)
after looking in poller_item, i did not have any row for host_id > 320
i have added a new device, create graphs and then i got it in poller_item.

And i have found what append... when i run "Rebuild Poller Cache" it take too much time, it's running longer than the php max time value, so poller_item can't be completed (what is stange is that i did not get a php error...)
I leave my "worklog" i think it can be useful if some people get the same problem and make a search on the forum.
Anyway my poller cache is rebuilding (i'have changed php max exec time value) and I hope that this will fixe my Segment fault problem.
But i guess there is a bug in cactid when there is lots of hosts without anything to poll...
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Hmm, that is interesting. Can you please place a bug into the following location indicating such. I will review it when I get a chance.

http://mantis.cacti.net

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?
Jeb
Posts: 38
Joined: Tue May 24, 2005 2:50 am

Post by Jeb »

Sorry but mantis.cacti.net doesn't resolve to any IP...

Using domain server:
Name: ARGO.PYXOS.NET
Host mantis.cacti.net not found: 3(NXDOMAIN)

Using domain server:
Name: PLASMA.QUERX.COM
Host mantis.cacti.net not found: 3(NXDOMAIN)
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

sorry bugs.cacti.net
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?
Jeb
Posts: 38
Joined: Tue May 24, 2005 2:50 am

Post by Jeb »

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

Post by TheWitness »

Jeb,

Can you rebuild cactid 0.8.6i using the latest Cygwin and see if this problem still arises? Also, please try the a more recent version of net-snmp as this would appear to be a net-snmp related issue.

If you look at the code, net-snmp is returning a valid response (aka STATUS == STAT_SUCCESS) but it contains not valid response (aka response == NULL). IMHO, this should never happen. You should have received a STAT_TIMEOUT from Net-SNMP which you did not receive for some reason.

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest