Issue with creating a bucket with a specific user

I’m trying to use the following tool to convert an oracle db to a set of buckets: .

One issue I ran into is that it tries to open a bucket with a line like the following:

couchbaseBucket = CouchbaseCluster.create(Arrays.asList(Config.getCbClusterAddress().split(",")))
				.openBucket(Config.getCbBucketName(), Config.getCbBucketPassword());

This reference to a bucket password threw me for a bit until someone on #couchbase mentioned that this appears to be aimed at version 4.x, which has a password on each bucket. My workaround at the time was to create a user with the same name as the bucket, with that password.

I’ve since realized that I need to create quite a few buckets, and I’m trying to do this in an automated fashion. I’d really prefer to have a single admin user that can do this. Is there a variation of this call that can use the single admin user, instead of the bucket user?

I’ve tried to upgrade to the latest version of java-client (2.5.5), but it seems to be the same in this respect. Opening a bucket requires a bucket name and a password, so it appears that it still requires a user name matching the bucket name.

For now I’m going to move forward with creating a user for each bucket and see what other issues I run into. I barely squeaked by here, as I’m using the community edition, and it appears that the number of tables/buckets I require exactly matches the user limit. :slight_smile:

This is covered in the documentation. See the start using page for SDK 2.5.

Basically, there’s an Authenticator interface and if you use it the old way, it still works for server 4.x compat reasons. You should use it the new way, as documented.

The bug is with the tool you’re using. By the way, I filed an issue on it to support the later authenticator.

Looks pretty simple. I’ve already made local changes to it to support “dumb” tables (no PK), and a build script. It also needs to produce a shadow jar for convenience, and provide a real command line interface, not just property settings. Based on what I see in the original project, I have a feeling I’ll be forking this.