1.下载es

Past Releases of Elastic Stack Software | Elastic

我是下载的8.1.3这个版本

2.解压,双击bin目录下的elasticsearch.bat启动es

3.启动成功后,访问http://localhost:9200

 访问之后发现,一直不能访问,而且es打印的日志:

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

原因:ES8默认开启了 ssl 认证

解决:修改elasticsearch.yml配置文件:

xpack.security.http.ssl:enabled 设置成 false

xpack.security.enabled 设置成false

# Enable security features
xpack.security.enabled: false

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

重新启动,即可成功访问: 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐