标签:
需要编辑的文件是config/elasticsearch.yml文件
需要配置的项目有:
# Use a descriptive name for your cluster: # cluster.name: Hadoop # # ------------------------------------ Node ------------------------------------ # # Use a descriptive name for the node: # #node.name: nn2 node.name: ${HOSTNAME} # # Set the bind address to a specific IP (IPv4 or IPv6): # network.host: 192.168.56.122 # # Set a custom port for HTTP: # # http.port: 9200 # # For more information, see the documentation at: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html> # # ---------------------------------- Gateway ----------------------------------- # # Block initial recovery after a full cluster restart until N nodes are started: # # gateway.recover_after_nodes: 3 # # For more information, see the documentation at: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html> # # --------------------------------- Discovery ---------------------------------- # # Elasticsearch nodes will find each other via unicast, by default. # # Pass an initial list of hosts to perform discovery when new node is started: # The default list of hosts is ["127.0.0.1", "[::1]"] # discovery.zen.ping.unicast.hosts: ["nn1","nn2","dn1"]
在同一个网络中,如果启用多播,就会自动发现,生产环境中建议使用单播,有更好的稳定性。
遇到这个问题,一直以为是自己的网络问题,想偏了。
应该细细阅读配置文件,或者是去官方文档上细细阅读,如果想把ELK应用于生产环境,真得需要对文档熟悉,提高工作的效率。
https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html
标签:
原文地址:http://www.cnblogs.com/huaxiaoyao/p/5229279.html