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 遇到的坑

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章