Intermittent Segmentation Fault with check_vmware_api

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Sargento
Posts: 42
Joined: Tue Feb 23, 2021 6:32 am

Re: Intermittent Segmentation Fault with check_vmware_api

Post by Sargento »

Hello,

I will upload another perl trace below that 100% had a segmentation fault.

Also, here is the output of the command you requested...

Code: Select all

Net::SSLeay     1.55
Net::SSLeay::Handle     0.61
Crypt::SSLeay   0.64
Crypt::SSLeay::CTX      undef
Crypt::SSLeay::Conn     undef
Crypt::SSLeay::Err      undef
Crypt::SSLeay::MainContext      undef
Crypt::SSLeay::X509     undef
vendor_perl::Net::SSLeay        1.55
vendor_perl::Net::SSLeay::Handle        0.61
vendor_perl::Crypt::SSLeay      0.64
vendor_perl::Crypt::SSLeay::CTX undef
vendor_perl::Crypt::SSLeay::Conn        undef
vendor_perl::Crypt::SSLeay::Err undef
vendor_perl::Crypt::SSLeay::MainContext undef
vendor_perl::Crypt::SSLeay::X509        undef
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Intermittent Segmentation Fault with check_vmware_api

Post by ssax »

Please send the output of these commands, keep running the last one until you get a segfault:

Code: Select all

su - nagios
perl -e "print qq(@INC)"
cpan -i Crypt::SSLeay 
/usr/local/nagios/libexec/check_vmware_api.pl -f creds.file -l cpu -w 80 -c 90 -H host
If that doesn't resolve it, please create a ticket for this and include a link back to this forum thread so we can get a remote session setup:

https://support.nagios.com/tickets/

Thank you!
Sargento
Posts: 42
Joined: Tue Feb 23, 2021 6:32 am

Re: Intermittent Segmentation Fault with check_vmware_api

Post by Sargento »

Here is the output.

Code: Select all

perl -e "print qq(@INC)"
/usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5
It appears to have resolved the seg fault. I now get the below output when running the check command, which could just be that the host/user was unconfigured by the VM team.

Code: Select all

UNKNOWN - Error connecting to server at 'Omitted': Perhaps host is not a vCenter or ESX server
Please close.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Intermittent Segmentation Fault with check_vmware_api

Post by ssax »

Does this show any additional data?

Code: Select all

/usr/local/nagios/libexec/check_vmware_api.pl -f creds.file -l cpu -w 80 -c 90 -H host -vvv --trace=4
Sargento
Posts: 42
Joined: Tue Feb 23, 2021 6:32 am

Re: Intermittent Segmentation Fault with check_vmware_api

Post by Sargento »

Ah............

So that's not good.

I ran it with trace and it worked once and then segmentation faulted the next time...

Here is the seg fault

Code: Select all

/usr/local/nagios/libexec/check_vmware_api.pl -f /file/path -l cpu -w 80 -c 90 -H hostnameomitted -vvv --trace=4
[extra-opts] check_vmware_api.pl -f /file/path -l cpu -w 80 -c 90 -H hostnameomitted -vvv --trace=4
Segmentation fault
I will attach the output for the working command worked before segfaulting right after.
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Intermittent Segmentation Fault with check_vmware_api

Post by ssax »

Please create a ticket for this and include a link back to this forum thread so we can get a remote session setup:

https://support.nagios.com/tickets/

Thank you!
Sargento
Posts: 42
Joined: Tue Feb 23, 2021 6:32 am

Re: Intermittent Segmentation Fault with check_vmware_api

Post by Sargento »

Here is the output.

Code: Select all

$ cpan -l | grep -i ssleay
Net::SSLeay     1.55
Net::SSLeay::Handle     0.61
Crypt::SSLeay   0.64
Crypt::SSLeay::CTX      undef
Crypt::SSLeay::Conn     undef
Crypt::SSLeay::Err      undef
Crypt::SSLeay::MainContext      undef
Crypt::SSLeay::X509     undef
vendor_perl::Net::SSLeay        1.55
vendor_perl::Net::SSLeay::Handle        0.61
vendor_perl::Crypt::SSLeay      0.64
vendor_perl::Crypt::SSLeay::CTX undef
vendor_perl::Crypt::SSLeay::Conn        undef
vendor_perl::Crypt::SSLeay::Err undef
vendor_perl::Crypt::SSLeay::MainContext undef
vendor_perl::Crypt::SSLeay::X509        undef
It also appear to possibly segfault when the check is ran consecutively. Like if I went and ran it for the first time in a while it would not segfault, but if I ran it after running it once, then it would seg fault usually. Perhaps this is just a coincidence but I thought it should be said.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Intermittent Segmentation Fault with check_vmware_api

Post by ssax »

If you increase the check_interval on the services does the segfault stop occurring?
Sargento
Posts: 42
Joined: Tue Feb 23, 2021 6:32 am

Re: Intermittent Segmentation Fault with check_vmware_api

Post by Sargento »

It may but not reliably, also we have multiple checks that we would like to run so it may be incredibly hard to run all these checks reliably with the space gaps.
Sargento
Posts: 42
Joined: Tue Feb 23, 2021 6:32 am

Re: Intermittent Segmentation Fault with check_vmware_api

Post by Sargento »

The ticket has been made 8-)
Locked