ubuntu - 无法连接到启用 sasl 的 memcached 服务器

标签 ubuntu memcached sasl

我在运行 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”机制进行身份验证。
    检查 sasl_test 是否支持 DIGEST-MD5。

    关于ubuntu - 无法连接到启用 sasl 的 memcached 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31251014/

    相关文章:

    java - java 的 sleep() 和 c 的 sleep() 之间有什么区别?

    linux - ubuntu 在 ps -ef 命令中不显示用户名

    java - Hive、JDBC、TTransportException : SASL authentication not complete

    apache - TortoiseSVN 无法认证

    centos - SASL 认证失败 : Mutt - CPANEL - CentOS

    Ubuntu 16 - Active Directory - 可以 ssh - 不能 rdp

    linux - 从 ubuntu 服务器获取文件

    hibernate.cache.region.factory_class 在 hibernate.cfg.xml 中需要

    memory-management - Memcache 逐出策略

    django - 什么是防止 memcached CacheKeyWarning 的好/结构化方法?