Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

max file descriptors for elasticsearch process is too low

Cannot resolve these problems:

[2017-10-16T13:54:23,381][WARN ][o.e.b.BootstrapChecks    ] [node-1] max 
file descriptors [65000] for elasticsearch process is too low, increase to 
at least [65536]
[2017-10-16T13:54:23,382][WARN ][o.e.b.BootstrapChecks    ] [node-1] max 
number of threads [1024] for user [appadm01] is too low, increase to at 
least [2048]
[2017-10-16T13:54:23,382][WARN ][o.e.b.BootstrapChecks    ] [node-1] system 
call filters failed to install; check the logs and fix your configuration or 
disable system call filters at your own risk

I executed sysctl -w fs.file-max=65536 but I get the same thing.

like image 898
F.BOU Avatar asked Oct 16 '17 13:10

F.BOU


People also ask

What is Max file descriptor?

Thus, we know that this system's hard limit for the number of open file descriptors is 4096.

What is a file descriptor in Linux?

A file descriptor is an unsigned integer used by a process to identify an open file. The number of file descriptors available to a process is limited by the /OPEN_MAX control in the sys/limits. h file. The number of file descriptors is also controlled by the ulimit -n flag.


2 Answers

For those who are using docker for running elastic search then you can set ulimit through your docker run command like below.

docker run --ulimit nofile=65536:65536 -p 9200:9200 --name elastic-search docker.elastic.co/elasticsearch/elasticsearch:6.4.2

Hope this will help docker users

like image 105
arunjos007 Avatar answered Sep 21 '22 15:09

arunjos007


Try this: (got it from 2-3 different sources)

add in $ES_HOME/config/elasticsearch.yml

network.host: 0.0.0.0
http.port: 9200
transport.host: localhost
transport.tcp.port: 9300

If its local dev setup, also use lesser memory options if possible:

add/modify in $ES_HOME/config/jvm.options

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space

-Xms512m
-Xmx512m
like image 24
mrtipale Avatar answered Sep 20 '22 15:09

mrtipale