java.lang.IllegalStateException:可用的处理器值[3]与当前值[1]

时间:2018-05-17 15:52:33

标签: elasticsearch

我正在将我的插件迁移到Elastic Search 5.6.8。 几乎所有的整数测试都失败了,但有以下异常。

java.lang.IllegalStateException: available processors value [3] did not match current value [1]
at __randomizedtesting.SeedInfo.seed([F28925F4D3226C90:F097ECADD695AF81]:0)
at org.elasticsearch.transport.netty4.Netty4Utils.setAvailableProcessors(Netty4Utils.java:96)
at org.elasticsearch.http.netty4.Netty4HttpServerTransport.<init>(Netty4HttpServerTransport.java:219)
at org.elasticsearch.transport.Netty4Plugin.lambda$getHttpTransports$1(Netty4Plugin.java:105)
at org.elasticsearch.node.Node.<init>(Node.java:438)
at org.elasticsearch.node.MockNode.<init>(MockNode.java:60)
at org.elasticsearch.test.InternalTestCluster.buildNode(InternalTestCluster.java:602)
at org.elasticsearch.test.InternalTestCluster.buildNode(InternalTestCluster.java:555)
at org.elasticsearch.test.InternalTestCluster.getOrBuildRandomNode(InternalTestCluster.java:461)
at org.elasticsearch.test.InternalTestCluster.client(InternalTestCluster.java:647)
at org.elasticsearch.test.ESIntegTestCase.client(ESIntegTestCase.java:636)
at org.elasticsearch.test.ESIntegTestCase.client(ESIntegTestCase.java:629)
at com.trgr.elasticsearch.plugin.maydayalert.MaydayAlertIntegrationTest.waitForClusterToBeInValidState(MaydayAlertIntegrationTest.java:65)
at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1713)
at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:941)
at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:957)
at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)

弹性网站对此问题说以下内容。 System.setProperty(&#34; es.set.netty.runtime.available.processors&#34;,&#34; false&#34;); https://discuss.elastic.co/t/elasticsearch-5-4-1-availableprocessors-is-already-set/88036/8

然而它似乎不起作用。 我在几乎所有的测试设置方法中设置相同。

我不确定我是否在错误的地方。 有没有其他方法可以解决这个问题。

我的build.gradle有

弹性组:&#39; org.elasticsearch&#39;,名称:&#39; elasticsearch&#39;,版本:&#39; 5.6.8&#39;,传递:true 编译组:&#39; org.elasticsearch.plugin&#39;,名称:&#39; transport-netty4-client&#39;,版本:&#39; 5.6.8&#39;

testCompile group:&#39; org.elasticsearch.test&#39;,name:&#39; framework&#39;,version:&#39; 5.6.8&#39; testCompile group:&#39; org.apache.httpcomponents&#39;,name:&#39; httpclient&#39;,version:&#39; 4.3.6&#39; // testCompile group:&#39; net.java.dev.jna&#39;,name:&#39; jna&#39;,version:&#39; 4.1.0&#39; testCompile组:&#39; org.powermock&#39;,名称:&#39; powermock-api-mockito&#39;,版本:&#39; 1.6.1&#39; testCompile组:&#39; org.powermock&#39;,名称:&#39; powermock-module-junit4&#39;,版本:&#39; 1.6.1&#39; testCompile组:&#39; org.powermock&#39;,名称:&#39; powermock-core&#39;,版本:&#39; 1.6.1&#39;

0 个答案:

没有答案