大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
本篇内容主要讲解“redis错误failed: Hostname must not be empty or null怎么解决”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Redis错误failed: Hostname must not be empty or null怎么解决”吧!
成都创新互联公司是专业的叶县网站建设公司,叶县接单;提供做网站、成都网站设计,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行叶县网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!
1.收到大量应用告警
Could not retrieve cluster information. CLUSTER NODES returned with error. - 172.23.17.57:6379 failed: Hostname must not be empty or null
2.登陆集群机器查看
[root@aliyun-mb-welike-prod-rdc-1-b-01 ~]# /usr/local/src/redis-4.0.8/src/redis-trib.rb check 172.23.13.194:6379 >>> Performing Cluster Check (using node 172.23.13.194:6379) S: aa30a9c5004d2492d01c90692f7de8d3b90fd4ed 172.23.13.194:6379 slots: (0 slots) slave replicates 7122bb26444cb62228396e89ae3db97eda256926 S: 39f2b3370729bf2e99f4b0efeb96b58cb849ac91 172.23.13.200:6379 slots: (0 slots) slave replicates 1e3b30a7e08279067cb193a8d550c3b22230a629 S: a6fb7fb6e9243c5cc9679daaa3d3aacbf71f0e5a 172.23.13.195:6379 slots: (0 slots) slave replicates c3bbc8f04e902d16cc0a40516a292715b74b4d19 M: c3bbc8f04e902d16cc0a40516a292715b74b4d19 172.23.17.58:6379 slots:2068-2105,2636-4996,5463-6374,7283-7541,9741-9771,10923-11417 (4096 slots) master 1 additional replica(s) M: 7122bb26444cb62228396e89ae3db97eda256926 172.23.17.55:6379 slots:28,431,1967-2067,7104-7282,8194-9106,9719-9740,11833-12434,12436-12617,14417-16383 (3968 slots) master 1 additional replica(s) S: 011401a43fbe38dad3ff6dfc429aa1e987436aa8 172.23.17.57:6379 slots: (0 slots) slave replicates 5cb816f4c9f9d48c7bba5115b7a89c881bf6b46f S: 45b52d2692c3c16d91c360b3b4c18c4ae18e4f28 172.23.17.55:6380 slots: (0 slots) slave replicates a6dd59d54ffacbbe7ade84d4ffeaa746e99e724c S: 600cb902806705526037d12ca94dfbde8d27318a 172.23.13.194:6380 slots: (0 slots) slave replicates a6dd59d54ffacbbe7ade84d4ffeaa746e99e724c M: a6dd59d54ffacbbe7ade84d4ffeaa746e99e724c 172.23.13.201:6379 slots:12435 (1 slots) master 2 additional replica(s) M: 5cb816f4c9f9d48c7bba5115b7a89c881bf6b46f 172.23.13.196:6379 slots:861-1145,1822-1966,2234-2635,6706-7103,9298-9718,9778-9782,9785-10922,12618-13654,14025-14416 (4223 slots) master 1 additional replica(s) M: 1e3b30a7e08279067cb193a8d550c3b22230a629 172.23.17.56:6379 slots:0-27,29-430,432-860,1146-1821,2106-2233,4997-5462,6375-6705,7542-8193,9107-9297,9772-9777,9783-9784,11418-11832,13655-14024 (4096 slots) master 1 additional replica(s) [OK] All nodes agree about slots configuration. >>> Check for open slots... >>> Check slots coverage... [OK] All 16384 slots covered.
哟,好像集群状态正常,也没找到这个ip的信息啊
3.继续查看节点信息
[root@aliyun-mb-welike-prod-rdc-1-b-01 ~]# /usr/local/redis//bin/redis-cli -a inH7HkD7iXoxKZCi -h 172.23.13.194 -c cluster nodes 1e54bab9fb0f02e634cf9c958613f3814d221d9f :0@0 slave,fail,noaddr 1e3b30a7e08279067cb193a8d550c3b22230a629 1552634222097 1552634217000 89 disconnected aa30a9c5004d2492d01c90692f7de8d3b90fd4ed 172.23.13.194:6379@16379 myself,slave 7122bb26444cb62228396e89ae3db97eda256926 0 1552876530000 67 connected 39f2b3370729bf2e99f4b0efeb96b58cb849ac91 172.23.13.200:6379@16379 slave 1e3b30a7e08279067cb193a8d550c3b22230a629 0 1552876532139 89 connected a6fb7fb6e9243c5cc9679daaa3d3aacbf71f0e5a 172.23.13.195:6379@16379 slave c3bbc8f04e902d16cc0a40516a292715b74b4d19 0 1552876530134 90 connected c3bbc8f04e902d16cc0a40516a292715b74b4d19 172.23.17.58:6379@16379 master - 0 1552876532000 90 connected 2068-2105 2636-4996 5463-6374 7283-7541 9741-9771 10923-11417 7122bb26444cb62228396e89ae3db97eda256926 172.23.17.55:6379@16379 master - 0 1552876531000 87 connected 28 431 1967-2067 7104-7282 8194-9106 9719-9740 11833-12434 12436-12617 14417-16383 011401a43fbe38dad3ff6dfc429aa1e987436aa8 172.23.17.57:6379@16379 slave 5cb816f4c9f9d48c7bba5115b7a89c881bf6b46f 0 1552876531000 91 connected 45b52d2692c3c16d91c360b3b4c18c4ae18e4f28 172.23.17.55:6380@16380 slave a6dd59d54ffacbbe7ade84d4ffeaa746e99e724c 0 1552876531138 92 connected 600cb902806705526037d12ca94dfbde8d27318a 172.23.13.194:6380@16380 slave a6dd59d54ffacbbe7ade84d4ffeaa746e99e724c 0 1552876533000 92 connected a6dd59d54ffacbbe7ade84d4ffeaa746e99e724c 172.23.13.201:6379@16379 master - 0 1552876533142 92 connected 12435 5cb816f4c9f9d48c7bba5115b7a89c881bf6b46f 172.23.13.196:6379@16379 master - 0 1552876530000 91 connected 861-1145 1822-1966 2234-2635 6706-7103 9298-9718 9778-9782 9785-10922 12618-13654 14025-14416 1e3b30a7e08279067cb193a8d550c3b22230a629 172.23.17.56:6379@16379 master - 0 1552876534145 89 connected 0-27 29-430 432-860 1146-1821 2106-2233 4997-5462 6375-6705 7542-8193 9107-9297 9772-9777 9783-9784 11418-11832 13655-14024
就是第一条信息导致的
4.解决办法
如果一个节点处于“:0 master,fail,noaddr”状态,执行“del-node”会报错: [ERR] No such node ID 80560d0d97a0b3fa975203350516437b58251745 这种情况下,只需要执行“CLUSTER FORGET”将其剔除即可(注意,需要在所有节点上执行一次,不然未执行的节点上可 能仍然看得到“:0 master,fail,noaddr”): 每个节点上执行cluster forget node-id
到此,相信大家对“Redis错误failed: Hostname must not be empty or null怎么解决”有了更深的了解,不妨来实际操作一番吧!这里是创新互联网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!