报错环境: springboot + redis + elasticsearch
原因: redis和elasticsearch有冲突。
解决方案:
System.setProperty("es.set.netty.runtime.available.processors","false");
public ElasticTest(){
System.setProperty("es.set.netty.runtime.available.processors","false");
}
报错环境: docker搭建es集群启动
原因: elasticsearch用户拥有的内存权限太小,至少需要262144;
解决方案:
sysctl -w vm.max_map_count=262144
/etc/sysctl.conf
文件最后添加一行vm.max_map_count=262144
报错环境: springboot + actuator + elasticsearch
原因: 健康检查默认127.0.0.1与es集群ip不一致
解决方案:
management.health.elasticsearch.enabled=false
spring.elasticsearch.rest.uris=http://192.168.183.220:9200
原因: es的分页从第0页开始,而不是第1页
参考: https://blog.csdn.net/yy417168602/article/details/102561936
这位兄弟,真是神了,这个问题差不多困扰了我半天,头疼~~~我就3条数据,死活用第1页就是查不出来,感谢!!!
原文:https://www.cnblogs.com/linyufeng/p/13046892.html