[syslog-ng] systemd syslog-ng does not start CentOS 7.2.1511
Scheidler, Balázs
balazs.scheidler at balabit.com
Wed Apr 13 08:23:07 CEST 2016
-F specifies that syslog-ng should stay in the foreground.
I assumed that it was needed for systemd. You could try --process-mode
background
That causes syslog-ng to go to the background but without its own
supervisor.
On Apr 12, 2016 9:00 PM, "Scot Needy" <scotrn at gmail.com> wrote:
>
>
> Hi,
>
> I need help setting up my control files for systemd I can’t figure out
> what I am doing wrong. If I make a SystemV start stop script it runs fine.
> From systemd I think there is something missing in the control files that
> lets syslog-ng report that is started successfully.
>
> When I add -F to SYSLOGNG_OPTS then systemctl start syslog-g.service never
> returns but syslog-ng does start.
>
> Compiled syslog-ng syslog-ng 3.8.0alpha0 no problems.
> On the command line syslog-ng will start fine.
> /opt/syslog-ng/sbin/syslog-ng -f /opt/syslog-ng/etc/syslog-ng.conf -p
> /var/run/syslogd.pid
>
>
> Using contrib/systemd/syslog-ng.service as an example I
> created /usr/lib/systemd/system/syslog-ng.service
>
> [Unit]
> Description=System Logger Daemon
> Documentation=man:syslog-ng(8)
>
> [Service]
> Type=notify
> ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTS
> ExecReload=/bin/kill -HUP $MAINPID
> EnvironmentFile=-/opt/syslog-ng/etc/syslog-ng.env
> StandardOutput=journal
> StandardError=journal
> Restart=on-failure
>
> [Install]
> WantedBy=multi-user.target
>
>
> cat /opt/syslog-ng/etc/syslog-ng.env
> LD_LIBRARY_PATH=/usr/java/jdk1.8.0_77/jre/lib/amd64/server:$LD_LIBRARY_PATH
> SYSLOGNG_OPTS="-f /opt/syslog-ng/etc/syslog-ng.conf -p
> /var/run/syslogd.pid"
>
>
> systemctl daemon-reload
> systemctl restart systemd-journald
> systemctl start syslog-ng.service
> systemctl status syslog-ng.service
> ● syslog-ng.service - System Logger Daemon
> Loaded: loaded (/usr/lib/systemd/system/syslog-ng.service; enabled;
> vendor preset: enabled)
> Active: inactive (dead) since Tue 2016-04-12 14:51:04 EDT; 29s ago
> Docs: man:syslog-ng(8)
> Process: 2494 ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTS
> (code=exited, status=0/SUCCESS)
> Main PID: 2494 (code=exited, status=0/SUCCESS)
>
>
> Apr 12 14:41:08 loghost systemd[1]: Unit syslog-ng.service entered failed
> state.
> Apr 12 14:41:08 loghost systemd[1]: syslog-ng.service failed.
> Apr 12 14:41:08 loghost systemd[1]: syslog-ng.service holdoff time over,
> scheduling restart.
> Apr 12 14:41:08 loghost systemd[1]: Starting System Logger Daemon...
>
>
> I can see syslog-ng starting and stoping over and over from
> /var/log/messages
>
>
>
>
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation:
> http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20160413/c7623ff7/attachment.htm
More information about the syslog-ng
mailing list