记录一下在安装使用elasticsearch中遇到的问题

首先,我是单机部署,部署在云服务器上的
我跟着网上的步骤,都配置好之后,启动了elasticsearch,由于我是后台启动,也没看报错,网页访问这个端口,也能访问成功。
问题来了:我在springboot中配置的时候,启动一直报错
method [HEAD], host [http://39.105.190.120:9200] 这个错
然后我在postman上http://xxx:9200/_cat/health 这个请求时,也一直报503
然后打开服务器,查看日志和报错,发现报这个错:master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [node-1] to bootstrap a cluster: have discovered

[node-1] master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster
然后照着网上的来修改
这是修改后的:
http.cors.enabled: true
http.cors.allow-origin: "*
cluster.initial_master_nodes: [“node-1”]
http.port: 9200
transport.tcp.port: 9300
network.host: 0.0.0.0
network.publish_host: xxx
network.bind_host: 0.0.0.0
node.name: node-1
node.master: true
node.data: true
cluster.name: xxx_es
结果还是报错,最后,也是最坑的一点是 cluster.initial_master_nodes: [“node-1”] 这个
我改成这样后就成功启动了:
cluster.initial_master_nodes: node-1

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值