Reply

Perl API Auth - status code 1006

Techie
Posts: 5
5007     0

I have perms to login to the GUI (using AD auth) and can do Curl commands (again with my AD creds) but can't get the Perl API to reliably auth with those same creds. It worked for a while, but then seemed to lock me out. I have checked the user / passwd combo, and it works fine with GUI and Curl. Any ideas?

 

DEBUG: .../IO/Socket/SSL.pm:1805: new ctx 491298800
DEBUG: .../IO/Socket/SSL.pm:449: socket not yet connected
DEBUG: .../IO/Socket/SSL.pm:451: socket connected
DEBUG: .../IO/Socket/SSL.pm:469: ssl handshake not started
DEBUG: .../IO/Socket/SSL.pm:513: not using SNI because openssl is too old
DEBUG: .../IO/Socket/SSL.pm:527: set socket to non-blocking to enforce timeout=180
DEBUG: .../IO/Socket/SSL.pm:540: Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:550: ssl handshake in progress
DEBUG: .../IO/Socket/SSL.pm:560: waiting for fd to become ready: SSL wants a read first
DEBUG: .../IO/Socket/SSL.pm:580: socket ready, retrying connect
DEBUG: .../IO/Socket/SSL.pm:540: Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:550: ssl handshake in progress
DEBUG: .../IO/Socket/SSL.pm:560: waiting for fd to become ready: SSL wants a read first
DEBUG: .../IO/Socket/SSL.pm:580: socket ready, retrying connect
DEBUG: .../IO/Socket/SSL.pm:540: Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:550: ssl handshake in progress
DEBUG: .../IO/Socket/SSL.pm:560: waiting for fd to become ready: SSL wants a read first
DEBUG: .../IO/Socket/SSL.pm:580: socket ready, retrying connect
DEBUG: .../IO/Socket/SSL.pm:540: Net::SSLeay::connect -> 1
DEBUG: .../IO/Socket/SSL.pm:595: ssl handshake done
DEBUG: .../IO/Socket/SSL.pm:1842: free ctx 491298800 open=491298800
DEBUG: .../IO/Socket/SSL.pm:1850: OK free ctx 491298800
$VAR1 = bless( {
  'connection_timeout' => undef,
  'master' => 'infoblox.domain.com',
  'ibap_server' => undef,
  'server_version' => '7.3.11-348103',
  'statuscode' => 1006,
  'default_partial_subobjects' => 0,
  'statusdetail' => 'Creating session with the server failed.',
  'verify_hostname' => 0,
  'extensible_attribute_def_cache' => undef,
  'username' => undef,
  'smart_folder_query_meta_cache' => undef,
  'timeout' => undef,
  'IAC' => undef,
  'limit' => undef,
  'smart_folder_query_meta_cache_by_id' => undef
}, 'Infoblox::Session' );

 

Here is my perl code, just in case I messed something up:

 

#!/usr/bin/perl

use Infoblox;
use Data::Dumper;
use IO::Socket::SSL qw(debug3);

my $session = Infoblox::Session->new(
        'master' => 'infoblox.domain.com',
        'username' => 'username',
        'password' => 'password',
        'verify_hostname' => 0
);

@ip_objects = $session->get( 'object' => 'Infoblox::IPAM::Address',
                             'address' => '172.24.190.19'
);


print Dumper($session);

\

Re: Perl API Auth - status code 1006

Adviser
Posts: 141
5008     0

Hi,

 

Did you upgrade/update Perl before that? I saw similar issues, they might be related to a certificate checks.

+ if you upgraded your NIOS do not forget to update perl libraries, othervice it will not work.

 

BR,

Vadim

Re: Perl API Auth - status code 1006

Techie
Posts: 12
5008     0

 

I'm seeing the same problem. I can connect from one server but not from another. Can you share specfically what needs to be updated and to what version(s)?

Re: Perl API Auth - status code 1006

Techie
Posts: 10
5008     0

@ton10291:  To update the version of Infoblox.pm running on your workstation, so that it matches the PAPI veresion running on the Grid you are talking to, you must force install/reinstall Infoblox.pm on your workstation.  If you are using ActiveState Perl, you can do that like this:

 

ppm install --force https://<ip-of-your-grid-master>/api/dist/ppm/Infoblox.ppd

 

If you are using another perl, or linux, you will need to either use CPAN:Smiley Frustratedite or (better) download the module from the Grid Master and install it from the tarball.  Here is how:

 

Get the tgz tarball from here and save it to a directory you have WR access to:

https://<ip-of-your-grid-master>/api/dist/CPAN/authors/id/INFOBLOX/Infoblox-X.nnnnnnnnnnnnn.tar.gz

 

Then:

$ tar zxf *.tgz

$ perl Makefile.PL
$ make
$ make test
$ make install

 

hth,

 

David

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You