ElasticSearch报错记录

本文记录了在ElasticSearch使用过程中遇到的问题及其解决办法,包括启动时的Missing service ImageFile错误,elasticsearch-head连接问题,安装IK插件后服务启动失败,权限错误,filebeat的metrics警告,以及filebeat指定索引无效的问题,并提供了相关配置修改建议。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

注册服务后启动报错

Missing service ImageFile错误

安装的时候一定需要按照顺序安装,先安装JDK,配置好JAVA_HOME,然后再使用elasticsearch-service.bat install进行服务安装

elasticsearch-head 连不上ES

通过修改config/elasticsearch.yml,在最后面加上下面两行信息,文章最后附上完整的yml文件
http.cors.enabled: true
http.cors.allow-origin: “*”
再次启动elasticsearch即可

安装IK之后服务无法启动

Plugin [analysis-ik] was built for Elasticsearch version 7.6.2 but version 7.6.1 is running
原因:我的ES是7.6.1版本,但是ik是7.6.2版本
ik下载:ik下载.

提示access denied

原因分析:安装目录中不能存在空格

filebeat出现 Non-zero metrics in the last 30s

将input和output设置enabled: true

filebeat指定索引之后无效,还是新增默认索引

增加配置:setup.ilm.enabled: false

filebeat上传数据定义mapping

1.在ES创建template
2.生成的文件每行一个json串
3.新增如下配置

###################### Filebeat Configuration Example #########################

# This file is an example configuration file highlighting only the most common
# options. The filebeat.reference.yml file from the same directory contains all the
# supported options with more comments. You can use it as a reference.
#
# You can find the full configuration reference here:
# https://www.elastic.co/guide/en/beats/filebeat/index.html

# For more available modules and options, please see the filebeat.reference.yml sample
# configuration file.

#=========================== Filebeat inputs =============================

filebeat.inputs:

# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.

- type: log

  # Change to true to enable this input configuration.
  enabled: true

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - D:\log\CustomAction\*
  encoding: gb2312
  json.keys_under_root: true
  #json.overwrite_keys: true

  # Exclude lines. A list of regular expressions to match. It drops the lines that are
  # matching any regular expression from the list.
  #exclude_lines: ['^DBG']

  # Include lines. A list of regular expressions to match. It exports the lines that are
  # matching any regular expression from the list.
  #include_lines: ['^ERR', '^WARN']

  # Exclude files. A list of regular expressions to match. Filebeat drops the files that
  # are matching any regular expression from the list. By default, no files are dropped.
  #exclude_files: ['.gz$']

  # Optional additional fields. These fields can be freely picked
  # to add additional information to the crawled log files for filtering
  #fields:
  #  level: debug
  #  review: 1

  ### Multiline options

  # Multiline can be used for log messages spanning multiple lines. This is common
  # for Java Stack Traces or C-Line Continuation

  # The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
  #multiline.pattern: ^\[

  # Defines if the pattern set under pattern should be negated or not. Default is false.
  #mul
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值