After upgrade to server version 5 , Java client can't connect to bucket

java
server

#1

After upgrade to community server version 5 , Java client (2.5.1) can’t connect to bucket
It’s seems like in the new version when create bucket no “Access Control” for password.

Trying : bucket = couchBaseCluster.openBucket(“bucketName”)
OR
bucket = couchBaseCluster.openBucket(couchbaseBucket,“pass” );

  • after creating user with security tab with “Bucket Full Access[bucketName]”

Error:
com.couchbase.client.core.endpoint.kv.AuthenticationException: Authentication Failure
at com.couchbase.client.core.endpoint.kv.KeyValueAuthHandler.checkIsAuthed(KeyValueAuthHandler.java:288) [stormjar.jar:?]
at com.couchbase.client.core.endpoint.kv.KeyValueAuthHandler.channelRead0(KeyValueAuthHandler.java:173) [stormjar.jar:?]
at com.couchbase.client.core.endpoint.kv.KeyValueAuthHandler.channelRead0(KeyValueAuthHandler.java:52) [stormjar.jar:?]

Help needed .


#2

Hi Shaialkabetz,

Can you verify the username and password for the user you created exactly match the bucket name and password in your code?

Thanks,
David


#3

I am seeing the same issue. I use the docker containers latest tag for development. As part of my itests they run against a docker container

docker-compose excerpt
passes

  couchbase:
    image: couchbase:4.6.3
    ports:
      - "8091:8091"
      - "8092:8092"
      - "8093:8093"
      - "8094:8094"
      - "11210:11210"

fails (at time of writing latest = 5.0.0)

  couchbase:
    image: couchbase
    ports:
      - "8091:8091"
      - "8092:8092"
      - "8093:8093"
      - "8094:8094"
      - "11210:11210"

I use couchbase spring data and the Hopper-SR11 release train. This includes com.couchbase.client:java-client:2.2.8


#4

Here is the debug log from the client when it fails.

11:48:30.465 [main] INFO  o.s.t.c.s.DefaultTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]
11:48:30.498 [main] INFO  o.s.t.c.s.DefaultTestContextBootstrapper - Could not instantiate TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener]. Specify custom listener classes or make the default listener classes (and their required dependencies) available. Offending class: [javax/servlet/ServletContext]
11:48:30.499 [main] INFO  o.s.t.c.s.DefaultTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@32d2fa64, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@1d8d30f7, org.springframework.test.context.support.DirtiesContextTestExecutionListener@3e57cd70, org.springframework.test.context.transaction.TransactionalTestExecutionListener@9a7504c, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@2c039ac6]11:48:30.789 [main] INFO  o.s.c.s.GenericApplicationContext - Refreshing org.springframework.context.support.GenericApplicationContext@42607a4f: startup date [Fri Nov 03 11:48:30 PDT 2017]; root of context hierarchy
11:48:31.690 [main] DEBUG c.c.c.c.l.CouchbaseLoggerFactory - Using SLF4J as the default logging framework
11:48:31.696 [main] DEBUG c.c.c.d.i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
11:48:31.719 [main] DEBUG c.c.c.d.i.n.c.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 16
11:48:31.737 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent0 - java.nio.Buffer.address: available
11:48:31.737 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
11:48:31.738 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
11:48:31.738 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent0 - java.nio.Bits.unaligned: true
11:48:31.739 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent - Java version: 8
11:48:31.739 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent - -Dio.netty.noUnsafe: false
11:48:31.739 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent - sun.misc.Unsafe: available
11:48:31.740 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent - -Dio.netty.noJavassist: false
11:48:31.742 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent - Javassist: unavailable
11:48:31.742 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent - 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.
11:48:31.742 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent - -Dio.netty.tmpdir: /var/folders/m2/fdrj431n7d17ry2z5j7pw83h0000gn/T (java.io.tmpdir)
11:48:31.742 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
11:48:31.742 [main] DEBUG c.c.c.d.i.n.u.i.PlatformDependent - -Dio.netty.noPreferDirect: false
11:48:31.763 [main] DEBUG c.c.c.d.i.n.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
11:48:31.763 [main] DEBUG c.c.c.d.i.n.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
11:48:31.843 [main] INFO  c.c.client.core.CouchbaseCore - CouchbaseEnvironment: {sslEnabled=false, sslKeystoreFile='null', sslKeystorePassword='null', queryEnabled=false, queryPort=8093, bootstrapHttpEnabled=true, bootstrapCarrierEnabled=true, bootstrapHttpDirectPort=8091, bootstrapHttpSslPort=18091, bootstrapCarrierDirectPort=11210, bootstrapCarrierSslPort=11207, ioPoolSize=8, computationPoolSize=8, responseBufferSize=16384, requestBufferSize=16384, kvServiceEndpoints=1, viewServiceEndpoints=1, queryServiceEndpoints=1, searchServiceEndpoints=1, ioPool=NioEventLoopGroup, coreScheduler=CoreScheduler, eventBus=DefaultEventBus, packageNameAndVersion=couchbase-java-client/2.2.8 (git: 2.2.8, core: 1.2.9), 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, dcpConnectionName=dcp/core-io, callbacksOnIoPool=false, queryTimeout=75000, viewTimeout=75000, kvTimeout=2500, connectTimeout=5000, disconnectTimeout=25000, dnsSrvEnabled=false}
11:48:36.888 [main] DEBUG c.c.client.core.CouchbaseCore - Diagnostics {
  gc.ps marksweep.collectionCount=0,
  gc.ps marksweep.collectionTime=0,
  gc.ps scavenge.collectionCount=1,
  gc.ps scavenge.collectionTime=14,
  heap.pendingFinalize=0,
  heap.used=init = 268435456(262144K) used = 69425456(67798K) committed = 257425408(251392K) max = 3817865216(3728384K),
  mem.physical.free=1140260864,
  mem.physical.total=17179869184,
  mem.swap.free=643563520,
  mem.swap.total=4294967296,
  mem.virtual.comitted=10372026368,
  offHeap.used=init = 2555904(2496K) used = 21899392(21386K) committed = 22478848(21952K) max = -1(-1K),
  proc.cpu.time=4187338000,
  runtime.name=91821@Alexs-MacBook-Pro-2.local,
  runtime.spec=Oracle Corporation/Java Virtual Machine Specification: 1.8,
  runtime.startTime=1509734908972,
  runtime.sysProperties={gopherProxySet=false, awt.toolkit=sun.lwawt.macosx.LWCToolkit, file.encoding.pkg=sun.io, java.specification.version=1.8, com.couchbase.client.deps.io.netty.packagePrefix=com.couchbase.client.deps., sun.cpu.isalist=, sun.jnu.encoding=UTF-8, java.class.path=/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit-rt.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit5-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/lib/tools.jar:/Users/aedwards/Documents/DataRealm/product/checkout/repository-itests/out/integrationTest/classes:/Users/aedwards/Documents/DataRealm/product/checkout/repository/out/production/classes:/Users/aedwards/Documents/DataRealm/product/checkout/repository-itests/out/production/resources:/Users/aedwards/.m2/repository/com/data_realm/product/repository-core/0.2-SNAPSHOT/repository-core-0.2-SNAPSHOT.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-couchbase/2.1.11.RELEASE/fa9928e37d1e1a8f9b5df8eb3da3639410c0e7da/spring-data-couchbase-2.1.11.RELEASE.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-commons/1.12.11.RELEASE/ac256a5df93c0c62d2ea3c835d0454f97bc5678c/spring-data-commons-1.12.11.RELEASE.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.3/7c4f3c474fb2c041d8028740440937705ebb473a/logback-classic-1.2.3.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.slf4j/jcl-over-slf4j/1.7.25/f8c32b13ff142a513eeb5b6330b1588dcb2c0461/jcl-over-slf4j-1.7.25.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.25/da76ca59f6a57ee3102f8f9bd9cee742973efa8a/slf4j-api-1.7.25.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.springframework/spring-test/4.3.9.RELEASE/35bf4c38c9245f5baeeda4bea7c41f4f33c5daf3/spring-test-4.3.9.RELEASE.jar:/Users/aedwards/.m2/repository/junit/junit/4.12/junit-4.12.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/2.8.47/48840cfced22ec0c07203a0201c5ae7bc12557b5/mockito-core-2.8.47.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.springframework/spring-web/4.2.9.RELEASE/16cc1e5c3db699f71ef8596d63c961b9c6ed0d1d/spring-web-4.2.9.RELEASE.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/4.2.9.RELEASE/b6944e432c5e77232c436f8bb4454077633112d1/spring-context-4.2.9.RELEASE.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.springframework/spring-tx/4.2.9.RELEASE/7a1181e7f3d1006e03b32c9d96a8256ef0eabb65/spring-tx-4.2.9.RELEASE.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/4.2.9.RELEASE/939b7a69f8fc63c5667e4bd6b4b2d78798f9e637/spring-aop-4.2.9.RELEASE.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/4.2.9.RELEASE/2b9b6ebb4271c61e307f4eae8e00ccec23891440/spring-beans-4.2.9.RELEASE.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/4.2.9.RELEASE/f76f74435a37427ede1358412c3abf9a17a9e575/spring-expression-4.2.9.RELEASE.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/4.3.9.RELEASE/430b7298bfb85d66fb61e19ca8f06231b911e9f5/spring-core-4.3.9.RELEASE.jar:/Users/aedwards/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.6.14/871c3e49dc6183d0d361601c2f1d11abb1a6b48c/byte-buddy-1.6.14.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.6.14/ba1e5ba3a84fb2fbf2f4de9138df19665eec4d59/byte-buddy-agent-1.6.14.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.objenesis/objenesis/2.5/612ecb799912ccf77cba9b3ed8c813da086076e9/objenesis-2.5.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.2.3/864344400c3d4d92dfeb0a305dc87d953677c03c/logback-core-1.2.3.jar:/Users/aedwards/.m2/repository/com/data_realm/product/model-core/0.1-SNAPSHOT/model-core-0.1-SNAPSHOT.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/22.0/3564ef3803de51fb0530a8377ec6100b33b0d073/guava-22.0.jar:/Users/aedwards/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-collections4/4.1/a4cf4688fe1c7e3a63aa636cc96d013af537768e/commons-collections4-4.1.jar:/Users/aedwards/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_annotations/2.0.18/5f65affce1684999e2f4024983835efc3504012e/error_prone_annotations-2.0.18.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/com.google.j2objc/j2objc-annotations/1.1/ed28ded51a8b1c6b112568def5f4b455e6809019/j2objc-annotations-1.1.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/org.codehaus.mojo/animal-sniffer-annotations/1.14/775b7e22fb10026eed3f86e8dc556dfafe35f2d5/animal-sniffer-annotations-1.14.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/com.couchbase.client/java-client/2.2.8/ca90a01b0a1595ab415ea2e6e6d332e136a30d8/java-client-2.2.8.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.6.7/1857f49ee9dffe1c8d17d4c3980e0d713af2806/jackson-databind-2.6.7.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/com.couchbase.client/core-io/1.2.9/a6c68d157db0ebff43795f504e830ba09fef890b/core-io-1.2.9.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.6.0/a0990e2e812ac6639b6ce955c91b13228500476e/jackson-annotations-2.6.0.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.6.7/81838e08d5e10e33cdee7299f9682d836b78c63e/jackson-core-2.6.7.jar:/Users/aedwards/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/Users/aedwards/.gradle/caches/modules-2/files-2.1/io.reactivex/rxjava/1.0.17/1a653d18a3e41fae66a473d172649a0625cff107/rxjava-1.0.17.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar, java.vm.vendor=Oracle Corporation, sun.arch.data.model=64, idea.test.cyclic.buffer.size=1048576, java.vendor.url=http://java.oracle.com/, user.timezone=America/Vancouver, os.name=Mac OS X, java.vm.specification.version=1.8, user.country=CA, sun.java.launcher=SUN_STANDARD, sun.boot.library.path=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib, sun.java.command=com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit4 com.data_realm.product.checkout.repository.SpringCheckoutRepositoryITest,testFindOneByTenantIdAndSessionId, http.nonProxyHosts=local|*.local|169.254/16|*.169.254/16, sun.cpu.endian=little, user.home=/Users/aedwards, user.language=en, java.specification.vendor=Oracle Corporation, java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre, file.separator=/, line.separator=
, java.vm.specification.vendor=Oracle Corporation, java.specification.name=Java Platform API Specification, java.awt.graphicsenv=sun.awt.CGraphicsEnvironment, sun.boot.class.path=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/classes, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, ftp.nonProxyHosts=local|*.local|169.254/16|*.169.254/16, java.runtime.version=1.8.0_92-b14, user.name=aedwards, path.separator=:, os.version=10.13, java.endorsed.dirs=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/endorsed, java.runtime.name=Java(TM) SE Runtime Environment, file.encoding=UTF-8, sun.nio.ch.bugLevel=, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, java.io.tmpdir=/var/folders/m2/fdrj431n7d17ry2z5j7pw83h0000gn/T/, java.version=1.8.0_92, user.dir=/Users/aedwards/Documents/DataRealm/product/checkout/repository-itests, os.arch=x86_64, java.vm.specification.name=Java Virtual Machine Specification, java.awt.printerjob=sun.lwawt.macosx.CPrinterJob, sun.os.patch.level=unknown, java.library.path=/Users/aedwards/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:., java.vm.info=mixed mode, java.vendor=Oracle Corporation, java.vm.version=25.92-b14, java.ext.dirs=/Users/aedwards/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java, sun.io.unicode.encoding=UnicodeBig, java.class.version=52.0, socksNonProxyHosts=local|*.local|169.254/16|*.169.254/16},
  runtime.uptime=3044,
  runtime.vm=Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM: 25.92-b14,
  sys.cpu.loadAvg=3.3076171875,
  sys.cpu.num=8,
  sys.os.arch=x86_64,
  sys.os.name=Mac OS X,
  sys.os.version=10.13,
  thread.count=15,
  thread.peakCount=15,
  thread.startedCount=15
}
11:48:36.939 [main] DEBUG c.c.c.c.config.ConfigurationProvider - Setting seed hosts to [localhost/127.0.0.1]
11:48:36.954 [main] DEBUG c.c.client.core.RequestHandler - Got instructed to add Node localhost/127.0.0.1
11:48:36.954 [main] DEBUG c.c.client.core.RequestHandler - Connecting Node localhost/127.0.0.1
11:48:36.954 [main] DEBUG com.couchbase.client.core.node.Node - [localhost]: Got instructed to connect.
11:48:36.956 [main] DEBUG c.c.client.core.RequestHandler - Connect finished, registering for use.
11:48:36.957 [cb-computations-6] DEBUG c.c.client.core.RequestHandler - Got instructed to add Service CONFIG, to Node localhost/127.0.0.1
11:48:36.958 [cb-computations-6] DEBUG com.couchbase.client.core.node.Node - [localhost]: Adding Service CONFIG
11:48:36.961 [cb-computations-6] DEBUG com.couchbase.client.core.node.Node - [localhost]: Adding Service CONFIG to registry and connecting it.
11:48:36.961 [cb-computations-6] DEBUG c.c.client.core.service.Service - [localhost][ConfigService]: Got instructed to connect.
11:48:36.985 [cb-core-3-2] DEBUG c.c.c.d.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 16
11:48:36.985 [cb-core-3-2] DEBUG c.c.c.d.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 16
11:48:36.985 [cb-core-3-2] DEBUG c.c.c.d.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
11:48:36.985 [cb-core-3-2] DEBUG c.c.c.d.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11
11:48:36.985 [cb-core-3-2] DEBUG c.c.c.d.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 16777216
11:48:36.985 [cb-core-3-2] DEBUG c.c.c.d.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.tinyCacheSize: 512
11:48:36.985 [cb-core-3-2] DEBUG c.c.c.d.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
11:48:36.985 [cb-core-3-2] DEBUG c.c.c.d.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
11:48:36.985 [cb-core-3-2] DEBUG c.c.c.d.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
11:48:36.986 [cb-core-3-2] DEBUG c.c.c.d.i.n.b.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
11:48:36.998 [cb-core-3-2] DEBUG com.couchbase.client.core.node.Node - Disconnected (IDLE) from Node localhost/127.0.0.1
11:48:37.027 [cb-core-3-2] DEBUG c.c.c.d.i.n.u.i.ThreadLocalRandom - -Dio.netty.initialSeedUniquifier: 0x0600dbbdc9b68c50 (took 7 ms)
11:48:37.048 [cb-core-3-2] DEBUG c.c.c.d.io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: unpooled
11:48:37.048 [cb-core-3-2] DEBUG c.c.c.d.io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 65536
11:48:37.048 [cb-core-3-2] DEBUG c.c.c.d.io.netty.buffer.ByteBufUtil - -Dio.netty.maxThreadLocalCharBufferSize: 16384
11:48:37.119 [cb-io-1-1] DEBUG c.c.c.d.i.n.buffer.AbstractByteBuf - -Dcom.couchbase.client.deps.io.netty.buffer.bytebuf.checkAccessible: true
11:48:37.121 [cb-io-1-1] DEBUG c.c.c.d.i.n.u.ResourceLeakDetector - -Dcom.couchbase.client.deps.io.netty.leakDetection.level: simple
11:48:37.121 [cb-io-1-1] DEBUG c.c.c.d.i.n.u.ResourceLeakDetector - -Dcom.couchbase.client.deps.io.netty.leakDetection.maxRecords: 4
11:48:37.149 [cb-io-1-1] DEBUG c.c.client.core.endpoint.Endpoint - [localhost/127.0.0.1:8091][ConfigEndpoint]: Connected Endpoint.
11:48:37.150 [cb-io-1-1] INFO  com.couchbase.client.core.node.Node - Connected to Node localhost
11:48:37.151 [cb-io-1-1] DEBUG com.couchbase.client.core.node.Node - Connected (CONNECTING) to Node localhost/127.0.0.1
11:48:37.156 [cb-io-1-1] DEBUG c.c.c.deps.io.netty.util.Recycler - -Dio.netty.recycler.maxCapacity.default: 262144
11:48:37.194 [cb-io-1-1] DEBUG c.c.c.c.e.AbstractGenericHandler - [localhost/127.0.0.1:8091][ConfigEndpoint]: Channel Active.
11:48:37.204 [cb-io-1-1] WARN  c.c.c.c.e.ResponseStatusConverter - Unknown ResponseStatus with Protocol HTTP: 401
11:48:37.208 [cb-io-1-1] DEBUG c.c.client.core.endpoint.Endpoint - [localhost/127.0.0.1:8091][ConfigEndpoint]: Disconnected Endpoint.
11:48:37.208 [cb-io-1-1] INFO  com.couchbase.client.core.node.Node - Disconnected from Node localhost
11:48:37.209 [cb-io-1-1] DEBUG com.couchbase.client.core.node.Node - Disconnected (DISCONNECTING) from Node localhost/127.0.0.1
11:48:37.212 [main] INFO  c.d.p.r.c.s.RepositoryConfiguration - Couchbase Bootstrap Failure (class com.couchbase.client.java.error.InvalidPasswordException null).  Retrying in 1000ms (24458 ms remaining)
11:48:37.216 [cb-io-1-1] DEBUG c.c.c.c.e.AbstractGenericHandler - [localhost/127.0.0.1:8091][ConfigEndpoint]: Channel Inactive.
11:48:37.216 [cb-io-1-1] DEBUG c.c.client.core.endpoint.Endpoint - [null][ConfigEndpoint]: Got notified from Channel as inactive.
11:48:38.216 [main] DEBUG c.c.client.core.RequestHandler - Node localhost/127.0.0.1 already registered, skipping.
11:48:38.217 [cb-computations-1] DEBUG c.c.client.core.RequestHandler - Got instructed to add Service CONFIG, to Node localhost/127.0.0.1
11:48:38.217 [cb-computations-1] DEBUG com.couchbase.client.core.node.Node - [localhost]: Adding Service CONFIG
11:48:38.217 [cb-computations-1] DEBUG com.couchbase.client.core.node.Node - [localhost]: Service CONFIG already added, skipping.
11:48:38.219 [cb-core-3-2] DEBUG com.couchbase.client.core.node.Node - Disconnected (IDLE) from Node localhost/127.0.0.1
11:48:38.224 [cb-io-1-2] DEBUG c.c.client.core.endpoint.Endpoint - [localhost/127.0.0.1:8091][ConfigEndpoint]: Connected Endpoint.
11:48:38.224 [cb-io-1-2] INFO  com.couchbase.client.core.node.Node - Connected to Node localhost
11:48:38.224 [cb-io-1-2] DEBUG com.couchbase.client.core.node.Node - Connected (CONNECTING) to Node localhost/127.0.0.1
11:48:38.234 [cb-io-1-2] DEBUG c.c.c.c.e.AbstractGenericHandler - [localhost/127.0.0.1:8091][ConfigEndpoint]: Channel Active.
11:48:38.235 [cb-io-1-2] WARN  c.c.c.c.e.ResponseStatusConverter - Unknown ResponseStatus with Protocol HTTP: 401
11:48:38.235 [cb-io-1-2] DEBUG c.c.client.core.endpoint.Endpoint - [localhost/127.0.0.1:8091][ConfigEndpoint]: Disconnected Endpoint.
11:48:38.235 [cb-io-1-2] INFO  com.couchbase.client.core.node.Node - Disconnected from Node localhost
11:48:38.235 [cb-io-1-2] DEBUG com.couchbase.client.core.node.Node - Disconnected (DISCONNECTING) from Node localhost/127.0.0.1
11:48:38.236 [main] INFO  c.d.p.r.c.s.RepositoryConfiguration - Couchbase Bootstrap Failure (class com.couchbase.client.java.error.InvalidPasswordException null).  Retrying in 1000ms (23434 ms remaining)

....
And so on until some retry/timeout is reached

#5

I am having the same exception. How did you solve this problem? I think Spring Data needs an update for CB 5.0.


#6

Please read the docs. You can create a username the same as the bucket and set the password on that so the earlier SDK can auth.


#7

Hi, Thanks for your reply.

My problem wasn’t related with CB. Spring Data versioning is too confusing. I found the right version and everything works fine now.


#8

Any suggestions for deailing with this in test phase of build? We create/delete buckets in test setup/tear down and still have this error. Tried creating a user with full privileges that is named the same as the bucket we create during our tests still yields the same authentication exception as OP. Any help would be greatly appreciated. My head hurts from banging it against the wall so much :slight_smile:

Thanks,
Ray


#9

It’s hard to say without knowing where the issue is occurring, but my guess is that you may need to pause a bit between configuring things and using them. Unfortunately, the Couchbase REST management interface acknowledges requests and then does them asynchronously, so test scaffolding like this needs to pause a bit.

To verify that, you may want to turn the log level up and see where things go wrong. If it’s something like opening a bucket milliseconds after the bucket/user are created, that might be why.

It’s a long known issue filed by yours truly. MB-8504, later closed as a duplicate of MB-11484.


#10

K, thanks for the info, very much appreciate it. I guess probably the simplest solution would be to require a bucket to exist before test can run, hurts a bit to take the easy way out, but probably best solution for now.

thx again.


#11

I found where the issue. I don’t know if there is a place for suggestions, but I’ve definitely got one to add if there is -

My problems happened when we upgraded to 5.0.1 server. During this time we also upgraded java client from 2.1.3 to 2.5.6. We have quite a bit of test coverage that has all been working well for a very long time. It appears that there was an innocuous, but for me, significant change, that is not truly reflected in the javadoc from
2.1.3 here:
http://docs.couchbase.com/sdk-api/couchbase-java-client-2.1.3/com/couchbase/client/java/bucket/BucketManager.html#getDesignDocument-java.lang.String-

to 2.5.6 here:
http://docs.couchbase.com/sdk-api/couchbase-java-client-2.5.6/com/couchbase/client/java/bucket/BucketManager.html#getDesignDocument-java.lang.String-

They both have the same signature, and say the same things for the return value, but instead of returning null when design document doesn’t exist, now a DesignDocumentDoesNotExistException (a runtime exception!) is being thrown. We use Guice for dependency injection, so tracking down this runtime exception was quite tricky as it was very difficult to determine in test run where it was originating.

Maybe I’m too old or we have a unique setup but it seems not so great to keep a method signature the same, but unexecpectedly throw a runtime exception where previously method was returning null without really mentioning it. That’s the kind of thing I might deprecate a method for, or at least call out more explictly. (I"m awre that in the javadoc if you read the description it notes the runtime exception, but it’s not marked in @throws where one might expect that sort of thing.

Anyways, if more appropriate place for this is elsewhere, let me know.
Ray.


#12

This change was introduced in 2.4.0, sorry that it broke something for you - the upside is that the API is now more consistent (https://github.com/couchbase/couchbase-java-client/commit/97a0a5dd0a069dacdef445948d058623776690ca). The javadoc shows both exception in the list and has the null thing in the docs, so you are right that it is inconsistent. I’ll open a ticket to track the doc fix.