欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
阿里云ECS部署Redis主備哨兵集群遇到的問(wèn)題

一、部署

詳細部署步驟:https://blog.csdn.net/lihongtai/article/details/82826809

Redis5.0版本需要注意的參數配置:https://www.cnblogs.com/ibethfy/p/9965902.html

 

二、遇到的問(wèn)題

1、bind公網(wǎng)IP地址時(shí),會(huì )出現異常:【Cannot assign requested address】

  首先理解bind的含義:https://blog.csdn.net/cw_hello1/article/details/83444013

  原因:這里無(wú)法bind公網(wǎng)IP地址,是因為ECS的本地IP是通過(guò)NAT技術(shù)轉換成了公網(wǎng)IP,即公網(wǎng)IP不是ECS任意一個(gè)網(wǎng)卡上的IP

  解決方案:bind 0.0.0.0,這樣不論阿里云私網(wǎng)還是公網(wǎng)均可以訪(fǎng)問(wèn)

2、SpringBoot配置Redis主備哨兵集群后,無(wú)法連接

  原因:ECS實(shí)例既綁定了私網(wǎng)IP地址,也綁定了公網(wǎng)IP地址,哨兵會(huì )將監控的Redis實(shí)例IP地址收集管理起來(lái),設置bind 0.0.0.0后,使得哨兵會(huì )收集這兩個(gè)IP地址,而連接時(shí)使用的是私網(wǎng)IP地址,故無(wú)法連接

  解決方案:修改哨兵配置文件sentinel.conf,【sentinel announce-ip 哨兵所在的公網(wǎng)IP】

  announce-ip配置項的官方解釋如下:

# sentinel announce-ip <ip>
# sentinel announce-port <port>
#
# The above two configuration directives are useful in environments where,
# because of NAT, Sentinel is reachable from outside via a non-local address.
#
# When announce-ip is provided, the Sentinel will claim the specified IP address
# in HELLO messages used to gossip its presence, instead of auto-detecting the
# local address as it usually does.
#
# Similarly when announce-port is provided and is valid and non-zero, Sentinel
# will announce the specified TCP port.
#
# The two options don't need to be used together, if only announce-ip is
# provided, the Sentinel will announce the specified IP and the server port
# as specified by the "port" option. If only announce-port is provided, the
# Sentinel will announce the auto-detected local IP and the specified port.

  大致意思是:考慮到NAT網(wǎng)絡(luò )的存在,設置非本地IP后,哨兵可以正常地被外部訪(fǎng)問(wèn)

  同時(shí),哨兵啟動(dòng)后,通過(guò)觀(guān)察配置文件sentinel.conf,發(fā)現已不會(huì )收集Redis實(shí)例的私網(wǎng)IP

  最后SpringBoot可以正常連接Redis主備哨兵集群

 

注:以上場(chǎng)景為一主三備兩哨兵,一主一備一哨兵在同一個(gè)ECS實(shí)例上,兩備一哨兵在另一個(gè)ECS實(shí)例上,這兩個(gè)ECS實(shí)例在同一個(gè)區域,屬于同一個(gè)私有網(wǎng)段,且均綁定了公網(wǎng)IP

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
C#兩大知名Redis客戶(hù)端連接哨兵集群的姿勢
docker
從單點(diǎn) Redis 到 1 主 2 從 3 哨兵的架構演進(jìn)之路
redis哨兵架構基礎
Redis的高可用詳解:Redis哨兵、復制、集群的設計原理,以及區別 優(yōu)知學(xué)院
【Redis22】Redis進(jìn)階:哨兵機制RedisSentinel
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久