项目环境:

springboot+ES6.4.2+redis

出错信息截图如下

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

 

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

 

解决方法:

启动类main方法中加入

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

如果是单元测试,需这样加:

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

相关文章:

  • 2021-10-19
  • 2022-01-12
  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
猜你喜欢
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案