RedisLabs / spark-redis

A connector for Spark that allows reading and writing to/from Redis cluster
BSD 3-Clause "New" or "Revised" License
935 stars 368 forks source link

Urgent: Redis Cluster Connection Issue #277

Closed hartbert95 closed 3 years ago

hartbert95 commented 3 years ago

Hi, i have the following issue when tried to connect to redis-cluster after issueing IP routing

  1. I have an environment with 10 nodes configure. node 1 to node 6 have the redis cluster installed but node7-node10 don't have. so we issue the command of IPTables routing so it can route the network to node1-6 if the executor is running on node7-10

From node7-10, we configure the following -iptables -t nat -A OUTPUT -p tcp -d redis-ip-1 --dport 6379 -j DNAT --to-destination node1-ip:6379 -iptables -t nat -A OUTPUT -p tcp -d redis-ip-2 --dport 6379 -j DNAT --to-destination node2-ip:6379 ... ...

When we start to connect through the RedisNode, it appear to have the MOVED Exception. can i know why is this happen and how should we resolve this issue?

Im also using pipeline to run the redis command, does pipeline cause MOVED error in redis cluster?

fe2s commented 3 years ago

Hi @hartbert95 , I suggest you ask this question in https://github.com/redis/redis or https://github.com/redis/jedis. I'm not sure it's related to spark-redis.