db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Ventura <st.ne...@gmail.com>
Subject Re: trouble with ipv6 connection
Date Thu, 22 Sep 2011 10:37:29 GMT
(The mailing list seems to have rejected my message, trying again without URL).

Not a solution to your problem, but binding to 0.0.0.0 will make the
server listen on all IPv4 interfaces/addresses, not IPv6 ones. To make
it listen on all IPv6 interfaces/addresses you need to specify :: (two
colons) as the bind address.

There might be ways to make it listen to all interfaces of both kinds,
see question 21657 on serverfault(dot)com.

On Wed, Sep 21, 2011 at 5:36 PM, Kathey Marsden
<kmarsdenderby@sbcglobal.net> wrote:
> I am having some trouble making a NetworkServer IPv6 connection and think it
> may be a user error or machine configuration issue, but am not sure what
> that might be.
>
> I have two dual stack IPv6/IPv4 machines running Linux.
>
>  - If I start the server listening on the IPv6 hostname and try to connect
> from the second machine, I get the permission denied error below.  I think
> this connection attempt is never actually reaching my running Network
> Server, but is being blocked somehow at the machine level.  If it were
> windows I would blame the firewall software.
>
>
> ij> connect
> 'jdbc:derby://<myipv6serverhostname>:1527/mydb;user=user2;password=pass2;create=true';
> ERROR 08001: java.net.SocketException : Error connecting to server
> wicopt1-v6.rtp.raleigh.ibm.com on port 1527 with message Permission denied.
> java.sql.SQLNonTransientConnectionException: java.net.SocketException :
> Error connecting to server wicopt1-v6.rtp.raleigh.ibm.com on port 1527 with
> me
> ssage Permission denied.
>        at
> org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown
> Source)
>        at org.apache.derby.client.am.SqlException.getSQLException(Unknown
> Source)
>        at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
>        at java.sql.DriverManager.getConnection(DriverManager.java:322)
>        at java.sql.DriverManager.getConnection(DriverManager.java:297)
>        at org.apache.derby.impl.tools.ij.ij.dynamicConnection(Unknown
> Source)
>        at org.apache.derby.impl.tools.ij.ij.ConnectStatement(Unknown Source)
>        at org.apache.derby.impl.tools.ij.ij.ijStatement(Unknown Source)
>        at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(Unknown
> Source)
>        at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source)
>        at org.apache.derby.impl.tools.ij.Main.go(Unknown Source)
>        at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source)
>        at org.apache.derby.impl.tools.ij.Main.main(Unknown Source)
>        at org.apache.derby.tools.ij.main(Unknown Source)
> Caused by: org.apache.derby.client.am.DisconnectException:
> java.net.SocketException : Error connecting to server
> wicopt1-v6.rtp.raleigh.ibm.com on por
> t 1527 with message Permission denied.
>        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.client.net.NetConnection40.<init>(Unknown Source)
>        at
> org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(Unknown
> Source)
>        ... 12 more
> Caused by: java.net.SocketException: Permission denied
>        at java.net.PlainSocketImpl.socketConnect(Native Method)
>        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:383)
>        at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:245)
>        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:232)
>        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:377)
>        at java.net.Socket.connect(Socket.java:539)
>        at java.net.Socket.connect(Socket.java:488)
>        at java.net.Socket.<init>(Socket.java:385)
>        at java.net.Socket.<init>(Socket.java:199)
>        at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:1)
>        at org.apache.derby.client.net.OpenSocketAction.run(Unknown Source)
>        at
> java.security.AccessController.doPrivileged(AccessController.java:251)
>
> I started the server like:
> java  -Dderby.drda.logconnections=true
>  org.apache.derby.drda.NetworkServerContro
> l start -noSecurityManager -h <myipv6serverhostname>
>
> (I tried also with the options at
> :http://db.apache.org/derby/docs/10.2/adminguide/tadminconfigipx.html but
> still no luck).
>
> A few more data points.
>  - I can connect to the IPv6 server if I connect from the IPv4 shell of the
> same machine.
> - If I start the server specifying the IPv4 hostname I can connect from the
> second machine.
> - If I start the server with hostname 0.0.0.0 I can connect to the IPv4
> hostname but not the IPv6 one.
> - I can successfully ping6 the IPv6 server hostname from the second machine.
>
>
> Any idea what might cause this?  In the past for IPv6 testing I have only
> had access to one machine on the local network so had tested connecting to
> the IPv6 server, only from the IPv6 and IPv4 shells of the same machine.
>
> Thanks for any ideas.
>
> Kathey
>
>
>
>
>

Mime
View raw message