Hey, all
Trying to run a simple example.
I have a 4 nodes cluster on Amazin EC2 running CB Version: 4.0.0-4051.
Newest java SDK 2.2.5
My Firewall is disabled as the Cluster security group is open.
I can access to port 8091 from my local machine to the CB interface.
Yet when i run:
Cluster cluster = CouchbaseCluster.create(“54.201.13.77”);
System.out.println(“A”);
Bucket bucket = cluster.openBucket(“beer-sample”,90,TimeUnit.SECONDS);
System.out.println(“B”);
N1qlQueryResult queryResult =
bucket.query(N1qlQuery.simple(PrepareStatement.prepare("CREATE PRIMARY INDEX `beer-sample-primary-index` ON `beer-sample` USING GSI")));
//N1qlQueryResult queryResult = bucket.query(N1qlQuery.simple(PrepareStatement.prepare("select * from `beer-sample` limit 10")));
System.out.println(queryResult.errors());
while(queryResult.rows().hasNext())
System.out.println(queryResult.rows().next());
cluster.disconnect();
i get:
Mar 07, 2016 4:27:42 PM com.couchbase.client.core.CouchbaseCore
INFO: CouchbaseEnvironment: {sslEnabled=false, sslKeystoreFile=‘null’, sslKeystorePassword=‘null’, queryEnabled=false, queryPort=8093, bootstrapHttpEnabled=true, bootstrapCarrierEnabled=true, bootstrapHttpDirectPort=8091, bootstrapHttpSslPort=18091, bootstrapCarrierDirectPort=11210, bootstrapCarrierSslPort=11207, ioPoolSize=4, computationPoolSize=4, responseBufferSize=16384, requestBufferSize=16384, kvServiceEndpoints=1, viewServiceEndpoints=1, queryServiceEndpoints=1, searchServiceEndpoints=1, ioPool=NioEventLoopGroup, coreScheduler=CoreScheduler, eventBus=DefaultEventBus, packageNameAndVersion=couchbase-jvm-core/1.2.5 (git: 1.2.5), dcpEnabled=false, retryStrategy=BestEffort, maxRequestLifetime=75000, retryDelay=ExponentialDelay{growBy 1.0 MICROSECONDS, powers of 2; lower=100, upper=100000}, reconnectDelay=ExponentialDelay{growBy 1.0 MILLISECONDS, powers of 2; lower=32, upper=4096}, observeIntervalDelay=ExponentialDelay{growBy 1.0 MICROSECONDS, powers of 2; lower=10, upper=100000}, keepAliveInterval=30000, autoreleaseAfter=2000, bufferPoolingEnabled=true, tcpNodelayEnabled=true, mutationTokensEnabled=false, socketConnectTimeout=1000, dcpConnectionBufferSize=20971520, dcpConnectionBufferAckThreshold=0.2, queryTimeout=75000, viewTimeout=75000, kvTimeout=2500, connectTimeout=5000, disconnectTimeout=25000, dnsSrvEnabled=false}
A
Mar 07, 2016 4:27:44 PM com.couchbase.client.core.node.CouchbaseNode signalConnected
INFO: Connected to Node ec2-54-201-13-77.us-west-2.compute.amazonaws.com
Mar 07, 2016 4:27:49 PM com.couchbase.client.core.node.CouchbaseNode
WARNING: DNS Reverse Lookup of 172.31.8.43 is slow, took 4503ms
Mar 07, 2016 4:27:53 PM com.couchbase.client.core.node.CouchbaseNode
WARNING: DNS Reverse Lookup of 172.31.8.44 is slow, took 4503ms
Mar 07, 2016 4:27:58 PM com.couchbase.client.core.node.CouchbaseNode
WARNING: DNS Reverse Lookup of 172.31.8.45 is slow, took 4501ms
Mar 07, 2016 4:28:02 PM com.couchbase.client.core.node.CouchbaseNode
WARNING: DNS Reverse Lookup of 172.31.8.46 is slow, took 4501ms
Mar 07, 2016 4:28:02 PM com.couchbase.client.core.config.DefaultConfigurationProvider$8 call
INFO: Opened bucket beer-sample
Mar 07, 2016 4:28:02 PM com.couchbase.client.core.node.CouchbaseNode signalDisconnected
INFO: Disconnected from Node ec2-54-201-13-77.us-west-2.compute.amazonaws.com
B
Mar 07, 2016 4:28:03 PM com.couchbase.client.core.endpoint.AbstractEndpoint$2 operationComplete
WARNING: [null][KeyValueEndpoint]: Socket connect took longer than specified timeout.
Mar 07, 2016 4:28:03 PM com.couchbase.client.deps.io.netty.util.concurrent.DefaultPromise notifyListener0
WARNING: An exception was thrown by com.couchbase.client.core.endpoint.AbstractEndpoint$2.operationComplete()
rx.exceptions.OnErrorNotImplementedException: connection timed out: /172.31.8.43:11210
at rx.Observable$26.onError(Observable.java:7954)
at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:158)
at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:119)
at rx.internal.operators.OperatorMap$1.onError(OperatorMap.java:48)
at rx.internal.operators.OperatorDoOnEach$1.onError(OperatorDoOnEach.java:71)
at rx.internal.operators.OperatorSingle$ParentSubscriber.onError(OperatorSingle.java:139)
at rx.internal.operators.OperatorTakeLastOne$ParentSubscriber.onError(OperatorTakeLastOne.java:164)
at rx.internal.operators.OperatorMerge$MergeSubscriber.reportError(OperatorMerge.java:239)
at rx.internal.operators.OperatorMerge$MergeSubscriber.checkTerminate(OperatorMerge.java:774)
at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:532)
at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:521)
at rx.internal.operators.OperatorMerge$InnerSubscriber.onError(OperatorMerge.java:808)
at rx.internal.operators.OperatorSingle$ParentSubscriber.onError(OperatorSingle.java:139)
at rx.internal.operators.OperatorTakeLastOne$ParentSubscriber.onError(OperatorTakeLastOne.java:164)
at rx.internal.operators.OperatorMerge$MergeSubscriber.reportError(OperatorMerge.java:239)
at rx.internal.operators.OperatorMerge$MergeSubscriber.checkTerminate(OperatorMerge.java:774)
at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:532)
at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:521)
at rx.internal.operators.OperatorMerge$InnerSubscriber.onError(OperatorMerge.java:808)
at rx.internal.operators.OperatorMap$1.onError(OperatorMap.java:48)
at rx.internal.operators.OperatorSingle$ParentSubscriber.onError(OperatorSingle.java:139)
at rx.internal.operators.OperatorTakeLastOne$ParentSubscriber.onError(OperatorTakeLastOne.java:164)
at rx.internal.operators.OperatorMerge$MergeSubscriber.reportError(OperatorMerge.java:239)
at rx.internal.operators.OperatorMerge$MergeSubscriber.checkTerminate(OperatorMerge.java:774)
at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:532)
at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:521)
at rx.internal.operators.OperatorMerge$InnerSubscriber.onError(OperatorMerge.java:808)
at rx.internal.operators.OperatorMap$1.onError(OperatorMap.java:48)
at rx.internal.operators.OperatorMap$1.onError(OperatorMap.java:48)
at rx.internal.operators.OperatorSingle$ParentSubscriber.onError(OperatorSingle.java:139)
at rx.internal.operators.OperatorTakeLastOne$ParentSubscriber.onError(OperatorTakeLastOne.java:164)
at rx.internal.operators.OperatorMerge$MergeSubscriber.reportError(OperatorMerge.java:239)
at rx.internal.operators.OperatorMerge$MergeSubscriber.checkTerminate(OperatorMerge.java:774)
at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:532)
at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:521)
at rx.internal.operators.OperatorMerge$InnerSubscriber.onError(OperatorMerge.java:808)
at rx.subjects.SubjectSubscriptionManager$SubjectObserver.onError(SubjectSubscriptionManager.java:226)
at rx.subjects.AsyncSubject.onError(AsyncSubject.java:115)
at com.couchbase.client.core.endpoint.AbstractEndpoint$2.operationComplete(AbstractEndpoint.java:318)
at com.couchbase.client.core.endpoint.AbstractEndpoint$2.operationComplete(AbstractEndpoint.java:284)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:680)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:603)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:563)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultPromise.setFailure(DefaultPromise.java:415)
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPromise.setFailure(DefaultChannelPromise.java:87)
at com.couchbase.client.core.endpoint.kv.KeyValueFeatureHandler$1.operationComplete(KeyValueFeatureHandler.java:140)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:680)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:567)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultPromise.setFailure(DefaultPromise.java:415)
at com.couchbase.client.deps.io.netty.channel.DefaultChannelPromise.setFailure(DefaultChannelPromise.java:87)
at com.couchbase.client.core.endpoint.kv.KeyValueAuthHandler$3.operationComplete(KeyValueAuthHandler.java:316)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:680)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:603)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:563)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:424)
at com.couchbase.client.deps.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:222)
at com.couchbase.client.deps.io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
at com.couchbase.client.deps.io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:120)
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.couchbase.client.deps.io.netty.channel.ConnectTimeoutException: connection timed out: /172.31.8.43:11210
at com.couchbase.client.deps.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:220)
… 7 more
Mar 07, 2016 4:28:03 PM com.couchbase.client.core.endpoint.AbstractEndpoint$2 operationComplete
WARNING: [null][QueryEndpoint]: Socket connect took longer than specified timeout.
Mar 07, 2016 4:28:03 PM com.couchbase.client.core.endpoint.AbstractEndpoint$2 operationComplete
WARNING: [null][QueryEndpoint]: Socket connect took longer than specified timeout.
Mar 07, 2016 4:28:03 PM com.couchbase.client.core.endpoint.AbstractEndpoint$2 operationComplete
WARNING: [null][ViewEndpoint]: Socket connect took longer than specified timeout.
Mar 07, 2016 4:28:03 PM com.couchbase.client.core.endpoint.AbstractEndpoint$2 operationComplete
WARNING: [null][ViewEndpoint]: Socket connect took longer than specified timeout.
Mar 07, 2016 4:28:03 PM com.couchbase.client.core.endpoint.AbstractEndpoint$2 operationComplete
WARNING: [null][QueryEndpoint]: Socket connect took longer than specified timeout.
Mar 07, 2016 4:28:03 PM com.couchbase.client.core.endpoint.AbstractEndpoint$2 operationComplete
WARNING: [null][ViewEndpoint]: Socket connect took longer than specified timeout.
Mar 07, 2016 4:28:03 PM com.couchbase.client.core.endpoint.AbstractEndpoint$2 operationComplete
WARNING: [null][ViewEndpoint]: Socket connect took longer than specified timeout.
Mar 07, 2016 4:28:03 PM com.couchbase.client.core.endpoint.AbstractEndpoint$2 operationComplete
WARNING: [null][KeyValueEndpoint]: Socket connect took longer than specified timeout.
Mar 07, 2016 4:28:03 PM com.couchbase.client.core.endpoint.AbstractEndpoint$2 operationComplete
WARNING: [null][KeyValueEndpoint]: Socket connect took longer than specified timeout.
Mar 07, 2016 4:28:03 PM com.couchbase.client.core.endpoint.AbstractEndpoint$2 operationComplete
WARNING: [null][KeyValueEndpoint]: Socket connect took longer than specified timeout.
Mar 07, 2016 4:28:03 PM com.couchbase.client.core.endpoint.AbstractEndpoint$2 operationComplete
WARNING: [null][QueryEndpoint]: Socket connect took longer than specified timeout.
Exception in thread “main” java.lang.RuntimeException: java.util.concurrent.TimeoutException
at com.couchbase.client.java.util.Blocking.blockForSingle(Blocking.java:75)
at com.couchbase.client.java.CouchbaseBucket.query(CouchbaseBucket.java:656)
at com.couchbase.client.java.CouchbaseBucket.query(CouchbaseBucket.java:582)
at App.main(App.java:31)
Caused by: java.util.concurrent.TimeoutException
… 4 more
I tried to extend in the environment socketConnectTimeout, but i get the same results…
Can’t think why is this happening… any suggestions?