elasticsearch listen to multiple ips

后端 未结 3 1871
失恋的感觉
失恋的感觉 2021-02-07 02:03

Is it possible to listen to multiple host adresses so that I can listen to localhost requests AND private IP requests?

something like:

network.host: \"12         


        
相关标签:
3条回答
  • 2021-02-07 02:08

    I tested the given solution and it did not work. I concluded that Elastic cannot listen on specific interfaces using network.bind_host in the configuration.

    However you can tell elastic to listen on all interfaces by specifying:

    network.bind_host: 0.0.0.0
    network.publish_host: <your external address>
    

    This will make sure one address is published (to the cluster) but all addresses are accessible. Tested and verified with Elastic 2.1.1.

    0 讨论(0)
  • 2021-02-07 02:12
    network.host: [  _site_ , _local_ , _global_ ]
    
    • _local_ : Any loopback addresses
    • _site_ : Any local (internal) addresses
    • _global_: Any external IP

    you can instead specify network interface name like [ _eth0_ , _lo_ ]

    0 讨论(0)
  • 2021-02-07 02:28

    In fact yes it is. Use the JSON notation.

    This is what I used in my configuration: network.bind_host: ["yourhost", "localhost"] and network.publish_host: yourhost as you don't want to send multicast packets on the loopback interface.

    0 讨论(0)
提交回复
热议问题