Nifi Redis Sentinel 集成

Nifi Redis Sentinel integration

我正尝试在哨兵模式下将 Nifi 与 Redis 集成,如本教程中所述:

https://bryanbende.com/development/2017/10/09/apache-nifi-redis-integration

我的 Redis 集群有 2 个节点,运行ning 在端口 6391 上,还有 2 个哨兵,运行ning 在端口 6392 上。它似乎工作正常:

127.0.0.1:6392> sentinel master mymaster
 1) "name"
 2) "mymaster"
 3) "ip"
 4) "192.168.50.5"
 5) "port"
 6) "6391"
 7) "runid"
 8) "d8adfb30d836ad305b96d887dfe2beb74c435305"
 9) "flags"
10) "master"
11) "link-pending-commands"
12) "0"
13) "link-refcount"
14) "1"
15) "last-ping-sent"
16) "0"
17) "last-ok-ping-reply"
18) "626"
19) "last-ping-reply"
20) "626"
21) "down-after-milliseconds"
22) "5000"
23) "info-refresh"
24) "5796"
25) "role-reported"
26) "master"
27) "role-reported-time"
28) "56761859"
29) "config-epoch"
30) "0"
31) "num-slaves"
32) "1"
33) "num-other-sentinels"
34) "1"

Nifi数据流:

Redis 连接池:

当我 运行 数据流时,我得到这个错误:

PutDistributedMapCache[id=08e39b65-0176-1000-0000-0000185bd23e] failed to process session due to All sentinels down, cannot determine where is mymaster master is running...; Processor Administratively Yielded for 1 sec: redis.clients.jedis.exceptions.JedisConnectionException: All sentinels down, cannot determine where is mymaster master is running...

经过无数个小时的折磨,我终于找到了一个解决方法,即禁用哨兵中的密码。指定的密码是redis的,不是sentinel