'Channel inactive' constantly repeating after adding document with cyryllic ID using java-client 2.1


#1

Hi.

I need to store non-latin IDs in my system, so for test purpose I’m trying to save Cyrillic ID like ‘test::пользователь’.
If I’ll do it directly on web UI of my 3.0.3-1716 Enterprise Edition (build-1716). it works perfectly fine and document is stored and can be retrieved after correctly.

But, if I’m doing so through java-client 2.1.2 (same on 2.1.1) My first attempt to create document with such ID works perfectly fine and it stores, but second attempt to create document with non-Latin ID breakes with following use case, described in simple test.
@Test
public void testName() throws Exception {
System.err.println(“Starting…”);
for (int i = 0; i < 5; i++) {
testCb(i);
}
System.err.println(“Finished.”);
}

private void testCb(Integer id) {
try {
bucket.upsert(JsonDocument.create(“non-latin-id::пользователь” + id, JsonObject.create().put(“value”, “русский”)));
} catch (RequestCancelledException ex) {
// just do nothing
System.err.println(id + " " + ex.getMessage());
}
}

Generates following logs:
Starting…
2015-05-04 16:53:36 EEST [cb-io-1-1] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():91 - [/172.31.11.144:11210][KeyValueEndpoint]: Channel Inactive.
2015-05-04 16:53:36 EEST [cb-io-1-1] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():91 - [/172.31.11.144:11210][KeyValueEndpoint]: Got notified from Channel as inactive.
2015-05-04 16:53:36 EEST [cb-core-3-1] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():91 - Received signal for outdated configuration.
2015-05-04 16:53:36 EEST [cb-io-1-1] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():91 - [/172.31.11.144:11210][KeyValueEndpoint]: Cancelling 1 outstanding requests.
1 Request cancelled in-flight.
2015-05-04 16:53:36 EEST [cb-io-1-3] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():91 - [/172.31.11.144:11210][KeyValueEndpoint]: Connected Endpoint.
2015-05-04 16:53:36 EEST [cb-io-1-3] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():91 - Connected (DEGRADED) to Node 172.31.11.144/172.31.11.144
2015-05-04 16:53:37 EEST [cb-io-1-3] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():91 - [/172.31.11.144:11210][KeyValueEndpoint]: Channel Inactive.
2015-05-04 16:53:37 EEST [cb-io-1-3] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():91 - [/172.31.11.144:11210][KeyValueEndpoint]: Got notified from Channel as inactive.
2015-05-04 16:53:37 EEST [cb-core-3-1] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():91 - Received signal for outdated configuration.
2015-05-04 16:53:37 EEST [cb-io-1-3] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():91 - [/172.31.11.144:11210][KeyValueEndpoint]: Cancelling 2 outstanding requests.
2015-05-04 16:53:37 EEST [cb-io-1-3] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():111 - Could not fetch config from bucket “test” against “172.31.11.144/172.31.11.144”.
com.couchbase.client.core.RequestCancelledException: Request cancelled in-flight.
at com.couchbase.client.core.endpoint.AbstractGenericHandler.handleOutstandingOperations(AbstractGenericHandler.java:281) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.core.endpoint.AbstractGenericHandler.handlerRemoved(AbstractGenericHandler.java:262) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(DefaultChannelPipeline.java:527) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.callHandlerRemoved(DefaultChannelPipeline.java:521) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.remove0(DefaultChannelPipeline.java:351) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.destroyDown(DefaultChannelPipeline.java:798) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.destroyUp(DefaultChannelPipeline.java:767) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.destroy(DefaultChannelPipeline.java:759) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.fireChannelUnregistered(DefaultChannelPipeline.java:743) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.AbstractChannel$AbstractUnsafe$6.run(AbstractChannel.java:615) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) [core-io-1.1.2.jar:1.1.2]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
2015-05-04 16:53:37 EEST [cb-io-1-3] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():111 - Error while refreshing bucket config, ignoring.
com.couchbase.client.core.RequestCancelledException: Request cancelled in-flight.
at com.couchbase.client.core.endpoint.AbstractGenericHandler.handleOutstandingOperations(AbstractGenericHandler.java:281) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.core.endpoint.AbstractGenericHandler.handlerRemoved(AbstractGenericHandler.java:262) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(DefaultChannelPipeline.java:527) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.callHandlerRemoved(DefaultChannelPipeline.java:521) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.remove0(DefaultChannelPipeline.java:351) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.destroyDown(DefaultChannelPipeline.java:798) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.destroyUp(DefaultChannelPipeline.java:767) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.destroy(DefaultChannelPipeline.java:759) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPipeline.fireChannelUnregistered(DefaultChannelPipeline.java:743) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.AbstractChannel$AbstractUnsafe$6.run(AbstractChannel.java:615) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [core-io-1.1.2.jar:1.1.2]
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) [core-io-1.1.2.jar:1.1.2]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
3 Request cancelled in-flight.
2015-05-04 16:53:37 EEST [cb-io-1-4] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():91 - [/172.31.11.144:11210][KeyValueEndpoint]: Connected Endpoint.
2015-05-04 16:53:37 EEST [cb-io-1-4] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():91 - Connected (DEGRADED) to Node 172.31.11.144/172.31.11.144
2015-05-04 16:53:37 EEST [cb-computations-3] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():96 - New Bucket test config proposed.
2015-05-04 16:53:37 EEST [cb-computations-3] DEBUG com.couchbase.client.core.logging.Slf4JLogger.debug():96 - Completed refreshing config for bucket "test"
Finished.

As a result, it’s impossible to insert non latin document ID using sdk, while possible through web UI.


#2

@Rabajaba this is a bug we found and fixed in 2.1.3 - and the good news is, while I didn’t announce it officialy yet, I released 2.1.3 today.

The issue is https://issues.couchbase.com/browse/JVMCBC-187

Can you try update your dependency to 2.1.3? http://search.maven.org/#artifactdetails|com.couchbase.client|java-client|2.1.3|jar


#3

wow, that’s an unexpected response :smile:
Thanks a lot, now it works correctly.


#4

@Rabajaba I pushed it 5 mins before your question - this is how we roll at couchbase! :wink: