Syslog-ng TLS 错误

Syslog-ng TLS 错误

我在尝试从 CentOS 7 转发日志时遇到问题

[root@localhost ~]# hostnamectl
   Static hostname: localhost.localdomain
         Icon name: computer-vm
           Chassis: vm
        Machine ID: bcaced37a2944a59bbf6f5b2a2dce3cb
           Boot ID: 99c5a21fccdc41a4acf7bbc67d2ecac2
    Virtualization: kvm
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-327.el7.x86_64
      Architecture: x86-64

我已遵循Syslog-NG over TLS 设置指南

在客户端修改syslog-ng.conf文件以满足我对 IP 地址和端口的需求后,syslog-ng 无法启动/重新启动

@version:3.14
@include "scl.conf"

# syslog-ng configuration file.

[root@localhost ~]# systemctl restart syslog-ng.service
Job for syslog-ng.service failed because the control process exited with error code. See "systemctl status syslog-ng.service" and "journalctl -xe" for details.

[root@localhost ~]# systemctl status syslog-ng.service -l
● syslog-ng.service - System Logger Daemon
   Loaded: loaded (/usr/lib/systemd/system/syslog-ng.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit) since Mon 2018-06-11 11:19:59 EEST; 12min ago
     Docs: man:syslog-ng(8)
  Process: 2663 ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS -p /var/run/syslogd.pid (code=exited, status=2)
 Main PID: 2663 (code=exited, status=2)
   Status: "Starting up... (Mon Jun 11 11:19:59 2018"

Jun 11 11:19:59 localhost.localdomain systemd[1]: syslog-ng.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 11 11:19:59 localhost.localdomain systemd[1]: Failed to start System Logger Daemon.
Jun 11 11:19:59 localhost.localdomain systemd[1]: Unit syslog-ng.service entered failed state.
Jun 11 11:19:59 localhost.localdomain systemd[1]: syslog-ng.service failed.
Jun 11 11:19:59 localhost.localdomain systemd[1]: syslog-ng.service holdoff time over, scheduling restart.
Jun 11 11:19:59 localhost.localdomain systemd[1]: start request repeated too quickly for syslog-ng.service
Jun 11 11:19:59 localhost.localdomain systemd[1]: Failed to start System Logger Daemon.
Jun 11 11:19:59 localhost.localdomain systemd[1]: Unit syslog-ng.service entered failed state.
Jun 11 11:19:59 localhost.localdomain systemd[1]: syslog-ng.service failed.

无论如何,我似乎每次都会遇到的错误是:

Error setting up TLS session context; tls_error='(null):(null):(null)'
6-11T11:34:35.204290] Error initializing message pipeline; plugin name='tcp', location='/etc/syslog-ng/syslog-ng.conf:41:1'

不过,我在该文件中似乎没有任何错误

[root@localhost ~]# syslog-ng -s -f /etc/syslog-ng/syslog-ng.conf

你能指出我正确的方向吗?我究竟做错了什么?

答案1

终于弄清楚是什么原因造成的

Error setting up TLS session context; tls_error='(null):(null):(null)'

3.14版本有一个bug。请使用3.15或更高版本:

wget https://copr.fedorainfracloud.org/coprs/czanik/syslog-ng315/repo/epel-7/czanik-syslog-ng315-epel-7.repo

相关内容