JDK 2.0.0-dp2, authentication and configuration

18 views
Skip to first unread message

Gareth

unread,
Jul 25, 2014, 10:01:29 PM7/25/14
to couchba...@googlegroups.com
I copied/modified the example in the Java 2.0.0-dp1 blog and ended up with something like this:

cluster = new CouchbaseCluster(couchConfig.fromHost);

Bucket bucket = cluster.openBucket(couchConfig.bucket).toBlocking().single();

if (couchConfig.clearDB)

bucket.flush().toBlocking().single();

 But it continually fails because there are no buckets returned.  I'm not sure how this is supposed to work, but I haven't had to authenticate in any way and I don't see any options to examine the list of buckets of whatever that comes back from the server.

I turned the tracing up and I see this:

20140726-01:56:01.351 ernalLoggerFactory/in DEBUG: Using SLF4J as the default logging framework

20140726-01:56:01.355 readEventLoopGroup/in DEBUG: -Dio.netty.eventLoopThreads: 16

20140726-01:56:01.374 PlatformDependent0/in DEBUG: java.nio.Buffer.address: available

20140726-01:56:01.375 PlatformDependent0/in DEBUG: sun.misc.Unsafe.theUnsafe: available

20140726-01:56:01.375 PlatformDependent0/in DEBUG: sun.misc.Unsafe.copyMemory: available

20140726-01:56:01.376 PlatformDependent0/in DEBUG: java.nio.Bits.unaligned: true

20140726-01:56:01.388 .PlatformDependent/in DEBUG: UID: 501

20140726-01:56:01.388 .PlatformDependent/in DEBUG: Java version: 8

20140726-01:56:01.388 .PlatformDependent/in DEBUG: -Dio.netty.noUnsafe: false

20140726-01:56:01.389 .PlatformDependent/in DEBUG: sun.misc.Unsafe: available

20140726-01:56:01.389 .PlatformDependent/in DEBUG: -Dio.netty.noJavassist: false

20140726-01:56:01.395 .PlatformDependent/in DEBUG: Javassist: unavailable

20140726-01:56:01.395 .PlatformDependent/in DEBUG: You don't have Javassist in your class path or you don't have enough permission to load dynamically generated classes.  Please check the configuration for better performance.

20140726-01:56:01.395 .PlatformDependent/in DEBUG: -Dio.netty.tmpdir: /var/folders/l2/mppblc9x23l30mnjr0ky9rhr0000gn/T (java.io.tmpdir)

20140726-01:56:01.396 .PlatformDependent/in DEBUG: -Dio.netty.bitMode: 64 (sun.arch.data.model)

20140726-01:56:01.396 .PlatformDependent/in DEBUG: -Dio.netty.noPreferDirect: false

20140726-01:56:01.428 l.nio.NioEventLoop/in DEBUG: -Dio.netty.noKeySetOptimization: false

20140726-01:56:01.429 l.nio.NioEventLoop/in DEBUG: -Dio.netty.selectorAutoRebuildThreshold: 512

20140726-01:56:01.651 figurationProvider/in DEBUG: Setting seed hosts to [warburton/172.21.143.3]

20140726-01:56:07.370 edByteBufAllocator/-1 DEBUG: -Dio.netty.allocator.numHeapArenas: 8

20140726-01:56:07.370 edByteBufAllocator/-1 DEBUG: -Dio.netty.allocator.numDirectArenas: 8

20140726-01:56:07.370 edByteBufAllocator/-1 DEBUG: -Dio.netty.allocator.pageSize: 8192

20140726-01:56:07.370 edByteBufAllocator/-1 DEBUG: -Dio.netty.allocator.maxOrder: 11

20140726-01:56:07.370 edByteBufAllocator/-1 DEBUG: -Dio.netty.allocator.chunkSize: 16777216

20140726-01:56:07.370 edByteBufAllocator/-1 DEBUG: -Dio.netty.allocator.tinyCacheSize: 512

20140726-01:56:07.371 edByteBufAllocator/-1 DEBUG: -Dio.netty.allocator.smallCacheSize: 256

20140726-01:56:07.371 edByteBufAllocator/-1 DEBUG: -Dio.netty.allocator.normalCacheSize: 64

20140726-01:56:07.371 edByteBufAllocator/-1 DEBUG: -Dio.netty.allocator.maxCachedBufferCapacity: 32768

20140726-01:56:07.371 edByteBufAllocator/-1 DEBUG: -Dio.netty.allocator.cacheTrimInterval: 8192

20140726-01:56:07.399 .ThreadLocalRandom/-1 DEBUG: -Dio.netty.initialSeedUniquifier: 0xb74e88fa771dbfda

20140726-01:56:07.406 nnelOutboundBuffer/-1 DEBUG: -Dio.netty.threadLocalDirectBufferSize: 65536

20140726-01:56:07.408 etty.util.Recycler/-1 DEBUG: -Dio.netty.recycler.maxCapacity.default: 262144

20140726-01:56:07.420 buffer.ByteBufUtil/-1 DEBUG: -Dio.netty.allocator.type: unpooled

20140726-01:56:07.478 sourceLeakDetector/-2 DEBUG: -Dio.netty.leakDetectionLevel: simple

20140726-01:56:07.559 .internal.Cleaner0/-3 DEBUG: java.nio.ByteBuffer.cleaner(): available

20140726-01:56:07.561 .endpoint.Endpoint/-2 DEBUG: Connected to BinaryEndpoint warburton/172.21.143.3:11210

20140726-01:56:07.561 .endpoint.Endpoint/-1 DEBUG: Connected to BinaryEndpoint warburton/172.21.143.3:11210

20140726-01:56:07.561 ent.core.node.Node/-2 INFO: Disconnected from Node warburton/172.21.143.3

20140726-01:56:07.561 ent.core.node.Node/-2 DEBUG: Disconnected (CONNECTING) from Node warburton/172.21.143.3

20140726-01:56:07.561 .endpoint.Endpoint/-3 DEBUG: Connected to BinaryEndpoint warburton/172.21.143.3:11210

20140726-01:56:07.562 re.service.Service/-3 DEBUG: Connected (DEGRADED) to BinaryService warburton

20140726-01:56:07.562 ent.core.node.Node/-3 INFO: Connected to Node warburton/172.21.143.3

20140726-01:56:07.562 ent.core.node.Node/-3 DEBUG: Connected (DISCONNECTED) to Node warburton/172.21.143.3

20140726-01:56:07.571 ader.CarrierLoader/-1 DEBUG: Successfully loaded config through carrier.

which looks inherently plausible to me, but could be symptomatic of something going wrong.

Any thoughts?

Gareth

unread,
Jul 26, 2014, 6:05:03 AM7/26/14
to couchba...@googlegroups.com
In the cool light of the morning, I realized that there was also an "openBucket" method that took two parameters: a bucket name and a password.

I used this, but I still get basically the same behavior; the one difference is that it does now seem to connect to port 8091:

20140726-09:50:19.572 .endpoint.Endpoint/-4 DEBUG: Connected to ConfigEndpoint warburton/172.21.143.3:8091
20140726-09:50:19.572 re.service.Service/-4 DEBUG: Connected (CONNECTING) to ConfigService warburton
20140726-09:50:19.573 ent.core.node.Node/-4 INFO: Connected to Node warburton/172.21.143.3
20140726-09:50:19.573 ent.core.node.Node/-4 DEBUG: Connected (DEGRADED) to Node warburton/172.21.143.3

but I still don't get any buckets back.  I believe I have the right bucket name and password (and tried changing the password to be sure), all to no avail.  I'm also somewhat surprised it doesn't try connecting on port 11211 (which the server seems to imply in the password configuration screen).

I am using the CBServer 3.0beta and I am able to connect to the admin console.  Existing applications I have using the 1.x SDK seem to work fine, although admittedly to a different bucket.

Cheers,
Gareth

Michael Nitschinger

unread,
Jul 28, 2014, 1:37:29 AM7/28/14
to couchba...@googlegroups.com
Hi Gareth,

yeah this might very well be a bug in the dp2. Can you please set the loggin level to TRACE? It may be a little more output but that will help me trace it down easier I think.

You can also open a ticket here: http://www.couchbase.com/issues/browse/JCBC which makes it easier to share logs and whatnot.

Thanks,
Michael

-- 
Couchbase 2.0 is Here!: http://www.couchbase.com/download
Couchbase 2.0 Learn: http://www.couchbase.com/learn
Couchbase Forums: http://www.couchbase.com/forums
--- 
You received this message because you are subscribed to the Google Groups "Couchbase Team 8091" group.
To unsubscribe from this group and stop receiving emails from it, send an email to couchbase-809...@googlegroups.com.
To post to this group, send email to couchba...@googlegroups.com.
Visit this group at http://groups.google.com/group/couchbase-8091.
To view this discussion on the web visit https://groups.google.com/d/msgid/couchbase-8091/11a3c7f2-fef9-4b35-8508-5d5ea1ae5536%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gareth Powell

unread,
Jul 28, 2014, 8:31:34 AM7/28/14
to couchba...@googlegroups.com
Thanks.  I'm not going to be able to get to that this morning, but I should be able to do that this afternoon.

Cheers,
Gareth


Gareth Powell

unread,
Jul 28, 2014, 1:37:54 PM7/28/14
to couchba...@googlegroups.com
I did my best and created a bug with the tracing attached.

Thanks,
Gareth
Reply all
Reply to author
Forward
0 new messages