I'd suggest you do all testing on unix at both ends (with a different
driver) using mode single. Get something working then change just
one thing at a time til it breaks. Use truss (eg on Solaris) to see
what the process is doing if it hangs.

Meanwhile, has anyone else had similar problems?

Tim.


On Tue, Oct 29, 2002 at 04:27:59PM +0000, oliver wrote:
> I'm trying to get DBD::Proxy to work under Win32 to allow me to talk to
> a SQL Server 7 database.
> 
> I can connect to the database directly under Win32 using DBD::ODBC and
> DBD::ADO, but when I configure up to use DBD::Proxy, the client just
> hangs when it tries to connect.
> 
> 
> Server output:
> C:\>dbiproxy --configfile c:\dbiproxy.conf
> Tue Oct 29 09:59:40 2002 debug, 0, Server starting in operation mode
> threads
> Tue Oct 29 09:59:40 2002 notice, 0, Server starting
> Tue Oct 29 09:59:40 2002 debug, 0, Writing PID to c:/temp/dbiproxy.pid
> Tue Oct 29 09:59:46 2002 debug, 0, Connection from 193.32.60.39, port
> 3388
> Tue Oct 29 09:59:46 2002 debug, 0, Child clone:
> DBI::ProxyServer=HASH(0x1e3e9c4)
> 
> 
> Tue Oct 29 09:59:49 2002 debug, 1, New child starting
> (DBI::ProxyServer=HASH(0x2
> 760d6c)).
> Tue Oct 29 09:59:49 2002 debug, 1, Accepting client from 193.32.60.39,
> port 3388
> [client hangs at this point]
> 
> 
> 
> If I try running the same client script under Linux, the client crashes
> with the following error:
> 
> $ perl client_proxy3.pl 
> About to connect...
> DBI->connect(hostname=193.32.60.39;port=3333;dsn=dbi:ODBC:OT_TEST_1)
> failed: Cannot log in to DBI::ProxyServer: Unexpected EOF from server
> at /usr/local/lib/perl5/site_perl/5.6.0/RPC/PlClient.pm line 83.
>  at client_proxy3.pl line 9
> $
> 
> 
> While the server reports:
> C:\>dbiproxy --configfile c:\dbiproxy.conf
> Tue Oct 29 09:58:58 2002 debug, 0, Server starting in operation mode
> threads
> Tue Oct 29 09:58:58 2002 notice, 0, Server starting
> Tue Oct 29 09:58:58 2002 debug, 0, Writing PID to c:/temp/dbiproxy.pid
> Tue Oct 29 09:58:59 2002 debug, 0, Connection from 193.32.60.31, port
> 2157
> Tue Oct 29 09:58:59 2002 debug, 0, Child clone:
> DBI::ProxyServer=HASH(0x1e3e9c4)
> 
> 
> Tue Oct 29 09:59:02 2002 debug, 1, New child starting
> (DBI::ProxyServer=HASH(0x2
> 760d6c)).
> Tue Oct 29 09:59:02 2002 debug, 1, Accepting client from 193.32.60.31,
> port 2157
> 
> Tue Oct 29 09:59:02 2002 debug, 1, Client logs in: Application
> dbi:ODBC:OT_TEST_
> 1, version 0.2003, user ot_test_user_1
> Tue Oct 29 09:59:02 2002 debug, 1, Connecting to dbi:ODBC:OT_TEST_1 as
> ot_test_u
> ser_1
> Tue Oct 29 09:59:02 2002 debug, 1, Accepting client
> Tue Oct 29 09:59:02 2002 debug, 1, Child terminating.
> 
> 
> 
> Changing from ODBC to ADO makes no difference.
> 
> Changing from mode=>threads to mode=>single makes no difference.
> 
> Changing from mode=>threads to mode=>fork causes the server to crash
> completely.
> 
> 
> 
> Perl configuration: 
> 
>   perl 5.8.0
>   DBD-ADO-2_5
>   DBD-ODBC-0_43
>   DBI-1_30
>   libwin32-0_191
>   Net-Daemon-0_37
>   PlRPC-0_2016
> 
> 
> -- begin client script --
> use DBI;
> use DBD::Proxy;
> 
> 
> print "About to connect...\n";
> 
> my $dsn   = 'dbi:ODBC:OT_TEST_1';
> my $proxy = 'hostname=193.32.60.39;port=3333';
> my $dbh = DBI->connect( "dbi:Proxy:$proxy;dsn=$dsn", 'ot_test_user_1',
> 'password' );
> 
> 
> print "Connected.\n";
> print "DBH=$dbh\n";
> 
> print "About to disconnect...\n";
> 
> $dbh->disconnect;
> 
> print "Finished.\n";
> 
> -- end client script --
> 
> 
> 
> -- begin proxy config file --
> require DBD::ODBC;
> require DBD::ADO;
> 
> { 
>     'localport' => 3333,
>     'pidfile' => 'c:/temp/dbiproxy.pid',
>     'logfile' => 1,
>     'debug' => 100,
>     'mode' => 'threads',
>     'timeout' => 60,
>     'clients' => [ 
>       { 
>         'mask' => '^lowery-t$',
>         'accept' => 1
>       },
>       { 
>         'mask' => '^localhost$',
>         'accept' => 1
>       },
>       { 
>         'mask' => '^193.32.60.39$',
>         'accept' => 1 
>       },
>       { 
>         'mask' => '193.32.60.39',
>         'accept' => 1 
>       },
>       { 
>         'mask' => '^193.32.60.31$',
>         'accept' => 1
>       },
>       { 
>         'mask' => '193.32.60.31',
>         'accept' => 1
>       },
>       { 
>         'mask' => '.*',
>         'accept' => 1 
>       }
>     ]
> } 
> 
> -- end proxy config file --
> 
> 
> 
> 
> 
> 

Reply via email to