New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elasticsearch init scripts set max open files to 65535, but expects 65536 #17430
Comments
Relates to elastic#17430
I had the setting in /etc/security/limits.conf with alpha3 release and starting ES still throws the error and init file contained following lines: Run Elasticsearch as this user ID and group IDES_USER=elasticsearch Maximum number of open filesMAX_OPEN_FILES=65536 Error logs: [2016-06-02 20:05:44,637][ERROR][bootstrap ] [es-tst-m01] Exception |
@ajaybhatnagar How are you starting Elasticsearch? What are the limits for the root user? Note that the limits for the root user must be at least as high as the elasticsearch user. |
Root and es user settings for nofile: ulimit -n output for ES user: Starting ES with service elasticsearch start |
@ajaybhatnagar I'm going to make some assumptions here, please correct if any of them are wrong.
I'm assuming that you deliberately left If these assumptions are correct, the solution to the problem is for you to just log out and log back in. |
Rebooted the node and still the same error. Init script has the line below, yet startup is finding max file descriptors below the configured value. Hardcoded value picked from somewhere else or overwritten ? Maximum number of open filesMAX_OPEN_FILES=65536 |
You have a configuration error somewhere, it's just a matter of finding where. Can you check |
I ran into the same problem just now. And had to change the nofiles in /usr/lib/systemd/system/elasticsearch.service. After changing this to the same value as fs.file-max the message disappeared. |
Caused by setting in /etc/deafult/elasticsearch. Closed. |
hi |
@X-Mars This issue is closed, and was specific to how the defaults that Elasticsearch shipped with were inconsistent with a warning log message that it would produce. Please open a new post on the Elastic Discourse forum with details about your setup and debugging steps that you have already gone through. |
I want to run elasticsearch in docker, but it shows the error when i am running with the command 'docker-compose up'. what should i do with this? My docker-compose.yml: version: '2.0' services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:6.1.0 container_name: elasticsearch environment: - cluster.name=docker-cluster - bootstrap.memory_lock=true - "ES_JAVA_OPTS=-Xms512m -Xmx512m" ulimits: memlock: soft: -1 hard: -1 volumes: - esdata1:/usr/share/elasticsearch/data ports: - 9200:9200 networks: - esnet elasticsearch2: image: docker.elastic.co/elasticsearch/elasticsearch:6.1.0 container_name: elasticsearch2 environment: - cluster.name=docker-cluster - bootstrap.memory_lock=true - "ES_JAVA_OPTS=-Xms512m -Xmx512m" - "discovery.zen.ping.unicast.hosts=elasticsearch" ulimits: memlock: soft: -1 hard: -1 volumes: - esdata2:/usr/share/elasticsearch/data networks: - esnet volumes: esdata1: driver: local esdata2: driver: local networks: esnet: |
@jasontedor Thanks. I have solved the problem. Those guys who use elasticsearch in docker have a look at this document https://blog.docker.com/2015/04/docker-release-1-6, the Ulimits section. |
and reboot system |
Elasticsearch version: 5.0.0-alpha1 78ab6c5
JVM version:
OpenJDK Runtime Environment (build 1.8.0_72-internal-b15)
OS version: Ubuntu 14.04
Description of the problem including expected versus actual behavior:
Elasticsearch expects max open file descriptors to be set to 65536, but init scripts set it to 65535.
Steps to reproduce:
/etc/init.d/elasticsearch
Provide logs (if relevant):
The text was updated successfully, but these errors were encountered: