我正在创建一个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] ERROR org.apache.solr.update.ErrorReportingConcurrentUpdateSolrClient - error java .io.IOException:java.io.IOException:6 / invalid_frame_length
如果numServers = 1,则不会显示此异常。它仅适用于numServers> 1。
有没有人知道解决方案?
它通过在@BeforeClass中为Junit Testcase添加以下内容或将其添加到静态块以使其在其他所有内容之前运行:
System.setProperty("jetty.testMode", "true");
添加此解决上面的异常。