This connection point is not known in the cluster view

1,606 views
Skip to first unread message

mykev...@gmail.com

unread,
Mar 24, 2017, 1:52:12 PM3/24/17
to lettuce-redis-client-users
Hello,

I am getting the following error often when I run against Elasticache Redis in AWS.  I haven't tested in non-AWS env yet though.  Why this happens and how can I avoid this error?  Redis commands like get/set fails when I get this error.
Caused by: com.lambdaworks.redis.RedisException: java.lang.IllegalArgumentException: Connection to 10.2.65.53:6379 not allowed. This connection point is not known in the cluster view
at com.lambdaworks.redis.cluster.PooledClusterConnectionProvider.getConnection(PooledClusterConnectionProvider.java:227)
at com.lambdaworks.redis.cluster.ClusterDistributionChannelWriter.lambda$write$0(ClusterDistributionChannelWriter.java:104)
at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
at io.netty.util.concurrent.PromiseTask.run(PromiseTask.java:73)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
... 1 more
Caused by: java.lang.IllegalArgumentException: Connection to 10.2.65.53:6379 not allowed. This connection point is not known in the cluster view
at com.lambdaworks.redis.cluster.PooledClusterConnectionProvider.invalidConnectionPoint(PooledClusterConnectionProvider.java:413)
at com.lambdaworks.redis.cluster.PooledClusterConnectionProvider.getConnection(PooledClusterConnectionProvider.java:218)
... 7 more

I am using Lettuce 4.3.1.Final and setting the client options as following.

        final ClusterTopologyRefreshOptions clusterTopologyRefreshOptions = ClusterTopologyRefreshOptions.builder()
            .enablePeriodicRefresh(true)
            .enablePeriodicRefresh(60, TimeUnit.SECONDS)
            .enableAllAdaptiveRefreshTriggers()
            .build();
        final ClusterClientOptions clusterClientOptions = ClusterClientOptions.builder()
            .topologyRefreshOptions(clusterTopologyRefreshOptions)
            .build();
        final RedisClusterClient redisClusterClient = RedisClusterClient.create(url);
        redisClusterClient.setOptions(clusterClientOptions);
        redisClusterClient.setDefaultTimeout(500, TimeUnit.MILLISECONDS);
        final StatefulRedisClusterConnection connection = redisClusterClient.connect(transcoder);

Is there any way for lettuce to try using other node instead of throwing an error when this error happens?

Thank you,
Kevin

Mark Paluch

unread,
Mar 24, 2017, 3:24:44 PM3/24/17
to lettuce-redis-client-users, mykev...@gmail.com
Lettuce prohibits by default cluster node connections to nodes that are not listed in the CLUSTER NODES response. You can change that with ClusterClientOptions, see https://github.com/lettuce-io/lettuce-core/wiki/Client-options#cluster-specific-options (validateClusterNodeMembership).

Cheers, 
Mark

mykev...@gmail.com

unread,
Mar 24, 2017, 5:42:58 PM3/24/17
to lettuce-redis-client-users, mykev...@gmail.com
Thank you for the information.  I will play with that option.

Thanks!
Kevin
Reply all
Reply to author
Forward
0 new messages