2017-08-10 34 views
1

リモートのcouchbaseバケット 'SAMPLE'の中にjsonドキュメント 'test'を作成しました。 Couchbaseのための URLはhttp://testcouch.employee.com:8091/index.html ある - IPは、ソファのための124.10.0.2couchbase java認証失敗の問題

ユーザー名です:helloUserソファ用

パスワード:helloUser ++

Connection.java 

static CouchbaseEnvironment couchbaseEnvironment = DefaultCouchbaseEnvironment.builder() 
     .queryTimeout(10000) 
     .build(); 

    static Cluster cluster = CouchbaseCluster.create(couchbaseEnvironment,"http://testcouch.employee.com"); 

    static Bucket bucket = cluster.openBucket("SAMPLE","helloUser++"); 

エラーの下になって接続しようとする:

WARNING: [null][KeyValueEndpoint]: Could not connect to endpoint, retrying with delay 32 MILLISECONDS: com.couchbase.client.core.endpoint.kv.AuthenticationException: Authentication Failure at com.couchbase.client.core.endpoint.kv.KeyValueAuthHandler.checkIsAuthed(KeyValueAuthHandler.java:288) at com.couchbase.client.core.endpoint.kv.KeyValueAuthHandler.channelRead0(KeyValueAuthHandler.java:173)

答えて

0

に与えられたパスワードコールは、バケットを作成したときに指定したコールです。

Couchbaseウェブコンソールのパスワードを使用しているようです。

バケットパスワードの作成を思い出さない場合は、通話からパスワードを削除してみてください。

1

同じエラーが発生しました。 UIからバケットを作成する場合、バケット・レベル(v community 5.0.0)で「パスワード」を定義するオプションはありません。

代わりに私はユーザーを作成し、管理者にターゲットバケットに権限を与えました。メニューでセキュリティを選択して、トップRIGHにopenBucket

Cluster cluster = CouchbaseCluster.create(couchbaseEnvironment,"http://testcouch.employee.com"); 
couchBaseCluster.authenticate("helloUser", "helloUser++"); 
Bucket bucket = cluster.openBucket("SAMPLE",""); 
ではないクラスタオブジェクトに指定されたパスワードを

「ユーザーを追加」

関連する問題