【问题标题】:ElastiCache for Redis: set key value hanging indefinitely in redis-cliElastiCache for Redis:在 redis-cli 中设置键值无限期挂起
【发布时间】:2021-11-29 11:15:58
【问题描述】:

我正在尝试在 Amazon ElastiCache for Redis 中保存一个键值对,但 set 命令卡住了。

我先做:

redis-cli -h ${aws-elasticache-cluster-url} -p 6739

然后:

aws-elasticache-cluster-url:6739> set mykey "myvalue"

命令卡在这里,不表示成功或失败。

如果它工作正常,该命令应该打印“OK”。

怎么了?

我尝试的步骤来自此文档 https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/GettingStarted.ConnectToCacheNode.html

【问题讨论】:

  • 你的aws-elasticache-cluster-url 绝对正确吗?
  • 另外 - 如果您有集群,您是否使用主端点?
  • @ErmiyaEskandary 这是因为在 elasticache 中启用了 TLS。我已经通过添加启用 ssl 并将身份验证令牌附加到命令和代码来修复。

标签: amazon-web-services amazon-ec2 redis amazon-elasticache


【解决方案1】:

我发现我的 elasticache 集群设置为 TLS 模式。这就是为什么它无法在 redis 中运行 get/set 的原因。对命令和代码启用 ssl 将有助于使用 get/set 运行。希望这对遇到同样问题的人有所帮助。

https://redis.io/topics/rediscli

https://redis.io/topics/encryption

【讨论】:

    猜你喜欢
    • 2019-02-02
    • 2018-05-21
    • 1970-01-01
    • 1970-01-01
    • 2015-04-05
    • 2017-06-08
    • 1970-01-01
    • 2015-10-01
    • 2017-08-02
    相关资源
    最近更新 更多