Skip Menu |

This queue is for tickets about the DBD-TSM CPAN distribution.

Report information
The Basics
Id: 51464
Status: open
Priority: 0/
Queue: DBD-TSM

People
Owner: Nobody in particular
Requestors: nicolas.guiot [...] risc-group.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bug in DBD-TSM
Date: Thu, 12 Nov 2009 11:10:52 +0100
To: bug-DBD-TSM [...] rt.cpan.org
From: Nicolas GUIOT <nicolas.guiot [...] risc-group.com>
Hi, I'm trying a simple script to connect to a TSM server, I can run the script once, but then I have to wait (I'd say 30 min) t run it again : is seems I can't "disconnect" from the DB the script : #!/usr/bin/perl -w use strict; use DBI; use DBD::TSM; my ($server_name,$user,$password)=('server_name', 'myuser', 'mypass'); my $dbh=DBI->connect("DBI:TSM:$server_name",$user,$password, {RaiseError => 0, PrintError => 0}) or die $DBI::errstr; my $sth=$dbh->prepare("select node_name,node_type from nodes where node_name='mynode'") or die $dbh->errstr; $sth->execute() or die $sth->errstr(); print "@{$sth->{NAME}}\n"; $sth->dump_results(); $sth->finish; $dbh->disconnect or warn "Disconnection failed: $!\n"; exit; The execution : $ perl test.pl 0 rows Disconnection failed: $ perl test.pl Connect: Invalid user id or password 'myuser/mypass': 255/. at test.pl line 17. My environment : Linux lapcolas 2.6.26-1-686 #1 SMP Fri Mar 13 18:08:45 UTC 2009 i686 GNU/Linux This is perl, v5.10.0 built for i486-linux-gnu-thread-multi debian lenny DBD-TSM installed with cpan, version 0.14 If you need more info on my config, I can give you some feedback. 1st time I submit a bug, I hope I don't forget anything... Nicolas
Subject: Re: [rt.cpan.org #51464] Bug in DBD-TSM
Date: Tue, 17 Nov 2009 21:21:50 +0100
To: bug-DBD-TSM [...] rt.cpan.org
From: Laurent <bendavid.laurent [...] free.fr>
Could you give me your version of TSM Server and dsmadmc (TSM Client you use to connect) ? The module launch dsmadmc in background (you could track this 'ps' command). It's seems to be an issue between your dsmadmc and the TSM Server (pb of socket close). Normally, you could reproduce the problem with dsmadmc. If it's not the issue, you could track dsmadmc session of DBD::TSM with query session on an TSM Server interface. In last, I think it's not the issue but your only have to call DBI in your script. DBI load DBD::TSM has needeed : ---------------------------------- use DBI; my $dbh=DBI->connect("DBI:TSM:$server_name",$user,$password, {RaiseError => 0, PrintError => 0}) or die $DBI::errstr; my $sth=$dbh->prepare("select node_name,node_type from nodes where node_name='mynode'") or die $dbh->errstr; $sth->execute() or die $sth->errstr(); print "@{$sth->{NAME}}\n"; $sth->dump_results(); $sth->finish; $dbh->disconnect or warn "Disconnection failed: $!\n"; exit; Last, could you use Benchmark module to have some time information for instance ? For the DBD::TSM point of view disconnect is not very important. Thank you for information and other test. Nicolas GUIOT via RT a écrit Show quoted text
> Thu Nov 12 05:14:41 2009: Request 51464 was acted upon. > Transaction: Ticket created by nicolas.guiot@risc-group.com > Queue: DBD-TSM > Subject: Bug in DBD-TSM > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: nicolas.guiot@risc-group.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=51464 > > > > Hi, I'm trying a simple script to connect to a TSM server, I can run the script once, but then I have to wait (I'd say 30 min) t run it again : is seems I can't "disconnect" from the DB > > the script : > > #!/usr/bin/perl -w > > use strict; > use DBI; > use DBD::TSM; > > my ($server_name,$user,$password)=('server_name', 'myuser', 'mypass'); > > my $dbh=DBI->connect("DBI:TSM:$server_name",$user,$password, > {RaiseError => 0, > PrintError => 0}) or die $DBI::errstr; > > > my $sth=$dbh->prepare("select node_name,node_type from nodes where node_name='mynode'") or > die $dbh->errstr; > $sth->execute() or die $sth->errstr(); > > print "@{$sth->{NAME}}\n"; > $sth->dump_results(); > > > $sth->finish; > $dbh->disconnect or warn "Disconnection failed: $!\n"; > exit; > > > The execution : > $ perl test.pl > > 0 rows > Disconnection failed: > $ perl test.pl > Connect: Invalid user id or password 'myuser/mypass': 255/. at test.pl line 17. > > My environment : > Linux lapcolas 2.6.26-1-686 #1 SMP Fri Mar 13 18:08:45 UTC 2009 i686 GNU/Linux > > This is perl, v5.10.0 built for i486-linux-gnu-thread-multi > > debian lenny > DBD-TSM installed with cpan, version 0.14 > > If you need more info on my config, I can give you some feedback. > > 1st time I submit a bug, I hope I don't forget anything... > > Nicolas > > > > >
Subject: Re: [rt.cpan.org #51464] Bug in DBD-TSM
Date: Wed, 18 Nov 2009 10:29:14 +0100
To: bug-DBD-TSM [...] rt.cpan.org
From: Nicolas GUIOT <nicolas.guiot [...] risc-group.com>
On Tue, 17 Nov 2009 15:23:07 -0500 Laurent via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=51464 > > > Could you give me your version of TSM Server and dsmadmc (TSM Client > you use to connect) ?
Command Line Administrative Interface - Version 5, Release 3, Level 4.0 Server versions : Server Version 5, Release 3, Level 3.0 Server Version 5, Release 4, Level 0.0 Server Version 5, Release 5, Level 2.0 Show quoted text
> > The module launch dsmadmc in background (you could track this 'ps' > command).
Tried on the 5 different servers I have (with 3 different verions), all the same behaviour. Once the program ran for the 1st time, I can't see any "dsadmc" running (ran 'ps' in an other console to check). One thing to note : If I connect (successfully) to server A on the first time, then I can't connect to ANY other server in the following minutes, which lets me think it's a client related issue... Show quoted text
> > It's seems to be an issue between your dsmadmc and the TSM Server (pb > of socket close). Normally, you could reproduce the problem with > dsmadmc.
Whenever I use dsmadmc to connect to any of my servers, I never have any trouble. When I ask to disconnect ("quit"), it just disconnects, no trouble, no process running in background... Show quoted text
> > If it's not the issue, you could track dsmadmc session of DBD::TSM > with query session on an TSM Server interface.
OK, I run the script (successsfully) once, It outputs me the "Disconnection failed:", then on a TSM server, I run a "q sessions" : NOTHING related to my script :( Show quoted text
> > In last, I think it's not the issue but your only have to call DBI in > your script. DBI load DBD::TSM has needeed : > > ---------------------------------- > use DBI; > > my $dbh=DBI->connect("DBI:TSM:$server_name",$user,$password, > {RaiseError => 0, > PrintError => 0}) or die $DBI::errstr; > > > my $sth=$dbh->prepare("select node_name,node_type from nodes where > node_name='mynode'") or die $dbh->errstr; > $sth->execute() or die $sth->errstr(); > > print "@{$sth->{NAME}}\n"; > $sth->dump_results(); > > > $sth->finish; > $dbh->disconnect or warn "Disconnection failed: $!\n"; > exit; >
OK, corrected, you were right on this. Show quoted text
> Last, could you use Benchmark module to have some time information > for instance ?
WOWWWWW, that's strange... I was just finishing this email, (he wants benchmark ? let's add benchmark), so google --> http://articles.techrepublic.com.com/5100-10878_11-5278558.html I add the code and... Wooow.. What's that ? it *just* works !! Well... If I run the program let's say twice in a half second, the second time will complain as before, but if I wait for one or 2 seconds, I still have the "disconnection failed", but I can run it again !! the code now lokks like this : ------------ #!/usr/bin/perl -w #################### # USES # #################### use strict; use DBI; use Benchmark; #use DBD::TSM; #################### # Variables # #################### my ($start,$end,$diff); # start timer $start = new Benchmark; #################### # DB # #################### my ($server_name,$user,$password)=('server_name', 'myuser', 'mypass'); my $dbh=DBI->connect("DBI:TSM:$server_name",$user,$password, {RaiseError => 0, PrintError => 0}) or die $DBI::errstr; my $sth=$dbh->prepare("select node_name,node_type from nodes where \ node_name='mynode'") or die $dbh->errstr; $sth->execute() or die $sth->errstr(); print "@{$sth->{NAME}}\n"; $sth->dump_results(); $sth->finish; $dbh->disconnect or warn "Disconnection failed: $!\n"; # end timer $end = new Benchmark; # calculate difference $diff = timediff($end, $start); # report print "Time taken was ", timestr($diff, 'all'), " seconds\n"; exit; ------------ I really don't understand why the behaviour has changed this way, but now it seems to work, at least enough to be usable... Show quoted text
> > For the DBD::TSM point of view disconnect is not very important. > > Thank you for information and other test.
Thnak YOU for showing interest in my problem :) Bye Nicolas Show quoted text
> > Nicolas GUIOT via RT a écrit
> > Thu Nov 12 05:14:41 2009: Request 51464 was acted upon. > > Transaction: Ticket created by nicolas.guiot@risc-group.com > > Queue: DBD-TSM > > Subject: Bug in DBD-TSM > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: nicolas.guiot@risc-group.com > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=51464 > > > > > > > Hi, I'm trying a simple script to connect to a TSM server, I can > > run the script once, but then I have to wait (I'd say 30 min) t run > > it again : is seems I can't "disconnect" from the DB > > > > the script : > > > > #!/usr/bin/perl -w > > > > use strict; > > use DBI; > > use DBD::TSM; > > > > my ($server_name,$user,$password)=('server_name', 'myuser', > > 'mypass'); > > > > my $dbh=DBI->connect("DBI:TSM:$server_name",$user,$password, > > {RaiseError => 0, > > PrintError => 0}) or die $DBI::errstr; > > > > > > my $sth=$dbh->prepare("select node_name,node_type from nodes where > > node_name='mynode'") or die $dbh->errstr; > > $sth->execute() or die $sth->errstr(); > > > > print "@{$sth->{NAME}}\n"; > > $sth->dump_results(); > > > > > > $sth->finish; > > $dbh->disconnect or warn "Disconnection failed: $!\n"; > > exit; > > > > > > The execution : > > $ perl test.pl > > > > 0 rows > > Disconnection failed: > > $ perl test.pl > > Connect: Invalid user id or password 'myuser/mypass': 255/. at > > test.pl line 17. > > > > My environment : > > Linux lapcolas 2.6.26-1-686 #1 SMP Fri Mar 13 18:08:45 UTC 2009 > > i686 GNU/Linux > > > > This is perl, v5.10.0 built for i486-linux-gnu-thread-multi > > > > debian lenny > > DBD-TSM installed with cpan, version 0.14 > > > > If you need more info on my config, I can give you some feedback. > > > > 1st time I submit a bug, I hope I don't forget anything... > > > > Nicolas > > > > > > > > > >
>