首页 > 其他 > 详细

elasticsearch 集群搭建

时间:2016-03-01 00:43:20      阅读:294      评论:0      收藏:0      [点我收藏+]

需要编辑的文件是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

elasticsearch 集群搭建

原文:http://www.cnblogs.com/huaxiaoyao/p/5229279.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!