Elasticserach常见问题-创新互联

启动:

创新互联公司专注于建瓯企业网站建设,响应式网站设计,商城网站建设。建瓯网站建设公司,为建瓯等地区提供建站服务。全流程按需规划网站,专业设计,全程项目跟踪,创新互联公司专业和态度为您提供的服务

直接启动: ./bin/elasticsearch

后台启动:./bin/elasticsearch -d

测试: curl http://192.168.2.101:9200

停止:

查看es进程: jps | grep Elasticsearch

杀掉进程: kill -9 进程号

问题及解决

问题1:

max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

解决方法:

vim /etc/security/limits.conf

在最后面追加下面内容:

francis hard nofile 65536

francis soft nofile 65536 # francis为es安装目录的所有者

或者:

soft nofile 65536

hard nofile 65536 # *表示所有用户,nofile表示大文件句柄数,表示能够打开的大文件数目

修改后退出重新登录,使用如下命令查看是否修改成功:

ulimit -Hn

ulimit -Sn

问题2:

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

解决方法:

vim /etc/sysctl.conf

在最后面追加内容: vm.max_map_count=262144

查看修改后的结果:sysctl -p

问题3:

Java HotSpot™ 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error=‘Cannot allocate memory’ (errno=12)

解决方法:

编辑文件 vim /usr/local/elasticsearch/config /jvm.options

修改以下配置,将1g变为更小的值:

-Xms1g

-Xmx1g

问题4:

问题5:

the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

解决方法:

vim /usr/local/elasticsearch/config/ elasticsearch.yml

添加配置:cluster.initial_master_nodes: [“node01”]

问题6:

Exception in thread “main” java.nio.file.AccessDeniedException: /usr/local/elasticsearch /config/jvm.options

解决办法:

这种是权限问题,一般这种权限问题执行: chown -R francis:francis /usr/local/elasticsearch 即可解决

分片数不够:

[2022-03-18T09:32:07,019][WARN ][o.e.x.m.e.l.LocalExporter] [node-1] unexpected error while indexing monitoring document

org.elasticsearch.xpack.monitoring.exporter.ExportException: org.elasticsearch.common.ValidationException: Validation Failed: 1: this action would add [1] total shards, but this cluster currently has [10437]/[10000] maximum shards open;

解决方法:

PUT /_cluster/settings

{

"transient": {

"cluster": {

"max_shards_per_node":20000

}

}

}

匹配通配符

PUT /_cluster/settings

{

"persistent" : {

"action.destructive_requires_name": false

}

}

你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧


网站名称:Elasticserach常见问题-创新互联
分享路径:http://bzwzjz.com/article/jesoc.html

其他资讯

Copyright © 2007-2020 广东宝晨空调科技有限公司 All Rights Reserved 粤ICP备2022107769号
友情链接: 成都网站建设流程 网站制作公司 温江网站设计 手机网站制作 企业网站建设 营销型网站建设 网站设计制作报价 品牌网站建设 达州网站设计 手机网站制作 成都网站建设公司 成都网站建设推广 外贸网站设计方案 手机网站制作 重庆电商网站建设 高端网站设计 重庆手机网站建设 成都商城网站制作 成都响应式网站建设公司 成都企业网站制作 成都商城网站建设 广安网站设计