Elasticsearch报错: received plaintext http traffic on an https channel, closing connection ...

Elasticsearch报错:received plaintext http traffic on an https channel, closing connection Netty4HttpChannel。

现象,当启动Elasticsearch后,在浏览器输入地址 http://localhost:9200/

后,报错

received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200
如图:

在这里插入图片描述

原因是Elasticsearch在Windows下开启了安全认证,虽然started成功,但访问http://localhost:9200/

失败。

解决方案:

找到config/目录下面的elasticsearch.yml配置文件,把安全认证开关从原先的true都改成false,实现免密登录访问即可,修改这两处都为false后:

在这里插入图片描述

即可解决问题,再次打开http://localhost:9200/

就正常显示内容了:

在这里插入图片描述

{"@timestamp":"2025-03-31T13:45:02.132Z", "log.level": "WARN", "message":"This node is a fully-formed single-node cluster with cluster UUID [2TJKMZR1TNKLU5kjkpihFA], but it is configured as if to discover other nodes and form a multi-node cluster via the [discovery.seed_hosts=[elasticsearch-master-headless]] setting. Fully-formed clusters do not attempt to discover other nodes, and nodes with different cluster UUIDs cannot belong to the same cluster. The cluster UUID persists across restarts and can only be changed by deleting the contents of the node's data path(s). Remove the discovery configuration to suppress this message.", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"elasticsearch[elasticsearch-master-0][scheduler][T#1]","log.logger":"org.elasticsearch.cluster.coordination.Coordinator","elasticsearch.cluster.uuid":"2TJKMZR1TNKLU5kjkpihFA","elasticsearch.node.id":"mtYdBdhQRLW1Fe7ebdHtrA","elasticsearch.node.name":"elasticsearch-master-0","elasticsearch.cluster.name":"elasticsearch"} {"@timestamp":"2025-03-31T13:45:03.995Z", "log.level": "WARN", "message":"received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/127.0.0.1:9200, remoteAddress=/127.0.0.1:48954}", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"elasticsearch[elasticsearch-master-0][transport_worker][T#1]","log.logger":"org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4HttpServerTransport","elasticsearch.cluster.uuid":"2TJKMZR1TNKLU5kjkpihFA","elasticsearch.node.id":"mtYdBdhQRLW1Fe7ebdHtrA","elasticsearch.node.name":"elasticsearch-master-0","elasticsearch.cluster.name":"elasticsearch"} {"@timestamp":"2025-03-31T13:45:11.239Z", "log.level": "WARN", "message":"received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/127.0.0.1:9200, remoteAddress=/127.0.0.1:48958}", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"elasticsearch[elasticsearch-master-0][transport_worker][T#1]","log.logger":"org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4HttpServerTransport","elasticsearch.cluster.uuid":"2TJKMZR1TNKLU5kjkpihFA","elasticsearch.node.id":"mtYdBdhQRLW1Fe7ebdHtrA","elasticsearch.node.name":"elasticsearch-master-0","elasticsearch.cluster.name":"elasticsearch"}
最新发布
04-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值