gpt4 book ai didi

java - Solr 8 - 具有多个服务器的 MiniSolrCloudCluster 在添加文档时给出 "java.io.IOException: 6/invalid_frame_length"

转载 作者:行者123 更新时间:2023-11-30 05:42:26 25 4
gpt4 key购买 nike

我正在创建一个 MiniSolrCloudCluster 实例,如下所示。之后我创建一个集合,然后添加一个文档并提交。

final int numServers = 3;

// random unassigned HTTP port
final int jettyPort = 0;

final JettyConfig jettyConfig = JettyConfig.builder().setPort(jettyPort).build();

// create a MiniSolrCloudCluster instance
miniSolrCloudCluster = new MiniSolrCloudCluster(numServers, baseDir, jettyConfig);

当我添加文档(“cloudSolrClient.add(doc);”)时,我收到以下奇怪的异常:

18:06:44.627 [updateExecutor-17-thread-1-processing-x:collection1_shard3_replica_n4 r:core_node6 null n:127.0.0.1:56546_solr c:collection1 s:shard3]错误org.apache.solr.update.ErrorReportingConcurrentUpdateSolrClient - 错误java.io.IOException: java.io.IOException: 6/invalid_frame_length

如果 numServers=1 则不会出现此异常。仅当 numServers>1 时才会发生。

有人知道这个问题的解决办法吗?

最佳答案

它的工作原理是在 Junit 测试用例的 @BeforeClass 中添加以下内容或将其添加到静态 block 中,以便它在其他所有内容之前运行:

System.setProperty("jetty.testMode", "true");

添加此解决了上面的异常。

关于java - Solr 8 - 具有多个服务器的 MiniSolrCloudCluster 在添加文档时给出 "java.io.IOException: 6/invalid_frame_length",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55417706/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com