Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

possibly a protocol issue: Status read failed: at /usr/local/share/perl5/Net/HTTP/Methods.pm line 282 #104

Open
joschi99 opened this issue Apr 20, 2022 · 12 comments
Labels

Comments

@joschi99
Copy link

After updating to connector version 3.2.3 we have randomly this error launching the discovery command - Details: UNKNOWN: VMWare error (verbose mode for more details)

VMware connector log shows in this case this error

2022-04-20 09:06:07 - vpshere 'XXX' handler asking: {"vsphere_username":null,"case_insensitive":null,"prettify":1,"timeout":null,"vsphere_password":null,"warning_connector_status":null,"resource_type":"esx","command":"discovery","connector_port":"5700","sampling_period":null,"container":"XXX","unknown_connector_status":null,"vsphere_address":null,"time_shift":0,"identity":"client-e7066f08e5614e979fec8a6e8c5d23c0","connector_hostname":"127.0.0.1","critical_connector_status":null}
2022-04-20 09:06:09 - vpshere 'XXX' handler asking: {"vsphere_username":null,"case_insensitive":null,"prettify":1,"timeout":null,"vsphere_password":null,"warning_connector_status":null,"resource_type":"vm","command":"discovery","connector_port":"5700","sampling_period":null,"container":"XXX","unknown_connector_status":null,"vsphere_address":null,"time_shift":0,"identity":"client-e72b500aca0e4f5bbb4dba0bd000ba35","connector_hostname":"127.0.0.1","critical_connector_status":null}
2022-04-20 09:06:09 - 'XXX' SOAP request error - possibly a protocol issue: Status read failed:  at /usr/local/share/perl5/Net/HTTP/Methods.pm line 282.

@garnier-quentin
Copy link
Contributor

You don't have that error with connector 3.2.2 ? It's the host discovery ?

@joschi99
Copy link
Author

With version 3.2.2 there is no error. Problem occurs launching the discovery mode, but occasionaly. On a internal ESXi standalone host we have found another issue on version 3.2.3 (with 3.2.2 works without any problem):

perl centreon_plugins.pl --plugin=apps::vmware::connector::plugin --mode=discovery --connector-hostname=127.0.0.1 --container='esxi_2_central' --resource-type=esx --prettify
2022-04-20 09:10:14 - vpshere 'esxi_2_central' handler asking: {"vsphere_username":null,"case_insensitive":null,"prettify":1,"timeout":null,"vsphere_password":null,"warning_connector_status":null,"resource_type":"esx","command":"discovery","connector_port":"5700","sampling_period":null,"container":"esxi_2_central","unknown_connector_status":null,"vsphere_address":null,"time_shift":0,"identity":"client-c4d9ee4a25a14c4fbd32a21c86bc369d","connector_hostname":"127.0.0.1","critical_connector_status":null}
2022-04-20 09:10:14 - 'esxi_2_central' Can't call method "type" on an undefined value at /usr/local/share/perl5/VMware/VICommon.pm line 1694.

@garnier-quentin
Copy link
Contributor

I have added custom attributes. Maybe it's not available on a ESXI:

my $customFields = {};
    my $entries = centreon::vmware::common::get_view($self->{connector}, $self->{connector}->{session1}->get_service_content()->customFieldsManager);
    if (defined($entries->{field})) {
        foreach (@{$entries->{field}}) {
            $customFields->{ $_->{key} } = $_->{name};
        }
    }

@joschi99
Copy link
Author

Yes, could be that a standalone ESXi has no custom attributes. The first error occurs on a cluster (tested on different clusters), but randomly.

@garnier-quentin
Copy link
Contributor

Could you patch your version 3.2.3 and test again ?
https://github.com/centreon/centreon-vmware/pull/105/files

@joschi99
Copy link
Author

The fix seems solving the problem on standalone hosts. The sporadic problem remains

@garnier-quentin
Copy link
Contributor

The problem should be on previous version also ? If you have that error, do you have a real issue ? or only a log.

@joschi99
Copy link
Author

I have found a way to reproduce the problem:

  • systemctl restart centreon_vmware.service
  • centreon_plugins.pl --connector-hostname=127.0.0.1 --connector-port=5700 --container=sama-vcenter --plugin=apps::vmware::connector::plugin --custommode=connector --mode=discovery --resource-type=esx --prettify
  • centreon_plugins.pl --connector-hostname=127.0.0.1 --connector-port=5700 --container=sama-vcenter --plugin=apps::vmware::connector::plugin --custommode=connector --mode=discovery --resource-type=vm --prettify --debug
UNKNOWN: VMWare error (verbose mode for more details)
{"identity":"client-c23731f71a184a7096a112ffd0d9fa15","data":{"end_time":1650523785,"start_time":1650523785,"duration":0,"discovered_items":66,
....
},"short_message":"VMWare error (verbose mode for more details)","extra_message":"SOAP request error - possibly a protocol issue: Status read failed:  at /usr/local/share/perl5/Net/HTTP/Methods.pm line 282.\n\n","vmware_connector_version":"3.2.2","code":-1}
SOAP request error - possibly a protocol issue: Status read failed:  at /usr/local/share/perl5/Net/HTTP/Methods.pm line 282.

@joschi99
Copy link
Author

But its not related to version 3.2.3, same problem also on 3.2.2

@garnier-quentin
Copy link
Contributor

The error comes from the sdk or the lwp library (too old maybe). Maybe you should try to update the perl sdk vmware.

@joschi99
Copy link
Author

At the moment we have installed:
perl-VMware-vSphere.x86_64 6.5.0-4566394.1.el7.centos @centreon-stable

Are the any newer version available?

@garnier-quentin
Copy link
Contributor

You should try the sdk 6.7 or 7.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants