Uploaded image for project: 'Java Couchbase JVM Core'
  1. Java Couchbase JVM Core
  2. JVMCBC-427

Couchbase Java SDK tries to connect to Couchbase via IPv6 addresss when AAAA DNS record exists and "-Djava.net.preferIPv6Addresses=true"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.4.6
    • 1.3.4
    • None
    • None

    Description

      The Couchbase Java SDK tries to connect to couchbase server via IPv6 address when the following are true:

      • The couchbase server the client is trying to connect to has a AAAA DNS record
      • JVM setting for java.net.preferIPv6Addresses is True

      Since Couchbase server does not support IPv6, it should force ipv4 lookups only (or at least fallback to IPv4) when the IPv6 connection fails. 

       

      Stack trace:

      java.net.ConnectException: Connection refused: ltx1-app1102.stg.linkedin.com/2a04:f547:24:4219:0:0:0:3669:8091
      at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:1.8.0_72]
      at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:1.8.0_72]
      at com.couchbase.client.deps.io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:224) ~[core-io-1.0.3-LI3.jar:1.0.3-3-g055e252]
      at com.couchbase.client.deps.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:281) ~[core-io-1.0.3-LI3.jar:1.0.3-3-g055e252]
      at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528) ~[core-io-1.0.3-LI3.jar:1.0.3-3-g055e252]
      at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) ~[core-io-1.0.3-LI3.jar:1.0.3-3-g055e252]
      at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) ~[core-io-1.0.3-LI3.jar:1.0.3-3-g055e252]
      at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) ~[core-io-1.0.3-LI3.jar:1.0.3-3-g055e252]
      at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111) ~[core-io-1.0.3-LI3.jar:1.0.3-3-g055e252]
      at com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) ~[core-io-1.0.3-LI3.jar:1.0.3-3-g055e252]

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            daschl Michael Nitschinger
            jwon@linkedin.com James Won
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty