See below system information:
[root@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 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: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
--
-- 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.