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