sub getTracker
{
my ($self) = @_;
my $url = HOST() . $URIFromSTDIN;
my $req = HTTP::Request->new(GET => $url);
$req->header('Accept', 'application/xml');
my @credentials = get_system_credentials();
$req->authorization_basic(@credentials[0], @credentials[1]);
my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 },);
$ua->agent("wfa/$VERSION");
my $resp = $ua->request($req);
if ($resp->is_success) {
print $resp->decoded_content;
}
else {
die $resp->status_line;
}
my $output = $resp->decoded_content;
my $ref = xml_in($output);
$ref->{'userAgent'} = $ua;
$ref->{'url'} = $url;
}
above code works fine on RHEL 7.x but on RHEL 8.x it is throwing an error: Unable to contact service url 500 Can't connect to localhost:443 (certificate verify failed)