使用springboot elasticSearch启动时报

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apiSearchController': Unsatisfied dependency expressed through field 'compRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compRepository': Cannot resolve reference to bean 'elasticsearchTemplate' while setting bean property 'elasticsearchOperations'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'elasticsearchTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchDataAutoConfiguration.class]: Unsatisfied dependency expressed through method 'elasticsearchTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'elasticsearchClient' defined in class path resource [org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.elasticsearch.client.transport.TransportClient]: Factory method 'elasticsearchClient' threw exception; nested exception is java.lang.IllegalStateException: availableProcessors is already set to [8], rejecting [8]码片

网上查了一下,是elasticSearch和redis共用netty连接,导致连接冲突了,解决办法就是在application启动类上加下面的代码

  public static void main(String[] args){//解决netty冲突   System.setProperty("es.set.netty.runtime.available.processors", "false");SpringApplication.run(Application.class, args);}

但我这样设置了没反应,还是继续报错,最后是在jvm的参数哪里加了下面的代码

-Des.set.netty.runtime.available.processors=false

这样问题就解决了

elasticSearch availableProcessors is already set to [8], rejecting [8]相关推荐

  1. elasticSearch availableProcessors is already set to [8], rejecting [8]

    使用springboot elasticSearch启动时报 org.springframework.beans.factory.UnsatisfiedDependencyException: Err ...

  2. 【Error】Spring整合ElasticSearch启动项目报错:availableProcessors is already set to [8], rejecting [8]

    详细报错信息: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with n ...

  3. Springboot整合Elasticsearch 报错availableProcessors is already set to [4], rejecting [4]

    1.异常信息: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with ...

  4. SpringBoot集成ElasticSearch在启动时报availableProcessors is already set to [8], rejecting [8]

    背景 项目基于SpringBoot并且集成ElasticSearch,今天在编写测试类准备进行单元测试时,报了如下这个错误. Caused by: org.springframework.beans. ...

  5. spring boot es错误:availableProcessors is already set to [4], rejecting [4]

    Springboot整合Elasticsearch报错 今天使用SpringBoot整合Elasticsearch时候,相关的配置完成后,启动项目就报错了. nested exception is j ...

  6. availableProcessors is already set to [4], rejecting [4]

    springboot与elasticsearch6.3集成的时候报错: Failed to instantiate [org.elasticsearch.client.transport.Transp ...

  7. java.lang.IllegalStateException: availableProcessors is already set to [12], rejecting [12]

    srpingboot启动项目会报以下异常, 问题原因由于es的netty冲突导致的,问题细节不再赘述 Caused by: java.lang.IllegalStateException: avail ...

  8. IllegalStateException: availableProcessors is already set to [8], rejecting [8]

    引发这个异常的场景很多,这里记录的是我这边遇到的,这是因为 ES 和 Spring-actuator 有一些兼容性配置问题. 详细异常如下: [2020-08-21 12:49:05] [kbs_de ...

  9. Spring4 整合ElasticSearch6.x:availableProcessors is already set to [4], rejecting [4]

    Spring4.x 整合ElasticSearch6.x 提示如下错误信息: java.lang.IllegalStateException: availableProcessors is alrea ...

最新文章

  1. 近期活动盘点:2019第六届世界互联网大会、智慧城市的人本尺度城市形态讲座、高管AI大数据能力研修班、英伟达初创企业展示开启报名...
  2. vue3.0以上关于打包后出现空白页和路由不起作用
  3. 【工具】模板引擎 Velocity
  4. excel 多列匹配相等后 引用值
  5. 解决 MyEclipse build workspace 慢,validation javascript 更慢的问题
  6. php上传图片并显示代码,php图片上传代码(完整版已测试)
  7. ubuntu 18.04安装与配置 Redis
  8. 独断专行站在互联网创业风口下的 00 后 CEO,没有钱该如何继续?
  9. 数据增强_NLP 数据增强方法 EDA
  10. 在ios中运用core animation暂停和继续动画
  11. view函数_python测试开发django63.基于函数的视图(@api_view())
  12. Windows系统磁盘清理C盘扩容
  13. Android系统启动流程
  14. 功能自动化测试的策略有哪些?
  15. Edge AI边缘智能:Communication-Efficient Edge AI: Algorithms and Systems(未完待续)
  16. 定价是什么意思_直接定价发行是什么意思?什么是直接定价发行?
  17. LTspice使用教程笔记
  18. CCTV与西方媒体的区别!句句发人深思...^^
  19. mrctf2020_easy_equation
  20. 工控系统的安全噩梦,网络攻击工控系统的五大案例

热门文章

  1. 使用nodeitk进行角点检測
  2. 大数据技能大赛任务一:数据抽取
  3. (附源码)计算机毕业设计ssm基于Android的线上水果店
  4. 计算机网络基础问答题
  5. oracle取时间间隔分钟,Oracle获取时间间隔以及转换为时分秒格式
  6. 六个计算机硬件商标名称,世界知名品牌的电脑硬件名称
  7. 基于HTTP协议的轻量级开源简单队列服务:HTTPSQS
  8. 网站流量统计之PV和UV
  9. 编译器 目标文件 linker
  10. python 时间格式转换,秒级和毫秒级时间戳转换