Need Help - DBI::Proxy and PlServer Issue

"Vishal K. Gandhi" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
Hi,

We are a well know institute specializing in global learnings located in 
NJ, USA.  I work with Systems and Security department of the institute.  
We were actually looking for something like DBI ProxyServer and found 
the same very interesting and powerful as well.  We are on our way to 
set it up and experiencing little trouble while encrypting traffic 
between two development servers.

We are actually experiencing a strange issue while setting up dbiproxy 
server and client environment and I thought you might be the person who 
can provide me some directions to resolve this as this seems related to 
*DBI* and/or *RPC PlServer*.  Please find below the details regarding it.

We've setup dbiproxy on one of our servers.  A perl script from other 
script is able to connect to it and also able to perform intended 
database operation with no problems without encryption.  But, we are 
experiencing problem when we try to enable encryption for the traffic 
between client and dbiproxy server.

The client uses cipher=IDEA.  We've checked for if we included required 
'use' statements as well.  Perl version being used here is 5.10.1 and 
Storable version is 2.30.  When we execute the client script we get 
following error.

=> failed: Cannot log in to DBI::ProxyServer: Unexpected EOF from server 
at /usr/local/share/perl5/RPC/PlClient.pm line 79.


Perl version being used on dbiproxy server is 5.8.8 and Storable version 
is 2.15.  When I execute "instmodsh" and "perldoc perllocal", none of 
these commands list "Storable" module even though I see files for this 
module on my file system.  I am not sure if this behaviour is related to 
the problem we are experiencing.  We see following error on the server 
in "messages" log file after enabling debugging mode for dbiproxy.

=> Child died: Storable binary image v118.133 more recent than I am 
(v2.7) at lib/Storable.pm (autosplit into lib/auto/Storable/thaw.al) 
line 366, at /usr/lib/perl5/vendor_perl/5.8.8/RPC/PlServer/Comm.pm line 179

I've also attached the perl script we use as a client with encryption 
from one of our server.  Please, take a look at it if you think we could 
change the code to resolve this issue.

We actually don't understand why it works fine without encryption and 
only gives "Storable Image Version" error when we try to encrypt traffic 
between client and server.
It will be very helpful if someone can explain why this happens and how 
do we resolve this issue?

Thanks a lot for your help.


--  Vishal Gandhi --
test-script.pl (application/x-perl, 976 B)
# file: test-script.pl
# call me like this: perl test-script.pl user password

use strict;
use warnings;
use DBI;
use DBD::mysql;
use Crypt::IDEA;

my $key = 'lugkm3wupsvh3n1ge9r8c7q5ccx8q3qa';
my $userkey = 'mqd3tcerbd456g4ddenaqhebago3x34sz';
my $user = shift || die "Usage: $0 user password";
my $pass = shift || die "Usage: $0 user password";
my $config = {
        dsn_at_proxy => "dbi:mysql:myldap",
        proxy => "hostname=myhost.fdu.edu;port=3000;cipher=IDEA;key=$key;usercipher=IDEA;userkey=$userkey"
};
my $dsn = sprintf "dbi:Proxy:%s;dsn=%s",
        $config->{proxy},
        $config->{dsn_at_proxy};

my $dbh = DBI->connect( $dsn, $user, $pass )
        || die "connect did not work: $DBI::errstr";

        my $sth = $dbh->prepare('select column1,column2,column3 from TESTTABLE');
        $sth->execute
        or die "SQL Error: $DBI::errstr\n";
        while (my @row = $sth->fetchrow_array) {
            print "@row\n";
        } 
$dbh->disconnect;
exit;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.