From 3f850f80d9164a768c4ba49545e504e4f7d19c7d Mon Sep 17 00:00:00 2001 From: Administrator <450292408@qq.com> Date: Sun, 24 Oct 2021 07:16:31 +0000 Subject: [PATCH] docs: update elk/elasticsearch --- elk/elasticsearch.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/elk/elasticsearch.md b/elk/elasticsearch.md index 582a6eb..1a5198c 100644 --- a/elk/elasticsearch.md +++ b/elk/elasticsearch.md @@ -2,7 +2,7 @@ title: ElasticSearch description: 安装以及使用文档 published: true -date: 2021-10-23T09:14:15.263Z +date: 2021-10-24T07:16:30.039Z tags: elk editor: markdown dateCreated: 2021-10-23T09:14:15.263Z @@ -71,6 +71,32 @@ curl http://127.0.0.1:9200 curl http://192.168.0.156:9200 ``` +> 报错:max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535] +{.is-warning} + +原因:原因是进程不够用了 + +编辑 /etc/security/limits.conf,追加以下内容; + +```conf +* soft nofile 65536 +* hard nofile 65536 + +* soft nproc 65536 +* hard nproc 65536 +``` + +> 1. nofile: 是每个进程可以打开的文件数的限制 +> 2. soft nofile表示软限制,hard nofile表示硬限制,软限制要小于等于硬限制。上面两行语句表示,root用户的软限制为1000,硬限制为1200,即表示root用户能打开的最大文件数量为1000,不管它开启多少个shell。 +> 3. nproc:是操作系统级别对每个用户创建的进程数的限制 +> 4. + +此文件修改后需要重新登录用户,才会生效 + +登录后使用ulimit -S -n/ulimit -H -n查看 + +> ulimit -n + > 报错:max virtual memory areas vm.max_map_count [65530] is too low... {.is-warning}