[syslog-ng] CentOS cant start syslog-ng via systemd but runs fine manually
Kókai Péter
peter.kokai at balabit.com
Tue Sep 12 05:42:39 UTC 2017
Hello,
I would say you are missing the LD_LIBRARY_PATH from your syslog-ng.service
file. So it cannot find the java.
You can either change your service file, or alternatively you can
set /etc/ld.so.conf
--
KP
On Tue, 12 Sep 2017, 4:17 am Andrew <toranagtrx at gmail.com> wrote:
> See below system information:
>
> [root at logs ~]# java -version
> openjdk version "1.8.0_141"
> OpenJDK Runtime Environment (build 1.8.0_141-b16)
> OpenJDK 64-Bit Server VM (build 25.141-b16, mixed mode)
>
>
> LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre/lib/amd64/server:
>
> Operating System: CentOS Linux 7 (Core)
> CPE OS Name: cpe:/o:centos:centos:7
> Kernel: Linux 3.10.0-514.26.2.el7.x86_64
> Architecture: x86-64
>
>
> Playing with this again today and it runs fine from the commandline eg.
> syslog-ng -Fevd
>
> systemctl start syslog-ng results in the below, I find it strange that it
> complains about Java not being found only when running via systemd.
>
> -- Unit syslog-ng.service has begun starting up.
> Sep 12 12:15:04 logs.domain.com syslog-ng[29141]: Error parsing
> destination, destination plugin java not found in destination block
> elasticsearch2 at line 2, column 3:
> Sep 12 12:15:04 logs.domain.com syslog-ng[29141]: included from
> /etc/syslog-ng/conf.d/utm.conf line 76, column 3
> Sep 12 12:15:04 logs.domain.com syslog-ng[29141]: included from
> /etc/syslog-ng/syslog-ng.conf line 71, column 1
> Sep 12 12:15:04 logs.domain.com syslog-ng[29141]: java
> Sep 12 12:15:04 logs.domain.com syslog-ng[29141]: ^^^^
> Sep 12 12:15:04 logs.domain.com syslog-ng[29141]: syslog-ng
> documentation:
> http://www.balabit.com/support/documentation/?product=syslog-ng
> Sep 12 12:15:04 logs.domain.com syslog-ng[29141]: mailing list:
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Sep 12 12:15:04 logs.domain.com systemd[1]: syslog-ng.service: main
> process exited, code=exited, status=1/FAILURE
> Sep 12 12:15:04 logs.domain.com systemd[1]: Unit syslog-ng.service
> entered failed state.
> Sep 12 12:15:04 logs.domain.com systemd[1]: syslog-ng.service failed.
> Sep 12 12:15:05 logs.domain.com systemd[1]: syslog-ng.service holdoff
> time over, scheduling restart.
> Sep 12 12:15:05 logs.domain.com systemd[1]: start request repeated too
> quickly for syslog-ng.service
> Sep 12 12:15:05 logs.domain.com systemd[1]: Failed to start System Logger
> Daemon.
> -- Subject: Unit syslog-ng.service has failed
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit syslog-ng.service has failed.
> --
> -- The result is failed.
> Sep 12 12:15:05 logs.domain.com systemd[1]: Unit syslog-ng.service
> entered failed state.
> Sep 12 12:15:05 logs.domain.com systemd[1]: syslog-ng.service failed.
>
>
>
> On Mon, Sep 11, 2017 at 3:18 PM, Kókai Péter <peter.kokai at balabit.com>
> wrote:
>
>> Hi,
>>
>> Could you please give more information about your system?
>> Which version of
>> * syslog-ng
>> * java
>> * centos
>> are you using?
>> If possible which version of java have you used before?
>>
>> Your environment variables related to java?
>> Your syslog-ng configuration?
>>
>>
>>
>> --
>> KP
>>
>> On Mon, 11 Sep 2017, 7:12 am Andrew <toranagtrx at gmail.com> wrote:
>>
>>> I recently updated my CentOS server so there were new versions of Java
>>> and syslog-ng and I have been having issues ever since.
>>>
>>> If I run it from systemd then it fails to load, yet if I run it manually
>>> it works fine and pushes the logs into elasticsearch. When trying to run
>>> from systemd it complains about Java plugin not being found.
>>>
>>> systemctl start syslog-ng
>>>
>>> Error parsing destination, destination plugin java not found in
>>> destination block elasticsearch2 at line 2, column 3
>>>
>>> If I run it manually by typing syslog-ng then it works just fine.
>>>
>>>
>>>
>>>
>>> ______________________________________________________________________________
>>> 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
>>>
>>>
>>
>> ______________________________________________________________________________
>> 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
>>
>>
>>
>
> ______________________________________________________________________________
> 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/20170912/e62f3a6a/attachment-0001.html>
More information about the syslog-ng
mailing list