簡體   English   中英

Redis前哨-遠程監控

[英]Redis Sentinel — Remote Monitoring

我正在嘗試設置Redis集群環境。 設置如下(通過鏈接查看圖片):

  • 復制:1個主控,1個從屬
  • 故障轉移:3個哨兵

部署設定

我遇到的問題是使S3進行遠程連接。 實際上,我嘗試僅部署1個Master並嘗試Sentinel遠程連接,但這也失敗了。 請參閱主控和哨兵的簡化配置文件。

本地
redis服務器/path/to/local/redis.conf
本地/redis.conf
bind 127.0.0.1 192.168.20.37 port 6379 dir .

遠程
redis-sentinel /path/to/remote/sentinel.conf
remote / sentinel.conf
bind 127.0.0.1 192.168.20.140 port 16379 sentinel monitor redis-cluster 192.168.20.37 6379 2
在遠程映像上啟動Sentinel后,Sentinel無法連接到主服務器。 請參閱以下輸出:
# oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
# Redis version=4.0.8, bits=64, commit=00000000, modified=0, pid=15095, just started
# Configuration loaded
* Increased maximum number of open files to 10032 (it was originally set to 1024).
* Running mode=sentinel, port=16379.
# Sentinel ID is 66c95f52fbc72b6a33009c36d9ac6b4e91988b81
# +monitor master mymaster 192.168.20.37 6379 quorum 2
# +sdown master mymaster 192.168.20.37 6379

如果我從本地映像運行Sentinel,並進行IP更改,則它將按預期工作。 沒有防火牆,沒有NAT。 我還應注意,我可以成功地建立到主服務器的遠程客戶端連接。

對於這個看似“簡單”的設置有什么建議嗎?

通過將Sentinel綁定到0.0.0.0,我能夠解決此問題。 似乎當您指定localhost + IP時,它僅綁定到localhost。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM