我在运行 ubuntu 的 AWS 上的 memcached 实例上设置 SASL 时遇到了一些困难。
眼镜:
尝试连接时,我在 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”机制进行身份验证。
检查 sasl_test 是否支持 DIGEST-MD5。
关于ubuntu - 无法连接到启用 sasl 的 memcached 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31251014/