You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Kostas Karadamoglou <ka...@yahoo.gr> on 2005/08/26 12:58:05 UTC

Security restriction on a remote connection of Derby 10.1.1

Hello all,

I have developed a java application that uses Apache Derby 10.1.1 from a 
remote machine. The remote machine also operates another application 
that uses the same database.

The problem occurs when the application tries to connect with the 
database. It receives the following exception:

org.apache.derby.client.am.DisconnectException: 
java.security.PrivilegedActionException : Error opening socket to server 
localhost on port 1527 with message : null
         at org.apache.derby.client.net.NetAgent.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.newAgent_(Unknown 
Source)
         at org.apache.derby.client.am.Connection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at java.sql.DriverManager.getConnection(DriverManager.java:525)

I start up the remote database using as host "localhost" and as port "1527".

I tried to solve the problem by starting the remote database using as 
host the network IP address and the same port.

This time the remote machine can connect but the local machine cannot. 
It receives the same exception (java.security.PrivilegedActionException).

Do you know how I can bypass this security restrictions?

Thank you in advance, Kostas


Re: Security restriction on a remote connection of Derby 10.1.1

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Kostas Karadamoglou <ka...@yahoo.gr> writes:

> No I haven't done it, I 'll do it immediately.
>
> A silly question: What's the meaning of 0.0.0.0 ?
>
> Does permit all kinds of connections?

It will permit connections on all network interfaces.

-- 
Knut Anders


Re: Security restriction on a remote connection of Derby 10.1.1

Posted by Kostas Karadamoglou <ka...@yahoo.gr>.
No I haven't done it, I 'll do it immediately.

A silly question: What's the meaning of 0.0.0.0 ?

Does permit all kinds of connections?

Knut Anders Hatlen wrote:
> Kostas Karadamoglou <ka...@yahoo.gr> writes:
> 
> 
>>Hello all,
>>
>>I have developed a java application that uses Apache Derby 10.1.1 from
>>a remote machine. The remote machine also operates another application
>>that uses the same database.
>>
>>The problem occurs when the application tries to connect with the
>>database. It receives the following exception:
>>
>>org.apache.derby.client.am.DisconnectException:
>>java.security.PrivilegedActionException : Error opening socket to
>>server localhost on port 1527 with message : null
>>         at org.apache.derby.client.net.NetAgent.<init>(Unknown Source)
>>         at
>>org.apache.derby.client.net.NetConnection.newAgent_(Unknown Source)
>>         at org.apache.derby.client.am.Connection.<init>(Unknown Source)
>>         at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
>>         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
>>         at java.sql.DriverManager.getConnection(DriverManager.java:525)
>>
>>I start up the remote database using as host "localhost" and as port "1527".
>>
>>I tried to solve the problem by starting the remote database using as
>>host the network IP address and the same port.
>>
>>This time the remote machine can connect but the local machine
>>cannot. It receives the same exception
>>(java.security.PrivilegedActionException).
>>
>>Do you know how I can bypass this security restrictions?
> 
> 
> Have you tried starting the network server with -h 0.0.0.0?
> 


Re: Security restriction on a remote connection of Derby 10.1.1

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Kostas Karadamoglou <ka...@yahoo.gr> writes:

> Hello all,
>
> I have developed a java application that uses Apache Derby 10.1.1 from
> a remote machine. The remote machine also operates another application
> that uses the same database.
>
> The problem occurs when the application tries to connect with the
> database. It receives the following exception:
>
> org.apache.derby.client.am.DisconnectException:
> java.security.PrivilegedActionException : Error opening socket to
> server localhost on port 1527 with message : null
>          at org.apache.derby.client.net.NetAgent.<init>(Unknown Source)
>          at
> org.apache.derby.client.net.NetConnection.newAgent_(Unknown Source)
>          at org.apache.derby.client.am.Connection.<init>(Unknown Source)
>          at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
>          at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
>          at java.sql.DriverManager.getConnection(DriverManager.java:525)
>
> I start up the remote database using as host "localhost" and as port "1527".
>
> I tried to solve the problem by starting the remote database using as
> host the network IP address and the same port.
>
> This time the remote machine can connect but the local machine
> cannot. It receives the same exception
> (java.security.PrivilegedActionException).
>
> Do you know how I can bypass this security restrictions?

Have you tried starting the network server with -h 0.0.0.0?

-- 
Knut Anders