getting error destination plugin java not found while using mod-java
Hi Team, I have a setup of syslog-ng in Centos 7 with jdk 1.8.To use a custom java program i have installed syslog-ng-java plugin using yum install. I have added a custom syslog-ng file in conf.d directory.On starting the syslog-ng service i am reciving error destination java plugin not found. *ERROR:*
Jun 24 14:16:01 localhost syslog-ng: Error parsing destination, destination plugin java not found in /etc/syslog-ng/conf.d/syslog-ng-custom.conf at line 15, column 3: Jun 24 14:16:01 localhost syslog-ng: included from /etc/syslog-ng/syslog-ng.conf line 68, column 1 Jun 24 14:16:01 localhost syslog-ng: java( Jun 24 14:16:01 localhost syslog-ng: ^^^^
Syslog-ng is detecting the java plugin(verified by syslog-ng -V) *syslog-ng -V:*
[root@localhost server]# syslog-ng -V
syslog-ng 3 (3.14.1) Config version: 3.14 Installer-Version: 3.14.1 Revision: Compile-Date: Feb 28 2018 07:34:20 Module-Directory: //usr/lib64/syslog-ng Module-Path: //usr/lib64/syslog-ng Available-Modules: add-contextual-data,afamqp,affile,afprog,afsocket,afstomp,afuser,appmodel,basicfuncs,cef,confgen,cryptofuncs,csvparser,date,dbparser,disk-buffer,graphite,json-plugin,kvformat,linux-kmsg-format,map-value-pairs,pseudofile,sdjournal,snmptrapd-parser,stardate,syslogformat,system-source,tags-parser,tfgetent,xml, *mod-java* Enable-Debug: off Enable-GProf: off Enable-Memtrace: off Enable-IPv6: on Enable-Spoof-Source: on Enable-TCP-Wrapper: on Enable-Linux-Caps: on Enable-Systemd: on
Java Version:
[root@localhost server]# java -version java version "1.8.0_171" Java(TM) SE Runtime Environment (build 1.8.0_171-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
*conf.d/syslog-ng-custom.conf* source s_apache {
system(); # Check which OS & collect system logs internal(); };
destination d_remote { tcp("1.2.3.4" port(514)); }; destination d_device_file { file("/var/log/$HOST.$MIN.log"); };
destination java_to_file{ java( class_name("SampleJavaDestination") class_path("/root") option("name", "value") option("filepath", "/var/log/example.txt") ); };
log { source(s_apache); destination(d_device_file); destination(java_to_file);
};
Can someone please tell me what i am missing?
"Pratik" == Pratik Sharma <samsunghacks@gmail.com> writes:
Pratik> Hi Team, Pratik> I have a setup of syslog-ng in Centos 7 with jdk 1.8.To use a custom java Pratik> program i have installed syslog-ng-java plugin using yum install. I have Pratik> added a custom syslog-ng file in conf.d directory.On starting the syslog-ng Pratik> service i am reciving error destination java plugin not Pratik> found. Can you try placing "@module java" somewhere at the top of your syslog-ng.conf file? -- |8]
Hi, Please also make sure that your LD_LIBRARY_PATH envvar (or ld.so.conf) contains a path to libjvm.so. More info: https://syslog-ng.com/blog/troubleshooting-java-support-syslog-ng/ -- László Várady On Mon, Jun 25, 2018 at 10:53 AM Gergely Nagy <algernon@balabit.com> wrote:
"Pratik" == Pratik Sharma <samsunghacks@gmail.com> writes:
Pratik> Hi Team, Pratik> I have a setup of syslog-ng in Centos 7 with jdk 1.8.To use a custom java Pratik> program i have installed syslog-ng-java plugin using yum install. I have Pratik> added a custom syslog-ng file in conf.d directory.On starting the syslog-ng Pratik> service i am reciving error destination java plugin not Pratik> found.
Can you try placing "@module java" somewhere at the top of your syslog-ng.conf file?
-- |8]
______________________________________________________________________________ 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
participants (3)
-
Gergely Nagy
-
László Várady
-
Pratik Sharma