本文使用环境  centos7.x   elasticsearch7.6.2   JDK1.8

错误:文件权限不足      [1]: max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]

再次启动,又出错了:

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

  

我们用的是新创建的用户,而不是root,所以文件权限不足。

首先用root用户登录。

然后修改配置文件:

vim /etc/security/limits.conf

添加下面的内容:

* soft nofile 65536

* hard nofile 131072

* soft nproc 4096

* hard nproc 4096

错误:线程数不够       [1]: max number of threads [1024] for user [leyou] is too low, increase to at least [4096]

刚才报错中,还有一行:

[1]: max number of threads [1024] for user [leyou] is too low, increase to at least [4096]

这是线程数不够。

继续修改配置:

vim /etc/security/limits.d/20-nproc.conf 

修改下面的内容:

* soft nproc 1024

改为:

* soft nproc 4096

错误:进程虚拟内存     [3]: max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

vm.max_map_count:限制一个进程可以拥有的VMA(虚拟内存区域)的数量,继续修改配置文件, :

vim /etc/sysctl.conf 

添加下面内容:

vm.max_map_count=655360

然后执行命令:

sysctl -p

错误   bootstrap checks faile     [1]: 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

ERROR: [1] bootstrap checks failed
[1]: 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
ERROR: Elasticsearch did not exit normally - check the logs at /home/leyou/elasticsearch/logs/elasticsearch.log
[2020-04-05T17:27:09,233][INFO ][o.e.n.Node ] [localhost.localdomain] stopping ...
[2020-04-05T17:27:09,313][INFO ][o.e.n.Node ] [localhost.localdomain] stopped
[2020-04-05T17:27:09,313][INFO ][o.e.n.Node ] [localhost.localdomain] closing ...
[2020-04-05T17:27:09,345][INFO ][o.e.n.Node ] [localhost.localdomain] close

修改conf-->elasticsearch.yml

elasticsearch.yml文件

node.name: node-1 前面的#打开

#network.host: 192.168.0.1
network.host: 192.168.136.110
#network.host: 0.0.0.0
#network.host: localhost
#network.host: 127.0.0.1 这里把network.host 设置为自己的ip地址 也可以设置成0.0.0.0(代表所有ip可以访问)

cluster.initial_master_nodes: ["node-1"] 这里一定要这样设置,我就是这里没有这样设置出问题的,弄了好久
这里的 node-1 是上面node.name:后面的对应值

在最后加上这两句,要不然,外面浏览器就访问不了哈

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

elasticsearch异常问题 discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured的更多相关文章

  1. ElasticSearch异常归纳(能力工场小马哥)

    异常1: can not run elasticsearch as root [WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node-2] ...

  2. Logstash连接Elasticsearch异常

    1.背景 elasticsearch集群默认配置启动ok,logstash连接向里面发数据ok. 2.出现问题 修改elasticsearch.yml中的cluster.name,改为 esabc 然 ...

  3. docker启动elasticsearch异常Failed to create node environment(解决)

    异常说是创建节点环境失败,操作/usr/share/elasticsearch/data/nodes的IO错误,尝试给此目录添加读写权限后,依旧没什么**用,灵机一动是不是挂载目录没有权限导致的? c ...

  4. 解决linux下root运行Elasticsearch异常

    如果以root身份运行将会出现以下问题 root@yxjay:/opt/elasticsearch-2.3.5/bin# ./elasticsearchException in thread &quo ...

  5. Elasticsearch安装配置问题

    1.配置服务 ip 和 端口 进入 elasticsearch 安装目录,打开 config/elasticsearch.yml 配置 net.host 和 http.port net.host: 0 ...

  6. ELK学习002:Elasticsearch 7.x 的安装及配置

    Elasticsearch 的安装与启动 1.1 下载 Elasticsearch 7.6.0 下载地址:https://www.elastic.co/cn/downloads/elasticsear ...

  7. ElasticSearch 7.8.1 从入门到精通

    学前导读 ElasticSearch对电脑配置要求较高,内存至少4G以上,空闲2G内存,线程数4018+ 学习的时候,推荐将ElasticSearch安装到Linux或者mac上,极度不推荐装Wind ...

  8. ElasticSearch 集群基本概念及常用操作汇总(建议收藏)

    内容来源于本人的印象笔记,简单汇总后发布到博客上,供大家需要时参考使用. 原创声明:作者:Arnold.zhao 博客园地址:https://www.cnblogs.com/zh94 目录: Elas ...

  9. ElasticSearch+Kibana安装部署

    在安装ElasticSearch时遇到了很多坑,所以在这里做个笔记记录一下. 首先我考虑的是使用docker进行部署,结果发现虚拟机直接内存溢出,我也是无解了,也就是说使用docker部署还得注意容器 ...

随机推荐

  1. vue之initComputed模块源码说明

    要想理解原理就得看源码,最近网上也找了好多vue初始化方法(8个init恶魔...) 因为也是循序渐进的理解,对initComputed计算属性的初始化有几处看得不是很明白,网上也都是含糊其辞的(要想 ...

  2. 原来rollup这么简单之 rollup.rollup篇

    大家好,我是小雨小雨,致力于分享有趣的.实用的技术文章. 内容分为翻译和原创,如果有问题,欢迎随时评论或私信,希望和大家一起进步. 分享不易,希望能够得到大家的支持和关注. 计划 rollup系列打算 ...

  3. HTML5 history-hash 随机选择彩票

    <!doctype html> <html> <head> <meta charset="utf-8"> <title> ...

  4. Linux安装Elasticsearch7.x

    Elasticsearch下载地址: https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.1.1-linux-x8 ...

  5. 【Weiss】【第03章】练习3.8:有序多项式求幂

    [练习3.8] 编写一个程序,输入一个多项式F(X),计算出(F(X))P.你程序的时间复杂度是多少? Answer: (特例:P==0时,返回1.) 如果P是偶数,那么就递归计算((F(X))P/2 ...

  6. ReentrantReadWriteLock源码探究

    ReentrantReadWriteLock实现了可重入的读锁和写锁,其中读锁是共享锁,写锁是互斥锁.与ReentrantLock类似,ReentrantReadWriteLock也提供了公平锁和非公 ...

  7. atomic的底层实现

    atomic操作 在编程过程中我们经常会使用到原子操作,这种操作即不想互斥锁那样耗时,又可以保证对变量操作的原子性,常见的原子操作有fetch_add.load.increment等. 而对于atom ...

  8. 「建议心心」要就来15道多线程面试题一次爽到底(1.1w字用心整理)

    . 本文是给**「建议收藏」200MB大厂面试文档,整理总结2020年最强面试题库「CoreJava篇」**写的答案,所有相关文章已经收录在码云仓库:https://gitee.com/bingqil ...

  9. 1. chromedriver的下载和配置

    使用selenium时,需要用到不同浏览器的driver. 我常用chromedriver,所以先记录chromedriver的使用和配置.其他浏览器的driver配置大同小异. 一. 确定浏览器的版 ...

  10. 大数据软件安装之Hive(查询)

    一.安装及配置 官方文档: https://cwiki.apache.org/confluence/display/Hive/GettingStarted 安装Hive2.3 1)上传apache-h ...