Subject: | jmx4perl fails because of ssl_opts with older libwww-perl |
After upgrading from 1.06 to 1.07, some scripts fail with:
Unrecognized LWP::UserAgent options: ssl_opts at /usr/share/perl5/vendor_perl/JMX/Jmx4Perl/Agent.pm line 129
After debugging, this seems to come from the following change:
- my $ua = JMX::Jmx4Perl::Agent::UserAgent->new();
+ # We don't verify Hostnames by default, since the information we are
+ # sending is typically not critical. Also, we don't have yet a way to
+ # configure a keystore, so this is the only chance for now. Ask me to add
+ # host certificate verification if wanted.
+ my $ua = JMX::Jmx4Perl::Agent::UserAgent->new(ssl_opts => { verify_hostname => 0 });
On the failing machines, we use a quite old libwww-perl that does not support the ssl_opts option: perl-libwww-perl-5.833-2.el6.noarch. Since this rpm comes with the OS, we cannot upgrade.
The ssl_opts option should be used only if supported by the underlying LWP::UserAgent module...