I'm creating a perl script that connects to the RHN, however I seem to be struggling.
The code I have is this:
#!/usr/bin/perl
use Frontier::Client;
my $HOST = 'xmlrpc.rhn.redhat.com';
my $client = new Frontier::Client(url => "https://$HOST/rpc/api", debug=>1);
my $ver = $client->call('api->getVersion');
print "$ver\n";
This should simply connect to RHN and get the version of the API. However it returns the following:
---- request ----
<?xml version="1.0"?>
<methodCall>
<methodName>api->getVersion</methodName>
<params>
</params>
</methodCall>
500 Connect failed: connect: Connection timed out; Connection timed out
Which I presume is an HTTP 500, and so I'm getting through to the server?
I can't ping the host, though can resolve it. I can access RHN using rhnreg_ks, so I'm not sure what's going wrong :/ The script will later do more and is currently more PoC, which isn't working out too well!