【问题标题】:Metricbeat (To logz.io) throws "Failed to connect to backoff: x509: certificate signed by unknown authority"Metricbeat(到 logz.io)抛出“无法连接到退避:x509:证书由未知机构签名”
【发布时间】:2021-09-14 13:56:46
【问题描述】:

针对 logz.io 运行 metricbeat 时,metricbeat 会抛出以下错误:

ERROR   [publisher_pipeline_output]     pipeline/output.go:154  Failed to connect to backoff(async(tcp://listener-eu.logz.io:5015)): x509: certificate signed by unknown authority

设置如下:

  • 企业防火墙后的 CentOs 8
  • SELinux 已启用
  • 根据Elastic Docslogz.io Docs下的描述安装Metricbeat
  • 配置(为便于阅读而缩短,但其余部分未注释):
# Standard config, I changed nothing here
metricbeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false

# Standard config, I changed nothing here
setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression

# "MyToken" is the correct token for metrics in logz.io, of course
fields:
  logzio_codec: json
  token: "MyToken"
fields_under_root: true

# Standard config, I changed nothing here
setup.kibana:
  host: "localhost:5601"

# listener is correct, we use EU access, certificate is in the folder (Download as in the description)
output.logstash:
  # The Logstash hosts
  hosts: ["listener-eu.logz.io:5015"]

  # Optional SSL. By default is off.
  # List of root certificates for HTTPS server verifications
  ssl.certificate_authorities: ['/etc/pki/tls/certs/COMODORSADomainValidationSecureServerCA.crt']

# Standard config, I changed nothing here
processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~

到目前为止我尝试了什么/我检查了什么:

  • 我们有一台可以运行的服务器(我不知道为什么或那里有什么不同,配置和防火墙设置相同)
  • Netcat 告诉来自 logz.io 的监听器是可达的 (listener-eu.logz.io:5015)
  • logz.io 的度量标记是正确的
  • 证书COMODORSADomainValidationSecureServerCA.crt是来自https://github.com/logzio/public-certificates的证书,位于/etc/pki/tls/certs
  • 没有对证书文件夹和/etc/metricbeat/metricbeat.yml 文件夹/文件赋予特殊的文件夹访问权限(工作参考服务器也仅在两者上设置了chmod 700
  • 我尝试在output.logstash: 的配置部分中设置ssl.enabled: true,但这并没有改变任何东西
  • metricbeat 服务本身运行正常并记录到 syslog(嗯,它记录错误消息),所以我会声称安装正常并且符合标准

我注意到的一些奇怪的事情是,有时不会发生 X509 错误,而是超时错误(一旦我在日志中再次得到它,我会在这里发布它)。

是否有任何明显的配置遗漏或我可以在服务器上检查的其他内容?

【问题讨论】:

    标签: metricbeat logz.io


    【解决方案1】:

    logz.io documentation 使用更新的证书。 更新后的证书可用here

    请注意文档中的通知:“2021 年 3 月之后创建的指标帐户使用 Prometheus 而不是 ElasticSearch。”

    免责声明:我在 logz.io 工作

    【讨论】:

    • 我已经假设了这样的事情。感谢您的回答和更新的链接,我以前没有看到这个。我已经准备好在 logz.io 上直接联系你们了;)现在它可以正常工作了。
    猜你喜欢
    • 2018-02-24
    • 2021-09-23
    • 2023-01-09
    • 1970-01-01
    • 1970-01-01
    • 2019-03-13
    • 2022-10-19
    • 2017-12-23
    • 1970-01-01
    相关资源
    最近更新 更多