Creating Bucket using REST API: cannot set proxy port

Hi.
Using a local dev installation of Couchbase 5.5.5, I try to create a bucket using the REST API as follows:

curl -X POST -u : http://localhost:8091/pools/default/buckets -d name=Catalogue -d ramQuotaMB=100 -d authType=none -d proxyPort=11212

This worked with my version 4.6.4 installation, but with 5.5.5 it fails with {“proxyPort”:“Setting proxy port is not allowed on this version of the cluster”}

If I remove the Proxy port parameter, the command works and my bucket is created. All documentation states that ProxyPort is a required parameter.

Am I missing something, or is the documentation wrong?

Thanks

Hello @gary-562 and welcome to the forums.

The proxyPort parameter enables Server Side Moxi, this allows legacy Memcached SDK to talk to Couchbase Server. In Couchbase Server 5.0.X Server side Moxi was deprecated and has been removed in 5.5.5. It’s recommended to use one of the Couchbase Server SDKs or Client side moxi instead.

If one of the Couchbase Server SDK are already being used then this setting is not being used and it will not affect the setup.

Cheers,
Patrick

Thanks for the quick reply Patrick. That all makes sense. Seems then that the documentation needs correcting, still says this is a required parameter.

I’m using a Kafka connector for couchbase, and upgrading to 5.5.5 has broken it. Maybe it is using the Memcached SDK. I’ll investigate.

Thanks again

I have created DOC-5819 defect to fix this issue. If you do spot other issues with the documentation please use the feedback button at the bottom right, it will create a defect for the issue.

I’m using a Kafka connector for couchbase, and upgrading to 5.5.5 has broken it. Maybe it is using the Memcached SDK. I’ll investigate.

Is it the Couchbase Server Kafka Connector, if so it’s build upon the Couchbase Server SDK.

Hi Patrick

Yes, that’s the one I’m using, so maybe I’m barking up the wrong tree. I’ll do some more investigation, thanks.

Specifically, this is the connector I am using https://github.com/couchbase/kafka-connect-couchbase

Found the problem with my kafka-connect-couchbase. The error “Cannot fetch configuration for bucket” was caused by me not providing authentication credentials.

When using couchbase 4.6.4 I had not password associated with the bucket whose events I was publishing to Kafka. On upgrading to version 5.5.5, Couchbase implicitly password-protected the bucket. so I needed to add additional properties to my connector’s config: “connection.username” and “connection.password”.

This is intended to be handled transparently in a rebalance upgrade, but 5.x does indeed have a breaking change. In releases prior to 5.x, the only credentials allowed are bucketname/password and in 5.x you’re required to have a username/bucketname/password.

A rebalance upgrade transparently creates a username with the same name as the bucket, but if you test a different way (say with 5.5.5 installation directly), it wouldn’t cover this. This is in the documentation.

Was there something you think should be added to docs.couchbase.com to improve finding this? If so, it’d be great to get feedback.