elasticsearch出现内网IP访问怎么解决

本篇内容介绍了“elasticsearch出现内网IP访问怎么解决”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

编辑 elasticsearch.yml 修改 network.host: 自己IP

最后加上:

http.cors.enabled: true
http.cors.allow-origin: "*"

出现问题:

bootstrap checks failed

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

解决:编辑 /etc/security/limits.conf,追加:

* soft nofile 65536
* hard nofile 65536

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

解决:编辑 /etc/sysctl.conf,追加 vm.max_map_count=655360 保存后执行 sysctl -p

3、max number of threads [2048] for user [tongtech] is too low, increase to at least [4096]

错误原因:启动检查未通过 elasticsearch用户的最大线程数太低

解决: vim /etc/security/limits.d/90-nproc.conf   将2048改为4096或更大

4、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

解决:

    编辑:elasticsearch.yml

    加上:cluster.initial_master_nodes: ["node-1"] 

“elasticsearch出现内网IP访问怎么解决”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注网站,小编将为大家输出更多高质量的实用文章!