问题描述,elasticsearch启动时报max file descriptors错误:

[hadoop@node-33 elasticsearch-5.4.0]$ bin/elasticsearch

[2017-11-10T14:14:46,268][INFO ][o.e.n.Node ] [node-3] initializing ...

[2017-11-10T14:14:46,344][INFO ][o.e.e.NodeEnvironment ] [node-3] using [1] data paths, mounts [[/ (/dev/mapper/rootvg-lvroot)]], net usable_space [245.7gb], net total_space [1.9tb], spins? [possibly], types [ext4]

[2017-11-10T14:14:46,344][INFO ][o.e.e.NodeEnvironment ] [node-3] heap size [1.9gb], compressed ordinary object pointers [true]

[2017-11-10T14:14:46,345][INFO ][o.e.n.Node ] [node-3] node name [node-3], node ID [piHlIcmsQyKuqfqiYtjyYw]

[2017-11-10T14:14:46,346][INFO ][o.e.n.Node ] [node-3] version[5.4.0], pid[25779], build[780f8c4/2017-04-28T17:43:27.229Z], OS[Linux/2.6.32-642.el6.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_131/25.131-b11]

[2017-11-10T14:14:46,978][INFO ][o.e.p.PluginsService ] [node-3] loaded module [aggs-matrix-stats]

[2017-11-10T14:14:46,978][INFO ][o.e.p.PluginsService ] [node-3] loaded module [ingest-common]

[2017-11-10T14:14:46,978][INFO ][o.e.p.PluginsService ] [node-3] loaded module [lang-expression]

[2017-11-10T14:14:46,978][INFO ][o.e.p.PluginsService ] [node-3] loaded module [lang-groovy]

[2017-11-10T14:14:46,979][INFO ][o.e.p.PluginsService ] [node-3] loaded module [lang-mustache]

[2017-11-10T14:14:46,979][INFO ][o.e.p.PluginsService ] [node-3] loaded module [lang-painless]

[2017-11-10T14:14:46,979][INFO ][o.e.p.PluginsService ] [node-3] loaded module [percolator]

[2017-11-10T14:14:46,979][INFO ][o.e.p.PluginsService ] [node-3] loaded module [reindex]

[2017-11-10T14:14:46,979][INFO ][o.e.p.PluginsService ] [node-3] loaded module [transport-netty3]

[2017-11-10T14:14:46,979][INFO ][o.e.p.PluginsService ] [node-3] loaded module [transport-netty4]

[2017-11-10T14:14:46,980][INFO ][o.e.p.PluginsService ] [node-3] no plugins loaded

[2017-11-10T14:14:48,325][INFO ][o.e.d.DiscoveryModule ] [node-3] using discovery type [zen]

[2017-11-10T14:14:48,779][INFO ][o.e.n.Node ] [node-3] initialized

[2017-11-10T14:14:48,780][INFO ][o.e.n.Node ] [node-3] starting ...

[2017-11-10T14:14:48,957][INFO ][o.e.t.TransportService ] [node-3] publish_address {172.25.114.59:9302}, bound_addresses {172.25.114.59:9302}

[2017-11-10T14:14:48,963][INFO ][o.e.b.BootstrapChecks ] [node-3] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks

ERROR: bootstrap checks failed

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

[2017-11-10T14:14:48,970][INFO ][o.e.n.Node ] [node-3] stopping ...

[2017-11-10T14:14:48,982][INFO ][o.e.n.Node ] [node-3] stopped

[2017-11-10T14:14:48,982][INFO ][o.e.n.Node ] [node-3] closing ...

[2017-11-10T14:14:48,990][INFO ][o.e.n.Node ] [node-3] closed

网上的解决办法都是修改/etc/security/limits.conf文件,增加hadoop hard nofile 131072一行

vi /etc/security/limits.conf
hadoop soft nofile 65536
hadoop hard nofile 131072
hadoop soft nproc 2048
hadoop hard nproc 4096

可是,我的配置本来就已经设置成这样了的
网上找来找去,都是修改limits.conf文件这个答案,最怕这种了,所有的人都指向同一个答案,却不能解决自己的问题
后来突然想到是不是环境变量的问题,仔细检查了一遍,发现一个可疑的设置

vi /etc/profile
ulimit -n 65535

使用 ulimit -Hn 查看当前值,果然是65535,

ulimit -Hn
65535

也就是说每次更新环境变量的时候limits.conf的hard nofile 131072设置被覆盖掉了
这就好办了,vi /etc/profile 将 ulimit -n 65535 行注释掉,退出重新进入当前用户,再使用 ulimit -Hn 查看当前值,已经是131072了,设置成功!

vi /etc/profile
# ulimit -n 65535
ulimit -Hn
131072

再去启动elasticsearch,OK!

记一次环境变量导致的elasticsearch启动错误:max file descriptors [65535] for elasticsearch process is too low, incre的更多相关文章

  1. 安装排错 max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

    https://blog.csdn.net/cookzrk/article/details/80179006 转载:https://my.oschina.net/u/2510243/blog/8105 ...

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

    elasticsearch安装时遇到的错误 问题翻译过来就是:elasticsearch用户拥有的可创建文件描述的权限太低,至少需要65536: 解决办法: #切换到root用户修改 vim /etc ...

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

    在/etc/syscurity/limits.conf 加入以下两行: elastic hard nofile 65536 elastic soft nofile  65536 #备注:elastic ...

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

    修改文件 /etc/security/limits.conf 加入以下两行: sonar hard nofile 65536 sonar soft nofile  65536 #备注:sonar这里是 ...

  5. ElasticSearch启动错误处理方法

    在配置完elasticsearch,启动程序会包如下错误: [elk@localhost bin]$ ./elasticsearch ... ... ERROR: [3] bootstrap chec ...

  6. elasticsearch启动错误

    requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled java.lang.UnsupportedOpe ...

  7. elasticsearch启动错误解决

    es启动默认不能使用root用户,所以需要新创建一个用户来启动. 启动时可能出现的问题: [1]: max file descriptors [4096] for elasticsearch proc ...

  8. 在java.ext.dirs中使用环境变量导致crontab执行不成功的问题及解决

    在java.ext.dirs中使用环境变量导致crontab执行不成功的问题及解决 Table of Contents 1. java.ext.dirs的使用和环境变量 2. 问题:在crontab中 ...

  9. elasticsearch启动错误整理

    一.elasticsearch错误复现 (一).环境 配置环境 OS:CentOS 7.4 64bit elasticsearch版本: - ip:10.18.43.170 java版本:java - ...

随机推荐

  1. ubuntu18.04 下启动Android Studio报错KVM is required to run this AVD. /dev/kvm device: permission denied.

    在ubuntu18.04下安装Android Studio,安装了模拟器后运行报错 KVM is required to run this AVD. /dev/kvm device: permissi ...

  2. python之csv操作

    在使用python爬虫时或者其他情况,都会用到csv存储与读取的相关操作,我们在这里就浅谈一下: CSV(Comma-Separated Values)逗号分隔符,也就是每条记录中的值与值之间是用分号 ...

  3. Android笔记(十四) Android中的基本组件——按钮

    Android中的按钮主要包括Button和ImageButton两种,Button继承自TextView,而ImageButton继承自ImageView.Button生成的按钮上显示文字,而Ima ...

  4. git命令——revert、reset

    参考:如何在 Git 中重置.恢复,返回到以前的状态 使用git时,如果对刚刚提交的后悔了怎么办,如何撤销? 方法一:手动修改 你把新增的文件删了 或者 更改过的文件再改回来,然后再commit一次. ...

  5. RedisTemplate的key默认序列化器问题

    原文:https://blog.csdn.net/skymouse2002/article/details/80736577 redis的客户端换成了spring-boot-starter-data- ...

  6. k8s的网络

    K8S的网络中主要存在4种类型的通信:   ①同一Pod内的容器间通信 ②各个Pod彼此间的通信 ③Pod和Service间的通信 ④集群外部流量和Service之间的通信   K8S为Pod和Ser ...

  7. <<回想>>

    算是一个简单的回忆录,文笔很差,愧对语文老师 突然发现上一篇回忆录,没错就是那个流水账,是去年今天写的...   这是2019年7月的一天,NOI2019刚刚落下帷幕,而小F,则百无聊赖地在高铁站等车 ...

  8. Python 'takes exactly 1 argument (2 given)' Python error

    Python,定义urlConfig 接收参数,正常传递参数时,出现,多给了一个参数的错误问题, 定义class的函数之后,在调用的时候出现“'takes exactly 1 argument (2 ...

  9. ZooInspector使用

    一.工具 ZooInspector作用: 可以利用该工具图形化浏览ZK中的文件及文件夹 下载地址: https://issues.apache.org/jira/secure/attachment/1 ...

  10. RSA公钥私钥原理及作用

    RSA算法广泛应用与加密与认证两个领域 1.加密(保证数据安全性) 使用公钥加密,需使用私钥解密. 这种广泛应用在保证数据的安全性的方面,用户将自己的公钥广播出去,所有人给该用户发数据时使用该公钥加密 ...