springboot 整合 elasticsearch 失败

Failed to instantiate [org.elasticsearch.client.transport.TransportClient]: Factory method ‘elasticsearchClient’ threw exception; nested exception is java.lang.IllegalStateException: availableProcessors is already set to [4], rejecting [4]
@SpringBootApplication

public class SpringBootExampleApplication {

public static void main(String[] args) {

System.setProperty(“es.set.netty.runtime.available.processors”,”false”);

SpringApplication.run(SpringbootexampleApplication.class, args);

}

}

参考链接 elasticsearch5.6.1.集成springboot 遇到的坑

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理