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:

https://forums.couchbase.com/t/moxi-ubuntu-packages/14209

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:

/opt/moxi/etc/moxi-cluster.cfg

# 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
url=http://127.0.0.1:8091/pools/default/saslBucketsStreaming

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

port_listen=11211,

default_bucket_name=sessionBucketName,

downstream_max=1024,
downstream_conn_max=4,
downstream_conn_queue_timeout=200,
downstream_timeout=5000,
wait_queue_timeout=200,
connect_max_errors=5,
connect_retry_interval=30000,
connect_timeout=400,
auth_timeout=100,

cycle=200

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/moxi-server.pid -Z /opt/moxi/etc/moxi.cfg -z /opt/moxi/etc/moxi-cluster.cfg -u moxi

I know about https://github.com/couchbase/moxi 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:
url=http://myhostname:8091/pools/default/bucketsStreaming/mybucketname

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

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@127.0.0.1:<0.77.0>:ns_port_server:log:223]memcached<0.77.0>: 2018-03-11T16:31:07.753823Z WARNING 46 [ 89.162.2.192:58382 - 172.31.17.82:11210 (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.