es部署–生产环境–08–常见问题
1、更新地图数据库
1.1、问题
not all primary shards of [.geoip_databases] index are active
1.2、解决
修改 elasticsearch.yml
# ES启动时会去更新地图的一些数据库,这里直接禁掉即可
ingest.geoip.downloader.enabled: false
2、浏览器不能访问
当启动Elasticsearch后,在浏览器输入地址 http://172.168.102.183:9200/ 会报以下错误
2.1、问题
[2023-06-29T10:52:46,937][WARN ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [node-1] received
plaintext http traffic on an https channel, closing connection Netty4HttpChannel
{localAddress=/172.168.102.183:9200, remoteAddress=/172.168.161.66:49222}
原因是Elasticsearch在Windows下开启了安全认证,虽然started成功,但访问http://localhost:9200/ 失败。
2.2、解决
修改 elasticsearch.yml
# 把安全认证开关从原先的true都改成false,实现免密登录访问即可
# Enable security features
xpack.security.enabled: false
xpack.security.enrollment.enabled: true
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: false
keystore.path: certs/http.p12
3、分词器不能使用
3.1、问题
java.lang.IllegalStateException: Could not load plugin descriptor for plugin directory [elasticsearch-analysis-ansj-8.3.3]
Likely root cause: java.nio.file.NoSuchFileException: /home/hd/elasticsearch-8.3.3/plugins/
elasticsearch-analysis-ansj-8.3.3/plugin-descriptor.properties
对应找不到 plugin-descriptor.properties文件。
3.2、解决
原因是压缩包的内容不够完整,下载时应该在官网下载elasticsearch-analysis-ik-版本号.zip,而不是source code.zip或者elasticsearch-analysis-ansj-8.3.3.tar.gz。