我在运行ubuntu的AWS上的memcached实例上设置SASL遇到了一些困难。
规格:
- memcached-1.4.24:使用——enable-sasl编译,以-S开始
- Ubuntu 14.04.2 LTS
- 从Ubuntu 12.04.5连接
当尝试连接时,我在memcached日志中看到以下内容:
<31 new binary client connection.
<31 Read binary protocol data:
<31 0x80 0x20 0x00 0x00
<31 0x00 0x00 0x00 0x00
<31 0x00 0x00 0x00 0x00
<31 0x00 0x02 0x00 0x00
<31 0x00 0x00 0x00 0x00
<31 0x00 0x00 0x00 0x00
authenticated() in cmd 0x20 is true
>31 Writing bin response:
>31 0x81 0x20 0x00 0x00
>31 0x00 0x00 0x00 0x00
>31 0x00 0x00 0x00 0x2e
>31 0x00 0x02 0x00 0x00
>31 0x00 0x00 0x00 0x00
>31 0x00 0x00 0x00 0x00
<31 Read binary protocol data:
<31 0x80 0x21 0x00 0x0a
<31 0x00 0x00 0x00 0x00
<31 0x00 0x00 0x00 0x0a
<31 0x00 0x02 0x00 0x00
<31 0x00 0x00 0x00 0x00
<31 0x00 0x00 0x00 0x00
authenticated() in cmd 0x21 is true
mech: ``DIGEST-MD5'' with 0 bytes of data
SASL (severity 5): DIGEST-MD5 server step 1
sasl result code: 1
>31 Writing bin response:
>31 0x81 0x21 0x00 0x00
>31 0x00 0x00 0x00 0x21
>31 0x00 0x00 0x00 0x78
>31 0x00 0x02 0x00 0x00
>31 0x00 0x00 0x00 0x00
>31 0x00 0x00 0x00 0x00
<31 connection closed.
SASL (severity 5): DIGEST-MD5 common mech dispose
我正在使用博客文章中的样例客户端sasl_test测试来自客户端的连接:http://blog.memcachier.com/2014/11/05/ubuntu-libmemcached-and-sasl-support/
显示如下输出:
$ ./sasl_test user password ec2-52-6-196-187.compute-1.amazonaws.com
Set failed: WRITE FAILURE
我已经确认测试客户端可以连接到其他服务器。
任何想法?
我在尝试使用spy-memcached库连接DIGEST-MD5时看到完全相同的错误。
在我的例子中,spy-memcached库不支持带有'DIGEST-MD5'机制的Auth。
检查sasl_test是否支持DIGEST-MD5