0

I have an issue when trying to forward logs from a 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

I have followed the Syslog-NG over TLS Setup Guide.

After I modify the syslog-ng.conf file, on the client, to suit my needs with the IP address & port, syslog-ng fails to start/restart

@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.

The error I seem to get every time, no matter what, is:

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'

It doesn't seem that I have any errors in that file though

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

Could you please point me in the right direction? What am I doing wrong?

0

Managed to finally figure out what was causing

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

In version 3.14 there is a bug. Please use 3.15 or higher:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.