如何用CLI标志configurationelasticsearch 5.0的发布地址?

我用elasticsearch 2.0启动标志来configurationpublish_addres。 我需要configuration发布地址,因为我想在Docker容器中启动elasticsearch并从外部访问它。 所以发布地址必须是docker主机的IP,这在我的情况下是192.168.99.100。 我想访问端口9201上的elasticsearch。

docker run -d -p 9201:9201 --name elasticsearch_test elasticsearch:5.2-alpine elasticsearch -Enetwork.publish_host="192.168.99.100" -Ehttp.port="9201" 

这就像旧命令一样

 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" 

但是,当我启动容器,并查看日志我没有得到发布地址192.168.99.100:9201,但192.168.99.100:9300和172.17.0.2:9201。 如何强制elasticsearch使用我的地址和端口的组合?

提前致谢

docker logs elasticsearch_test输出docker logs elasticsearch_test

 [2017-02-13T09:17:03,095][INFO ][oenNode ] [] initializing ... [2017-02-13T09:17:03,252][INFO ][oeeNodeEnvironment ] [ntIFoHQ] using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/sda1)]], net usable_space [1gb], net total_space [17.8gb], spins? [possibly], types [ext4] [2017-02-13T09:17:03,252][INFO ][oeeNodeEnvironment ] [ntIFoHQ] heap size [1.9gb], compressed ordinary object pointers [true] [2017-02-13T09:17:03,253][INFO ][oenNode ] node name [ntIFoHQ] derived from node ID [ntIFoHQnTAahC7_0cEt32Q]; set [node.name] to override [2017-02-13T09:17:03,257][INFO ][oenNode ] version[5.2.0], pid[1], build[24e05b9/2017-01-24T19:52:35.800Z], OS[Linux/4.4.43-boot2docker/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_111-internal/25.111-b14] [2017-02-13T09:17:05,249][INFO ][oepPluginsService ] [ntIFoHQ] loaded module [aggs-matrix-stats] [2017-02-13T09:17:05,250][INFO ][oepPluginsService ] [ntIFoHQ] loaded module [ingest-common] [2017-02-13T09:17:05,251][INFO ][oepPluginsService ] [ntIFoHQ] loaded module [lang-expression] [2017-02-13T09:17:05,251][INFO ][oepPluginsService ] [ntIFoHQ] loaded module [lang-groovy] [2017-02-13T09:17:05,251][INFO ][oepPluginsService ] [ntIFoHQ] loaded module [lang-mustache] [2017-02-13T09:17:05,251][INFO ][oepPluginsService ] [ntIFoHQ] loaded module [lang-painless] [2017-02-13T09:17:05,251][INFO ][oepPluginsService ] [ntIFoHQ] loaded module [percolator] [2017-02-13T09:17:05,251][INFO ][oepPluginsService ] [ntIFoHQ] loaded module [reindex] [2017-02-13T09:17:05,254][INFO ][oepPluginsService ] [ntIFoHQ] loaded module [transport-netty3] [2017-02-13T09:17:05,254][INFO ][oepPluginsService ] [ntIFoHQ] loaded module [transport-netty4] [2017-02-13T09:17:05,254][INFO ][oepPluginsService ] [ntIFoHQ] no plugins loaded [2017-02-13T09:17:05,677][WARN ][oedsgGroovyScriptEngineService] [groovy] scripts are deprecated, use [painless] scripts instead [2017-02-13T09:17:10,757][INFO ][oenNode ] initialized [2017-02-13T09:17:10,757][INFO ][oenNode ] [ntIFoHQ] starting ... [2017-02-13T09:17:11,015][WARN ][inuiMacAddressUtil ] Failed to find a usable hardware address from the network interfaces; using random bytes: 07:0a:ef:37:62:95:b2:77 [2017-02-13T09:17:11,198][INFO ][oetTransportService ] [ntIFoHQ] publish_address {192.168.99.100:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300} [2017-02-13T09:17:11,203][INFO ][oebBootstrapChecks ] [ntIFoHQ] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks [2017-02-13T09:17:14,351][INFO ][oecsClusterService ] [ntIFoHQ] new_master {ntIFoHQ}{ntIFoHQnTAahC7_0cEt32Q}{cW1MZt0-RmutLXz_Tkm8mw}{192.168.99.100}{192.168.99.100:9300}, reason: zen-disco-elected-as-master ([0] nodes joined) [2017-02-13T09:17:14,395][INFO ][oehHttpServer ] [ntIFoHQ] publish_address {172.17.0.2:9201}, bound_addresses {[::]:9201} [2017-02-13T09:17:14,396][INFO ][oenNode ] [ntIFoHQ] started [2017-02-13T09:17:14,423][INFO ][oegGatewayService ] [ntIFoHQ] recovered [0] indices into cluster_state [2017-02-13T09:17:44,398][WARN ][oecraDiskThresholdMonitor] [ntIFoHQ] high disk watermark [90%] exceeded on [ntIFoHQnTAahC7_0cEt32Q][ntIFoHQ][/usr/share/elasticsearch/data/nodes/0] free: 1gb[5.7%], shards will be relocated away from this node [2017-02-13T09:17:44,398][INFO ][oecraDiskThresholdMonitor] [ntIFoHQ] rerouting shards: [high disk watermark exceeded on one or more nodes] [2017-02-13T09:18:14,434][WARN ][oecraDiskThresholdMonitor] [ntIFoHQ] high disk watermark [90%] exceeded on [ntIFoHQnTAahC7_0cEt32Q][ntIFoHQ][/usr/share/elasticsearch/data/nodes/0] free: 1gb[5.7%], shards will be relocated away from this node [2017-02-13T09:18:44,438][WARN ][oecraDiskThresholdMonitor] [ntIFoHQ] high disk watermark [90%] exceeded on [ntIFoHQnTAahC7_0cEt32Q][ntIFoHQ][/usr/share/elasticsearch/data/nodes/0] free: 1gb[5.7%], shards will be relocated away from this node [2017-02-13T09:18:44,438][INFO ][oecraDiskThresholdMonitor] [ntIFoHQ] rerouting shards: [high disk watermark exceeded on one or more nodes] [2017-02-13T09:19:14,443][WARN ][oecraDiskThresholdMonitor] [ntIFoHQ] high disk watermark [90%] exceeded on [ntIFoHQnTAahC7_0cEt32Q][ntIFoHQ][/usr/share/elasticsearch/data/nodes/0] free: 1gb[5.7%], shards will be relocated away from this node [2017-02-13T09:19:44,446][WARN ][oecraDiskThresholdMonitor] [ntIFoHQ] high disk watermark [90%] exceeded on [ntIFoHQnTAahC7_0cEt32Q][ntIFoHQ][/usr/share/elasticsearch/data/nodes/0] free: 1gb[5.7%], shards will be relocated away from this node [2017-02-13T09:19:44,447][INFO ][oecraDiskThresholdMonitor] [ntIFoHQ] rerouting shards: [high disk watermark exceeded on one or more nodes] [2017-02-13T09:20:14,453][WARN ][oecraDiskThresholdMonitor] [ntIFoHQ] high disk watermark [90%] exceeded on [ntIFoHQnTAahC7_0cEt32Q][ntIFoHQ][/usr/share/elasticsearch/data/nodes/0] free: 1gb[5.7%], shards will be relocated away from this node [2017-02-13T09:20:44,459][WARN ][oecraDiskThresholdMonitor] [ntIFoHQ] high disk watermark [90%] exceeded on [ntIFoHQnTAahC7_0cEt32Q][ntIFoHQ][/usr/share/elasticsearch/data/nodes/0] free: 1gb[5.7%], shards will be relocated away from this node [2017-02-13T09:20:44,459][INFO ][oecraDiskThresholdMonitor] [ntIFoHQ] rerouting shards: [high disk watermark exceeded on one or more nodes] [2017-02-13T09:21:14,467][WARN ][oecraDiskThresholdMonitor] [ntIFoHQ] high disk watermark [90%] exceeded on [ntIFoHQnTAahC7_0cEt32Q][ntIFoHQ][/usr/share/elasticsearch/data/nodes/0] free: 1gb[5.7%], shards will be relocated away from this node [2017-02-13T09:21:44,471][WARN ][oecraDiskThresholdMonitor] [ntIFoHQ] high disk watermark [90%] exceeded on [ntIFoHQnTAahC7_0cEt32Q][ntIFoHQ][/usr/share/elasticsearch/data/nodes/0] free: 1gb[5.7%], shards will be relocated away from this node [2017-02-13T09:21:44,471][INFO ][oecraDiskThresholdMonitor] [ntIFoHQ] rerouting shards: [high disk watermark exceeded on one or more nodes] [2017-02-13T09:22:14,482][WARN ][oecraDiskThresholdMonitor] [ntIFoHQ] high disk watermark [90%] exceeded on [ntIFoHQnTAahC7_0cEt32Q][ntIFoHQ][/usr/share/elasticsearch/data/nodes/0] free: 1gb[5.7%], shards will be relocated away from this node [2017-02-13T09:22:44,485][WARN ][oecraDiskThresholdMonitor] [ntIFoHQ] high disk watermark [90%] exceeded on [ntIFoHQnTAahC7_0cEt32Q][ntIFoHQ][/usr/share/elasticsearch/data/nodes/0] free: 1gb[5.7%], shards will be relocated away from this node [2017-02-13T09:22:44,485][INFO ][oecraDiskThresholdMonitor] [ntIFoHQ] rerouting shards: [high disk watermark exceeded on one or more nodes] [2017-02-13T09:23:14,497][WARN ][oecraDiskThresholdMonitor] [ntIFoHQ] high disk watermark [90%] exceeded on [ntIFoHQnTAahC7_0cEt32Q][ntIFoHQ][/usr/share/elasticsearch/data/nodes/0] free: 1gb[5.7%], shards will be relocated away from this node 

你想和http.publish_host=192.168.99.100一起使用http.publish_host=192.168.99.100