Factory method 'elasticsearchClient' threw exception; nested exception is java.lang.IllegalStateException: availableProcessors is already set to [8], rejecting [8]


項目環境:

springboot+ES6.4.2+redis

出錯信息截圖如下

 

 百度查了一下,大概意思是redis和elasticsearch有沖突。

 

解決方法:

啟動類main方法中加入

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

如果是單元測試,需這樣加:


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM