linux - Redis Id 不可读

标签 linux redis fedora

<分区>

07c37dfeb235213a872192d90877d0cd55635b91 127.0.0.1:30004 slave e7d1eecce10fd6bb5eb35b9f99a514335d9ba9ca 0 1426238317239 4 connected
67ed2db8d677e59ec4a4cefb06858cf2a1a89fa1 127.0.0.1:30002 master - 0 1426238316232 2 connected 5461-10922
292f8b365bb7edb5e285caf0b7e6ddc7265d2f4f 127.0.0.1:30003 master - 0 1426238318243 3 connected 10923-16383
6ec23923021cf3ffec47632106199cb7f496ce01 127.0.0.1:30005 slave 67ed2db8d677e59ec4a4cefb06858cf2a1a89fa1 0 1426238316232 5 connected
824fe116063bc5fcf9f4ffd895bc17aee7731ac3 127.0.0.1:30006 slave 292f8b365bb7edb5e285caf0b7e6ddc7265d2f4f 0 1426238317741 6 connected
e7d1eecce10fd6bb5eb35b9f99a514335d9ba9ca 127.0.0.1:30001 myself,master - 0 0 1 connected 0-5460

以上是“CLUSTER NODES”的输出。 id: 节点 ID,一个 40 个字符的随机字符串,在创建节点时生成,并且再也不会更改:这是不可读的,我可以将其更改为更用户友好的文本,如“Master1”或“SLave1”

最佳答案

根据 http://redis.io/topics/cluster-spec#cluster-nodes-attributes :

Every node has a unique name in the cluster. The node name is the hex representation of a 160 bit random number, obtained the first time a node is started (usually using /dev/urandom). The node will save its ID in the node configuration file, and will use the same ID forever, or at least as long as the node configuration file is not deleted by the system administrator, or a hard reset is requested via the CLUSTER RESET command.

这引出了一个问题 - 您是否尝试过编辑节点的配置文件?

关于linux - Redis Id 不可读,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37251888/

相关文章:

linux - 在 Linux 上自动化串口通信

replication - Redis 在复制中是否单次写入主控?

java - 需要在 Fedora 13/Linux 上安装和配置 Java JDK 和 Tomcat 的简单方法

c - Nginx 代理模块和套接字描述符传递

c++ - 错误 :expected unqualified-id before '=' token

redis - 使用模式删除 Redis 键

javascript - 如何在 Redis 的 multi.exec() 之外使用列表值?

找不到 Javah 错误

linux - makefile 可以更新调用环境吗?

android - 我们在哪里写入/proc/net/xt_qtaguid?