AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 878116
Accepted
giomanda
giomanda
Asked: 2017-10-13 03:08:08 +0800 CST2017-10-13 03:08:08 +0800 CST 2017-10-13 03:08:08 +0800 CST

服务器之间的 td-agent 共享密钥不匹配

  • 772

我正在尝试在两台机器之间使用 td-agent 设置加密日志。我遵循了 fluentd 官方文档中的示例,但是我陷入了一个非常奇怪的情况。由于 shared_key 不匹配,客户端和服务器拒绝协商。

两台服务器上的关键短语都是正确的,但是客户端和服务器都表示密钥不匹配。

这是客户端配置(文本省略):

<match uwsgi.**>
 type copy
<store>
    type secure_forward
    shared_key hello  
    send_timeout 30s
    self_hostname client.example.net

    <server>

            name server.example.net
            host server.example.net
            port 24225
    </server>
</store> 
</match>

这是服务器配置:

<source>
  type secure_forward
  shared_key    hello
  self_hostname server.example.net
  bind 0.0.0.0
  port 24225
  secure true
  ca_cert_path /etc/td-agent/mycert.crt
  ca_private_key_path /etc/td-agent/mykey.key
  ca_private_key_passphrase ""

我不断从服务器收到这些错误消息:

Shared key mismatch from 'client.example.net'

来自客户的相同:

[warn]: dead connection found: server.example.net, reconnecting...  
[warn]: connection refused to server.example.net:authentication failed: shared_key mismatch

有任何想法吗?

fluentd
  • 2 2 个回答
  • 334 Views

2 个回答

  • Voted
  1. Best Answer
    giomanda
    2017-10-13T22:52:07+08:002017-10-13T22:52:07+08:00

    原来td-agent的secure_forward插件有不同的版本。

    更详细地说,相关插件的最新版本(0.4.5),m 用“nonce”“加盐”密码,但以前的版本没有。因此,一个密码以不同的 sha 和结束。

    两种解决方案:
    1. 更新两端的secure_forward 插件
    2. 删除代码中的摘要过程。

    • 0
  2. focus zheng
    2022-06-01T20:12:10+08:002022-06-01T20:12:10+08:00
    <match uwsgi.**>
     type copy
    <store>
        type secure_forward
        
        send_timeout 30s
        self_hostname client.example.net
    
        <server>
          shared_key hello  # put the same shared key
          name server.example.net
          host server.example.net
          port 24225
        </server>
    </store> 
    </match>
    
    • -1

相关问题

  • 如何使用 docker-compose 寻址容器进行日志记录

  • 流畅的弹性搜索压缩

  • 如何在fluentd中将单个记录拆分为多个记录?

  • 如何最大化 fluentd 服务器的利用率?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve