Re: problems using DBI:Proxy



On Thu, 2005-12-08 at 14:25 +0200, Claude wrote:
> I have problems using DBI:Proxy / DBI:Proxyserver with an Oracle
> database. In fact, I am not sure that I start the proxy properly.
>
> I'd like to connect to a remote Oracle database (called 'abc') running
> on machine A (ip=1.2.3.4), port 1521.
>

Port 1521 is used by Oracle (if setup that way) for tnslistener. You
can't bind to that port since it is already in use. As the error
message indicated. On the server that has Oracle use the dbiproxy
command that is installed when DBI is is installed. something like

dbiproxy --port 3333 &

...then you can connect to this proxy server from other servers.

i.e.

$ENV{DBI_AUTOPROXY} = 'hostname=srvA;port=3333';

my $dbh = DBI->connect('dbi:Oracle:sid', 'user', 'passwsd');


...etc.

Do some reading :-)

perldoc dbiproxy


> First, on A, I created a proxy startup file:
> -------------------------
> $ cat ./testProxy0.pl
> #!/usr/bin/perl -- # -*-Perl-*-
> use DBI::ProxyServer;
> use strict;
> use diagnostics;
> DBI::ProxyServer::main(@ARGV);
> -------------------------
>
> Then I run it, and... get an error:
> -------------------------
> $ ./testProxy0.pl -localaddr 1.2.3.4 --localport 1521
> running...
> Uncaught exception from user code:
> Cannot create socket: Address already in use at /usr/lib/perl5/vendor_perl/5.8.0/Net/Daemon.pm line 548. at /usr/lib/perl5/vendor_perl/5.8.0/Net/Daemon/Log.pm line 136.
> Net::Daemon::Log::Fatal('DBI::ProxyServer=HASH(0x8275980)','Cannot create socket: Address already in use') called at /usr/lib/perl5/vendor_perl/5.8.0/Net/Daemon.pm line 548
> Net::Daemon::Bind('DBI::ProxyServer=HASH(0x8275980)') called at /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/DBI/ProxyServer.pm line 234
> DBI::ProxyServer::main('-localaddr',1.2.3.4,'--localport',1521) called at ./testProxy0.pl line 5
> -------------------------
>
> Now, changing the port to a free value (1521 is used by Oracle) gets
> rid of the error. Is this the way to go? Is this 'free' port the value
> that the DBI:Proxy should send a request to? But then, I don't
> understand how to tell the proxy what port is the database running at.
>
> Can you help? Thanks for your time.
--
Scott T. Hildreth <shildret@xxxxxxxxxxxxxxxxxxx>
.



Relevant Pages

  • [Full-disclosure] CVE-2008-2625: Oracle DBMS - Proxy Authentication Vulnerability
    ... Oracle DBMS - Proxy Authentication Vulnerability ... establish the database connection on behalf of the users. ...
    (Full-Disclosure)
  • problems using DBI:Proxy
    ... I have problems using DBI:Proxy / DBI:Proxyserver with an Oracle ... I am not sure that I start the proxy properly. ... I'd like to connect to a remote Oracle database running ... changing the port to a free value gets ...
    (perl.dbi.users)
  • Re: Oracle Grid-manager cannot connect to database instances
    ... On lan1 i am running oracle EM-grid control. ... control the database instance i always get the error: ... is needed for the action) But i do not know which port to open. ...
    (comp.databases.oracle.server)
  • Re: about oracle listener
    ... by oracle net configuration assistant. ... when I tried to create the new database by clicking finish ... just fine on the same server with one listener. ... I don't have a listener just called listener on port 1521 and when I ...
    (comp.databases.oracle.server)
  • Re: Securely getting a password from a custom app into Oracle
    ... > I've heard both success and failure with Oracle. ... > I don't have an Oracle database to test on. ... one on the redirected port. ... I dont have an Oracle database to test this on anymore either. ...
    (SecProg)