Trouble With Bucket Password

Hi, i’m new with Couchbase connector and i’m stucking with the spark connector. I’m using scala, spark 2.2 and couchbase CE 5.

My SparkSession builder is like this

import com.couchbase.spark.sql._

val spark:SparkSession = { SparkSession.builder
.appName(“Test”)
.master(“local[*]”)
.config(“spark.couchbase.nodes”, “127.0.0.1”)
.config(“spark.couchbase.bucket.test-bucket”, “”) // open the bucket with empty password
.getOrCreate()
}

Withouth couchbase config i haven’t got any troubles to run sparkSession but with this 2 .config i still have this bucket password exception :
com.couchbase.client.java.error.InvalidPasswordException: Passwords for bucket “test-bucket” do not match.

I didn’t find any error in my code :frowning: (perhaps i’m blind) Thanks for your help :slight_smile:

You need to provide a username and a password if you are using 5.0 with RBAC… like so: https://github.com/couchbaselabs/couchbase-spark-samples/blob/master/src/main/scala/KeyValueExample.scala#L48

Thanks !!! You saved my day :smiley:

1 Like