首页 > 其他 > 详细

elasticsearch系列(四): bug收集

时间:2020-06-04 22:34:05      阅读:66      评论:0      收藏:0      [点我收藏+]

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

  • 报错环境: springboot + redis + elasticsearch

  • 原因: redis和elasticsearch有冲突。

  • 解决方案:

    1. 启动类加 System.setProperty("es.set.netty.runtime.available.processors","false");
    2. 单元测试的话,在单元测试类的空构造函数中加上面的代码
    public ElasticTest(){
      	System.setProperty("es.set.netty.runtime.available.processors","false");
    }
    
  • 参考: https://www.cnblogs.com/lfyu/p/12025310.html

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

  • 报错环境: docker搭建es集群启动

  • 原因: elasticsearch用户拥有的内存权限太小,至少需要262144;

  • 解决方案:

    1. 切换到root用户,执行命令:(临时生效) sysctl -w vm.max_map_count=262144
    2. 永久生效解决办法: 在/etc/sysctl.conf文件最后添加一行vm.max_map_count=262144
  • 参考: https://www.cnblogs.com/yidiandhappy/p/7714489.html

Elasticsearch health check failed

  • 报错环境: springboot + actuator + elasticsearch

  • 原因: 健康检查默认127.0.0.1与es集群ip不一致

  • 解决方案:

    1. 关闭es健康检查management.health.elasticsearch.enabled=false
    2. 设置uris spring.elasticsearch.rest.uris=http://192.168.183.220:9200
  • 参考: https://blog.csdn.net/HXNLYW/article/details/96426815

Springboot ElasticSearch QueryBuilder 查不到数据

这位兄弟,真是神了,这个问题差不多困扰了我半天,头疼~~~我就3条数据,死活用第1页就是查不出来,感谢!!!

elasticsearch系列(四): bug收集

原文:https://www.cnblogs.com/linyufeng/p/13046892.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!