Getting endpoint connection exception while connecting to couchbase


#1

I am facing following exception when migrated my app developed to the aws instance. In my local setup there was no replica’s created. However on my aws setup i have replicaNumber set to 2. Please suggest what am I doing wrong.

[cb-computations-1] INFO c.c.c.c.config.ConfigurationProvider - Opened bucket ams_support
09:06:09.564 [cb-io-1-2] WARN c.c.client.core.endpoint.Endpoint - [null][KeyValueEndpoint]: Could not connect to endpoint, retrying with delay 32 MILLISECONDS:

WARN c.c.client.core.endpoint.Endpoint - [null][KeyValueEndpoint]: Could not connect to endpoint, retrying with delay 32 MILLISECONDS:
java.net.ConnectException: Connection refused: localhost/127.0.0.1:11210
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_75]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_75]
at com.couchbase.client.deps.io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:208) ~[core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:281) ~[core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528) [core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) [core-io-1.1.1.jar:1.1.1]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
09:06:09.599 [cb-io-1-1] WARN c.c.client.core.endpoint.Endpoint - [null][ViewEndpoint]: Could not connect to endpoint, retrying with delay 32 MILLISECONDS:
java.net.ConnectException: Connection refused: localhost/127.0.0.1:8092
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_75]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_75]
at com.couchbase.client.deps.io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:208) ~[core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:281) ~[core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528) [core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [core-io-1.1.1.jar:1.1.1]
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) [core-io-1.1.1.jar:1.1.1]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]

Thanks


#2

Can you please try 2.1.2-dp? I think it’s a regression introduced in 2.1.1 that has been fixed in 2.1.2:

<dependencies>
    <dependency>
        <groupId>com.couchbase.client</groupId>
        <artifactId>java-client</artifactId>
        <version>2.1.2-dp</version>
    </dependency>
</dependencies>

<repositories>
    <repository>
        <id>couchbase</id>
        <name>couchbase repo</name>
        <url>http://files.couchbase.com/maven2</url>
        <snapshots><enabled>false</enabled></snapshots>
    </repository>
</repositories>

There will be a 2.1.2 coming soon, so if this fixes the issue please upgrade. Alternatively try 2.1.0 for now and then go to 2.1.2 once released.


#3

Thanks a lot 2.1.0 version worked!! :slight_smile:


#4

Okay great, please go to 2.1.2 once released (hopefully next week).


#5

I am getting this issue in 2.1.5 even


#6

What is your issue, can you share TRACE logs?