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 Kathey Marsden <km...@sbcglobal.net> on 2011/09/21 22:36:33 UTC
trouble with ipv6 connection
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
Re: trouble with ipv6 connection
Posted by Kathey Marsden <km...@sbcglobal.net>.
On 9/22/2011 3:37 AM, José Ventura wrote:
> (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.
Thanks for this information. I don't think our documentation mentions
this. I will give it a try and make sure it works and if so file a doc
issue.
> 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
> <km...@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.
I reported this problem to the administrator of the machine and she
fixed it saying it was related to ipv6tables. I am hoping to get more
details, but thought I would post that much here now in case someone
hits the same issue and is looking for a hint.
Kathey
Re: trouble with ipv6 connection
Posted by José Ventura <st...@gmail.com>.
(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
<km...@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
>
>
>
>
>