【发布时间】:2014-01-23 01:03:18
【问题描述】:
当我在端口 6379 上远程登录到我的 Redis 服务器时,我应该能够使用http://redis.io/topics/protocol 中概述的协议规范。相反,我得到无效的批量长度。我在初始 *3(启动协议规范)之后放置的任何内容都会引发此错误。 我在 Suse Linux Enterprise 11 上使用 Bash。
例如:
telnet localhost 6379
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
*3\r\n$5\r\nLPUSH\r\n$4\r\nlogs\r\n$20\r\n"this is some data!"\r\n
-ERR Protocol error: invalid multibulk length
Connection closed by foreign host.
甚至:
telnet localhost 6379
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
*3\r\n
-ERR Protocol error: invalid multibulk length
Connection closed by foreign host.
我使用的是应该支持协议规范的 Redis 2.6(Redis 服务器 v=2.6.13)。 我可能做错了什么? 提前致谢, 科尔
【问题讨论】: