Moxi configuration with SASL auth

I have setup a Couchbase Community Server 4.5.1 (Linux Debian jessie) with a couchbase bucket named “btest” on standard port 11211 (with password “mypass”, as it seems that Dedicated port are deprecated…).

Now I am trying to setup moxi in order to access my bucket using a simple memcached protocol.

I want moxi to run on localhost too (for testing purpose), on port 11212.

moxi is not very well documented I think, and I am not sure how to setup moxi for my use case…

If I run moxi like this:

./moxi -z 11212=localhost:11211

I logically receive an “auth_error” as I didn’t specify the bucket password.

~# telnet 127.0.0.1 11212
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
set key 0 900 4
data
SERVER_ERROR a2b auth_error

How can I specify the couchbase bucket password in the moxi configuration flags?

The only way to make it work for me was to specify the “Administrator” user using a http/rest-based url:

./moxi -Z usr=Administrator,pwd=myadminpass,port_listen=11212 http://127.0.0.1:8091/pools/default/bucketsStreaming/btest

~# telnet 127.0.0.1 11212
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
set key 0 900 4
data
STORED

I think I missed something with moxi ou Couchbase bucket usage…

The moxi documentation is available here: http://docs.couchbase.com/moxi-guide/

Thank you for your reply and the moxi guide link.
l will read it in more detail.

However, this does not seems very up-to-date. Download link is broken (I was looking for a moxi stand-alone debian package) and documentation refers to moxi v2.5 when latest moxi release is v4.6.2 (according to github repository).

There’s virtually no difference between moxi v2.5 and v4.6.2 - it’s essentially been in maintenance mode for a long time; the version update it just to match the rest of Couchbase Server version. That documentation is still up-to-date.

Ok, I see indeed that there was not much commits between these two releases…

Still about moxi, is it supposed to compile from the github repository (in its latest version) ? “./config” folder has disappeared in recent releases :frowning:

It’s built as part of the server build typically, not sure how easy it is to build standalone.

What platform do you want it for - are the available binaries not suitable?

I am looking to install moxi on Linux Debian 7+ (Wheezy, Jessie and Stretch).

And I find it a bit cumbersome to install the whole couchbase-server package on my PHP web servers to use the only moxi binary.
In addition, an init.d or systemd configuration file is missing, which must be built manually for moxi.

For the full story, I do not use a smart couchbase client (that’s why I think I need the moxi proxy) because I want to use the “memcached” PHP save_handler for storing PHP Sessions in a Couchbase cluster. But tell me If I am on the wrong way :slight_smile:

In any case, thank you for your help.

That’s not necessary, there are standalone moxi packages, however it looks like the recent website refresh doesn’t show them currently. However the link for Debian 7 is: https://packages.couchbase.com/releases/moxi/4.6.0/moxi-server_4.6.0-debian7_amd64.deb

You’ll probably find it easier to just use a native Couchbase PHP session handler. I’ve not done this myself, but see for example: http://nitschinger.at/How-to-store-PHP-sessions-in-Couchbase/

Thanks for the link to moxi-server Debian package ! :+1:

Implementing a custom PHP session handler using the PHP Couchbase library can be an option, you’re right. But I liked the idea of a completely code-independent solution…

I will evaluate the two options.

Hi folks,

how do you find those new moxi releases? Is this enterprise only as I am not able to browse for moxi releases under the url packages.couchbase.com.
I would need a latest version for centos 7.

thx for information