Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lettuce调用overlord出现异常 #115

Open
insight0126 opened this issue Dec 5, 2019 · 2 comments
Open

lettuce调用overlord出现异常 #115

insight0126 opened this issue Dec 5, 2019 · 2 comments

Comments

@insight0126
Copy link

insight0126 commented Dec 5, 2019

java 1.8
lettuce 2.0.4

测试代码

`public static void main(String[] args) {
String nodes = "192.168.17.25:27020";
DefaultClientResources clientResources = DefaultClientResources.builder()
.ioThreadPoolSize(10)
.computationThreadPoolSize(10)
.build();

    ClusterClientOptions clusterClient = ClusterClientOptions.builder()
            .autoReconnect(true)
            .pingBeforeActivateConnection(true)
            .build();

    RedisClusterClient client = RedisClusterClient.create(clientResources, RedisURI.create("redis://" + nodes));
    client.setOptions(clusterClient);

    StatefulRedisClusterConnection<String, String> connect = client.connect();
    RedisAdvancedClusterCommands<String, String> sync = connect.sync();

    String set = sync.set("a", "b");
}`

出现的异常

16:17:14.263 [main] DEBUG io.lettuce.core.protocol.DefaultEndpoint - [channel=0xe829f2e8, /192.168.17.1:54639 -> /192.168.17.25:27020, epid=0x2] close() Exception in thread "main" io.lettuce.core.RedisException: Cannot retrieve initial cluster partitions from initial URIs [RedisURI [host='192.168.17.25', port=27020]] at io.lettuce.core.cluster.RedisClusterClient.loadPartitions(RedisClusterClient.java:790) at io.lettuce.core.cluster.RedisClusterClient.initializePartitions(RedisClusterClient.java:761) at io.lettuce.core.cluster.RedisClusterClient.connectClusterImpl(RedisClusterClient.java:500) at io.lettuce.core.cluster.RedisClusterClient.connect(RedisClusterClient.java:339) at io.lettuce.core.cluster.RedisClusterClient.connect(RedisClusterClient.java:316) at com.example.importpsr.OverLordTest.main(OverLordTest.java:34)

@wayslog
Copy link
Collaborator

wayslog commented Dec 5, 2019

看起来像是lettuce 没有拿到初始化的槽位分布信息。这个我得去看看源码才能找到root case。

@insight0126
Copy link
Author

嗯嗯,他会拉取集群视图

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants