Faintly_Lucky
Jan 28, 2013Nimbostratus
Error while establishing device trust
Not sure what's going on here. Any ideas?
Thanks in advance,
Chris
[chris@luckylx02 bin]$ f5bdt2 "$sglb" "$mg2" "$b1n" "$b2n"
SOAP-ENV:Server Exception caught in Management::urn:iControl:Management/Trust::add_authority_device()
Exception: Common::OperationFailed
primary_error_code : 16908289 (0x01020001)
secondary_error_code : 0
error_string : Trust daemon returned an error: Could not examine network interfaces: CsO/w78D
Code:
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0;
use SOAP::Lite;
use MIME::Base64;
BEGIN { push (@INC, '/home/chris'); }
use iControlTypeCast;
$sHost = $ARGV[1];
my $sUID = admin;
my $sPWD = $ARGV[0];
my $b1n = $ARGV[2];
my $b2n = $ARGV[3];
----------------------------------------------------------------------------
checkResponse makes sure the error isn't a SOAP error
----------------------------------------------------------------------------
sub checkResponse() {
my ($soapResponse) = (@_);
if ( $soapResponse->fault )
{
print $soapResponse->faultcode, " ", $soapResponse->faultstring, "\n";
exit();
}
}
sub buildtrust {
$soapResponse =
$dtrmgmt->add_authority_device
(
SOAP::Data->name (address => 10.255.255.3),
SOAP::Data->name ( username => admin ),
SOAP::Data->name ( password => XXXXXXXX ),
SOAP::Data->name ( device_object_name => "$b1n" ),
SOAP::Data->name ( browser_cert_serial_number => "" ),
SOAP::Data->name ( browser_cert_signature => "" ),
SOAP::Data->name ( browser_cert_sha1_fingerprint => "" ),
SOAP::Data->name ( browser_cert_md5_fingerprint => "" ),
);
&checkResponse($soapResponse);
$soapResponse =
$dgmgmt->create
(
SOAP::Data->name (device_groups => [sg-sf] ),
SOAP::Data->name ( type => [DGT_FAILOVER] ),
);
&checkResponse($soapResponse);
$soapResponse =
$dgmgmt->add_device
(
SOAP::Data->name (device_groups => [sg-sf] ),
SOAP::Data->name ( devices => [$b1n , $b2n] ),
);
&checkResponse($soapResponse);
}
$dtrmgmt = SOAP::Lite
-> uri('urn:iControl:Management/Trust')
-> readable(1)
-> proxy("");
eval {
$dtrmgmt->transport->http_request->header( 'Authorization' => 'Basic '
. MIME::Base64::encode("$sUID:$sPWD", ''));
};
$dgmgmt = SOAP::Lite
-> uri('urn:iControl:Management/DeviceGroup')
-> readable(1)
-> proxy("");
eval {
$dgmgmt->transport->http_request->header( 'Authorization' => 'Basic '
. MIME::Base64::encode("$sUID:$sPWD", ''));
};
Main Program Logic
&buildtrust;
[chris@luckylx02 bin]$ f5bdt2 "$sglb" "$mg2" "$b1n" "$b2n"
SOAP-ENV:Server Exception caught in Management::urn:iControl:Management/Trust::add_authority_device()
Exception: Common::OperationFailed
primary_error_code : 16908289 (0x01020001)
secondary_error_code : 0
error_string : Trust daemon returned an error: Could not examine network interfaces: CsO/w78D