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 Xianghan Zheng <xi...@student.hia.no> on 2006/09/24 13:32:06 UTC
org.apache.derby.client.am.DisconnectException in Derby
hi,
I get a strange exception:
Failure making connection: org.apache.derby.client.am.DisconnectException:
java.security.PrivilegedActionException : Error opening socket to server
192.168.0.105 on port 1527 with message : null
org.apache.derby.client.am.DisconnectException:
java.security.PrivilegedActionException : Error opening socket to server
192.168.0.105 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)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at DerbyTest.getClientDriverManagerConnection(DerbyTest.java:142)
at DerbyTest.startSample(DerbyTest.java:91)
at DerbyTest.main(DerbyTest.java:75)
debug:
BUILD SUCCESSFUL (total time: 49 seconds)
The problem is that i can only access the derby server in localhost, not
the remote access. Does somebody know what is the problem. How to solve
it?
Best Regards,
Zheng Xianghan
Re: org.apache.derby.client.am.DisconnectException in Derby
Posted by John Embretsen <Jo...@Sun.COM>.
Daniel Jue wrote:
> If I have a server with multiple IP addresses, and I only want Derby
> to answer on one of them, would I do something like this:
>
> derby.drda.host=specificIP
>
> Or is there some other way?
I believe that's the way to do it, yes. But I have not tried it myself.
--
John
Re: org.apache.derby.client.am.DisconnectException in Derby
Posted by Daniel Jue <te...@gmail.com>.
If I have a server with multiple IP addresses, and I only want Derby
to answer on one of them, would I do something like this:
derby.drda.host=specificIP
Or is there some other way?
Daniel
On 9/25/06, John Embretsen <Jo...@sun.com> wrote:
> Xianghan Zheng wrote:
> > hi,
> > I get a strange exception:
> >
> > Failure making connection: org.apache.derby.client.am.DisconnectException:
> > java.security.PrivilegedActionException : Error opening socket to server
> > 192.168.0.105 on port 1527 with message : null
>
> [snipped stack trace]
>
> > The problem is that i can only access the derby server in localhost, not
> > the remote access. Does somebody know what is the problem. How to solve
> > it?
>
> The Derby Network Server listens to the localhost interface only by
> default. If you want the server to accept remote connections, you have
> to set the derby.drda.host property to 0.0.0.0 before/when starting the
> server, or by using the -h 0.0.0.0 option if you are using a script or
> NetworkServerControl from the command line.
>
> See
>
> http://db.apache.org/derby/docs/dev/adminguide/radmindrdahost.html
>
> Please note that you should use other means to secure Derby once you
> allow remote connections. You can read more about this in the Derby
> Server and Administration Guide, available from
> http://db.apache.org/derby/manuals/.
>
>
> --
> John
>
>
>
Re: org.apache.derby.client.am.DisconnectException in Derby
Posted by John Embretsen <Jo...@Sun.COM>.
Xianghan Zheng wrote:
> hi,
> I get a strange exception:
>
> Failure making connection: org.apache.derby.client.am.DisconnectException:
> java.security.PrivilegedActionException : Error opening socket to server
> 192.168.0.105 on port 1527 with message : null
[snipped stack trace]
> The problem is that i can only access the derby server in localhost, not
> the remote access. Does somebody know what is the problem. How to solve
> it?
The Derby Network Server listens to the localhost interface only by
default. If you want the server to accept remote connections, you have
to set the derby.drda.host property to 0.0.0.0 before/when starting the
server, or by using the -h 0.0.0.0 option if you are using a script or
NetworkServerControl from the command line.
See
http://db.apache.org/derby/docs/dev/adminguide/radmindrdahost.html
Please note that you should use other means to secure Derby once you
allow remote connections. You can read more about this in the Derby
Server and Administration Guide, available from
http://db.apache.org/derby/manuals/.
--
John