elastic: Problems With Sniffing
I’m running Elasticsearch v1.4.4 in a Docker container. I kept having trouble getting the client to work properly. I was trying to run the sample in the README (obviously pointing to my Docker container instead of localhost). It was taking ~30 seconds to create the client, and then would fail to create the index with the error: no Elasticsearch node available.
As soon as I set turned off sniffing when creating the client (elastic.SetSniff(false)), everything worked perfectly. It doesn’t really bother me that I have to turn sniffing off, but I wanted to put this issue out to see if anyone else had seen an issue like this.
P.S. @olivere - The documentation is awesome! 👍
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 32 (15 by maintainers)
@email2liyang You can read about all of this in the documentation.
@email2liyang It does use the
publish_address(as all other official clients) which is still"publish_address" : "172.17.0.3:9200".I just ran the testsuite on Docker for Mac with 5.2.1, which you can do too with
run-5.2.1.sh. The configuration file is./config/elasticsearch.yml.Added configuration for system_call_filter to false and it works bootstrap.system_call_filter: false
That did it, thanks for your help! Here’s the steps I took to get it to work:
boot2docker ip). If you are not using Boot2Docker, get the IP address of the machine running the Docker daemon.elasticsearch.ymlconfig from the Elasticsearch release archive.network.publish_hostto the IP address from step one.docker run -d -v "$PWD/config":/usr/share/elasticsearch/config elasticsearchpublish_addressis the IP address from step one when you runcurl -XGET http://<IPAddress>:9200/_nodes/http?pretty