ES running in docker container can not discover the host's name and the host's ip

Elasticsearch version: v2.3.1
JVM version: 1.8.0_77
OS version: centos:6.6

ES running in docker container can not discover the host's name and the host's ip, I used the HOST network model, but the es in container can not connect to the master, the logs like this( i run a es cluster on docker, but they can not recognize each other) :

[2016-04-19 19:53:25,536][INFO ][discovery.zen            ] [Cloak] failed to send join request to master [{Krakkan}{hzJNm3weSkqc-mXxf7qV4g}{127.0.0.1}{127.0.0.1:9300}], reason [RemoteTransportException[[Cloak][127.0.0.1:9300][internal:discovery/zen/join]]; nested: IllegalStateException[Node [{Cloak}{hFZIlf9cQaCgltOMgq88CA}{127.0.0.1}{127.0.0.1:9300}] not master for join request]; ]

And i use the cat api, shows like:

host      ip        heap.percent ram.percent load node.role master name    
127.0.0.1 127.0.0.1            3          94 0.03 d         *      Krakkan

hostname and ip seem not correct for discovery, is something wrong? And how can i handle this?

Is anyone here ?

Need more details... How many es nodes are running per container. How many containers per host... Can you provide a copy of your yml file?

What is host networking that you are alluding to?

Docker on Centos 6.6 is flaky. Use Centos 7+ (Linux kernel 3.10+)

You must configure the network settings in Elasticsearch. Default settings do not work.