I have created a redis cluster that on it's own is working but I can't connect my client to it.
I am using redisson to connect to it, with the following code
Config config = new Config();
config.setUseLinuxNativeEpoll(false);
config.useClusterServers().addNodeAddress(redisURL.split(","));
RedissonClient redisson = Redisson.create(config);
Where redisURL is a csv on the format: redis://<external-ip>:7000,redis://<external-ip>:7001
but with all 6 nodes in the cluster.
The interesting part is that the cluster is connected to itself using their local adresses(they are on the same subnet) but they cannot find eachother with their respective external ip.
This in turn creates a problem when redisson tries to fetch cluster configurations.
15:53:51,035 INFO [org.redisson.cluster.ClusterConnectionManager] (ServerService Thread Pool -- 31) Redis cluster nodes configuration got from /<external-ip>:7001:
6df5ebaf45cbbd36213f482a26e99e14e3e86fa5 <internal-ip>:7000@17000 master - 0 1516632829096 2 connected 5461-10922
7724d373393edf7f38ae6253ce248f75f398a1c6 <internal-ip>:7001@17001 slave e5dc7e472410e575a0dc672ead79b54828897ce3 0 1516632830099 6 connected
649582188b2c22b472388c27550467fe97522e3f <internal-ip>:7001@17001 myself,master - 0 1516632828000 1 connected 0-5460
792d30f7c2eedd80d99af5cc49d7797d6b29bdf3 <internal-ip>:7002@17002 slave 6df5ebaf45cbbd36213f482a26e99e14e3e86fa5 0 1516632828093 4 connected
349d846c493fcc709d31c657321a48e01ae0b34e <internal-ip>:7001@17001 slave 649582188b2c22b472388c27550467fe97522e3f 0 1516632827000 5 connected
e5dc7e472410e575a0dc672ead79b54828897ce3 <internal-ip>:7000@17000 master - 0 1516632828000 3 connected 10923-16383
15:54:01,113 ERROR [org.redisson.cluster.ClusterConnectionManager] (redisson-netty-1-5) Can't connect to master: redis://<internal-ip>:7000 with slot ranges: [[10923-16383]]
15:54:01,121 ERROR [org.redisson.cluster.ClusterConnectionManager] (redisson-netty-1-6) Can't connect to master: redis://<internal-ip>:7001 with slot ranges: [[0-5460]]
15:54:01,127 ERROR [org.redisson.cluster.ClusterConnectionManager] (redisson-netty-1-1) Can't connect to master: redis://<internal-ip>:7000 with slot ranges: [[5461-10922]]
So is there a way to tell redisson to map the internal IP to a preconfigured external IP? or something else that would solve this problem? preferably without changing the network configuration.