I've used elasticsearch 2.0 with start up flags to configure the publish_addres. I need the publish address to be configured, because I want to start elasticsearch in a docker container and access it from outside. So the publish address must be the IP of the docker host, which is in my case 192.168.99.100. I want to access elasticsearch on port 9201.
docker run -d -p 9201:9201 --name elasticsearch_test elasticsearch:5.2-alpine elasticsearch -Enetwork.publish_host="192.168.99.100" -Ehttp.port="9201"
which is like the old command
docker run -d -p 9201:9201 --name elasticsearch_test elasticsearch:2.4.1 elasticsearch -Des.network.publish_host="192.168.99.100" -Des.http.port="9201"
But when I start the container and look into the logs I don't get the publish address 192.168.99.100:9201
, but 192.168.99.100:9300
and 172.17.0.2:9201
. How can I force elasticsearch to use my combination of address and port?
Thanks in advance
Output of curl -XGET docker.dev:9201/_nodes?pretty
{ "_nodes" : { "total" : 1, "successful" : 1, "failed" : 0 }, "cluster_name" : "elasticsearch", "nodes" : { "BYDksDQMQLOC-F9A9tJCBg" : { "name" : "BYDksDQ", "transport_address" : "192.168.99.100:9300", "host" : "192.168.99.100", "ip" : "192.168.99.100", "version" : "5.2.0", [...] "settings" : { [...] "http" : { "host" : "0.0.0.0", "type" : { "default" : "netty4" }, "port" : "9201" }, "transport" : { "type" : { "default" : "netty4" } }, "network" : { "bind_host" : "0.0.0.0", "publish_host" : "192.168.99.100" } }, "os" : { "refresh_interval_in_millis" : 1000, "name" : "Linux", "arch" : "amd64", "version" : "4.4.43-boot2docker", "available_processors" : 1, "allocated_processors" : 1 }, "process" : { "refresh_interval_in_millis" : 1000, "id" : 1, "mlockall" : false }, [...] "transport" : { "bound_address" : [ "[::]:9300" ], "publish_address" : "192.168.99.100:9300", "profiles" : { } }, "http" : { "bound_address" : [ "[::]:9201" ], "publish_address" : "172.17.0.2:9201", "max_content_length_in_bytes" : 104857600 }, [...] } } }