Couchbase 5.x Moxi Clearification

As I want to upgrade to Couchbase 5.x and Moxi is deprecated after Couchbase 4.5 I need to run my own Moxi service as I cannot use the SDK for memcached.

This seems quite simple but I’m not sure how to debug this and don’t have it all clear.

On Ubuntu I use the following package:

This package installs OK.

Then as 5.x comes with SASL Buckets only you need to be beware you use sasl buckets when setting up Moxi:


# Please point moxi at your membase cluster by specifying
# a membase REST URL.
# The moxi server won't start correctly until after you
# edit and uncomment the url line below...
# url=http://HOSTNAME:8091/pools/default/bucketsStreaming/default

Then, /opt/moxi/etc/moxi.cfg

usr=sessionBucketName, // As far as I can see the user in couchbase for the bucket
pwd=test123, // The password for the bucketuser





But here does something go wrong. I can telnet on 11211 but I cannot use my memcached connection in some memcached testscript. So I’m unsure, as the docs are not ideal there, how to debug this and if this is already the right way.

Moxi seems to be running with the needed config files:

root@myserver-01:~# ps aux | grep moxi
192:moxi      6987  0.1  0.2 432232  5356 ?        Ssl  17:33   0:01 /opt/moxi/bin/../bin/moxi.actual -r -d -P /var/run/ -Z /opt/moxi/etc/moxi.cfg -z /opt/moxi/etc/moxi-cluster.cfg -u moxi

I know about but this doesn’t satify me.

What do I miss here ?

I’m running into the same problem but get a bit further than you with the configuration.
It appears that because of the CBAC introduction you need to specifically connect to a bucket end point to make the connection work:

and then in the moxi.cfg you need to define the bucket name explicitly

and remove the default_bucket_name entry

However: after doing this you can still not use moxi, as the CBAC seems to have broken formatting on the requests. In the couchbase log you will see
[ns_server:info,2018-03-11T16:31:07.954Z,babysitter_of_ns_1@<0.77.0>:ns_port_server:log:223]memcached<0.77.0>: 2018-03-11T16:31:07.753823Z WARNING 46 [ - (moxi-test;legacy) ]: no access to command (null)
for every command you are trying to execute against the bucket

It appears that couchbase intentionally is breaking this compatibility, and their lack of response makes me switch to Redis. If I’m having to make application changes I might as well gain performance from it as well.