Elasticsearch集群-创新互联

1、两台机分别安装好Elasticsearch

创新互联公司专业为企业提供荆门网站建设、荆门做网站、荆门网站设计、荆门网站制作等企业网站建设、网页设计与制作、荆门企业网站模板建站服务,10余年荆门做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。

其中为192.168.1.110,设为master节点,elasticsearch.yml配置如下

cluster.name: my-application
node.name: node-111

network.host: 192.168.1.110
http.port: 9200

http.cors.enabled: true
http.cors.allow-origin: "*"

node.master: true
node.data: true
discovery.zen.ping.unicast.hosts: ["192.168.1.110"]

另一台机:的ip位192.168.1.108,elasticsearch.yml配置如下:

cluster.name: my-application
node.name: node-102

network.host: 192.168.1.108
http.port: 9200

http.cors.enabled: true
http.cors.allow-origin: "*"

node.master: false
node.data: true
discovery.zen.ping.unicast.hosts: ["192.168.1.110"]

分别启动两台机

访问head:

master:

Elasticsearch集群


从的:

Elasticsearch集群


注:

如果另一台机直接复制前一台机;

启动后可能出现:

[node-2] failed to send join request to master [{node-1}{WbcP0pC_T32jWpYvu5is1A}{2_LCVHx1QEaBZYZ7XQEkMg}{10.10.11.200}{10.10.11.200:9300}], reason [RemoteTransportException[[node-1][10.10.11.200:9300][internal:discovery/zen/join]]; nested: IllegalArgumentException[can't add node {node-2}{WbcP0pC_T32jWpYvu5is1A}{p-HCgFLvSFa

解决:

原因是:是因为复制的elasticsearch文件夹下包含了data文件中示例一的节点数据,需要把示例二data文件下的文件清空。


另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网页名称:Elasticsearch集群-创新互联
文章链接:http://lszwz.com/article/dedgdo.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款