Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

DBD::TSM says Invalid user id or password

by FloydATC (Deacon)
on Feb 03, 2011 at 13:29 UTC ( #885988=perlquestion: print w/replies, xml ) Need Help??
FloydATC has asked for the wisdom of the Perl Monks concerning the following question:

Esteemed monks, I'm trying to get DBD::TSM to work, but it refuses to accept my administrative username and password. Using Perl v5.8.8 on CentOS 5.4, have installed TIVsm-API-6.1.0-2 and TIVsm-BA-6.1.0-2. My test script is a slight rewrite of the example script ("dbi" was spelled "DBB" and no environment variables were set).
#!/usr/bin/perl -w use DBI; my ($server_name,$user,$password)=("enigsy-ser-backup-01", "########", + "########"); $ENV{'DSM_DIR'} = "/opt/tivoli/tsm/client/ba/bin/"; $ENV{'DSMADMC'} = "dsmadmc"; $ENV{'DSM_CONFIG'} = $ENV{'DSM_DIR'}."dsm.sys"; my $dbh=DBI->connect( "dbi:TSM:$server_name", $user, $password, { RaiseError => 0, PrintError => 0 } ) or die $DBI::errstr; my $sth=$dbh->prepare("query status") or die $dbh->errstr; $sth->execute() or die $sth->errstr(); print "@{$sth->{NAME}}\n"; $sth->dump_results();

The result? Connect: Invalid user id or password '########/########': 255/. at ./testq line 12.

The manual test suggested in the docs works ok, which should confirm that the dsmcadm and the login/password is OK:

[root@ikt-anlu-c5 bin]# dsmadmc -id=######## -pa=######## -se=enigsy-s +er-backup-01 query status IBM Tivoli Storage Manager Command Line Administrative Interface - Version 6, Release 1, Level 0. +2 (c) Copyright by IBM Corporation and other(s) 1990, 2009. All Rights R +eserved. Session established with server ENIGSY-SER-BACKUP-01: Windows Server Version 6, Release 1, Level 3.0 Server date/time: 02/03/2011 14:01:04 Last access: 02/03/2011 13:58 +:20 ANS8000I Server command: 'query status' Storage Management Server for Windows - Version 6, Release 1, Level 3. +0 Server Name: ENIGSY-SER-BACKUP-01 [...]

And here's dsm.sys:

SErvername enigsy-ser-backup-01 COMMMethod TCPip TCPPort 1500 TCPServeraddress passwordaccess generate errorlogretention 14 d * 14 dager, d = delete errorlogname /var/log/dsm.errorlog schedlogretention 14 d schedlogname /var/log/dsm.schedlog managedservices webclient schedule *** Include/exclude Exclude /tmp Exclude /proc Exclude /.../core Exclude.Dir /mnt

I'm looking for someone who has worked with this module before and perhaps knows where to start looking for the cause?

Update: moritz suggested I use tcpdump to inspect the network traffic. DBD::TSM generates none at all.

-- Time flies when you don't know what you're doing

Replies are listed 'Best First'.
Re: DBD::TSM says Invalid user id or password
by Khen1950fx (Canon) on Feb 04, 2011 at 09:48 UTC
    This isn't really an answer but maybe a start. I spent some time debugging it. I couldn't replicate your error; however, I did have a problem with getting $sth->dump_results(); to work---it wouldn't work for me. Another other problem was that I had to set the env var for my dbi_driver. Maybe this will help.
    #!/usr/bin/perl use strict; use warnings; use DBI; use DBD::TSM; $ENV{'DBI_DRIVER'} = "DBM"; $ENV{'DSM_DIR'} = "/opt/tivoli/tsm/client/ba/bin/"; $ENV{'DSMADMC'} = "dsmadmc"; $ENV{'DSM_CONFIG'} = $ENV{'DSM_DIR'} . "dsm.sys"; my @drivers = DBI->available_drivers; print join( ",", @drivers ), "\n"; eval { my ( $server_name, $user, $password ) = ( "enigsy-ser-backup-01", "user", "password" ); }; my $dbh = DBI->connect( "DBD:TSM:enigsy-ser-backup-01", 'user', 'password', { RaiseError => 0, PrintError => 0 } ) or die $DBI::errstr; my $sth = $dbh->prepare("INSERT INTO foo VALUES (1, 2, 3)"); $sth->execute() or die $sth->errstr(); print @{ $sth->{NAME} }, "\n"; $dbh->disconnect or warn $dbh->errstr;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://885988]
Approved by marto
Front-paged by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-09-20 10:21 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (235 votes). Check out past polls.