【问题标题】:cannot connect to memcached server with sasl enabled无法连接到启用 sasl 的 memcached 服务器
【发布时间】:2015-09-23 21:42:59
【问题描述】:

我在运行 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

我已经确认测试客户端可以连接到其他服务器了。

有什么想法吗?

【问题讨论】:

    标签: ubuntu memcached sasl


    【解决方案1】:

    我在尝试使用 spy-memcached 库连接 DIGEST-MD5 时看到完全相同的错误。

    在我的例子中,spy-memcached 库不支持使用“DIGEST-MD5”机制进行身份验证。

    检查 sasl_test 是否支持 DIGEST-MD5。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多