<div dir="ltr">Hi,<div><br></div><div>As I know we have no control over flushing the file in HDFS.</div><div>I've checked our admin guide, let me quote it:</div><div>> You cannot set when log messages are flushed. Hadoop performs this action </div><div>> automatically, depending on its configured block size, and the amount of data </div><div>> received. There is no way for the syslog-ng OSE application to influence when the </div><div>> messages are actually written to disk. This means that syslog-ng OSE cannot </div><div>> guarantee that a message sent to HDFS is actually written to disk.</div><div><br></div><div>You can reload syslog-ng periodically. During reload the used files are closed and HDFS should flushes them to the datanodes.</div><div>Do you use append in your HDFS environment?</div><div><br></div><div>Regards,</div><div>Gabor</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 27, 2018 at 9:13 AM Lee Keng Ket <<a href="mailto:kengket@gmail.com">kengket@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi,<br><br></div>I'm able to send the syslog to HDFS, but it seems not real time. The file in HDFS does not increase size, until I stop the syslog-ng process, then all the messages go into HDFS and we can see the file size increase.<br></div>Any idea how frequent the syslog-ng send the syslog to HDFS? If the syslog-ng incoming syslog is a lot, is there any fine-tuning required? The syslog-ng also write log file in local server, I can see the file size increase by 40MB in 20min. However, the file in HDFS remains same size until I stop the syslog-ng process. Once I stop the process, the log is written into the HDFS.<br><br></div>This is log stats:<br>Log statistics; processed='src.internal(s_sys#1)=4', stamp='src.internal(s_sys#1)=1535352937', processed='destination(d_mlal)=0', processed='center(received)=30694', processed='destination(d_spol)=0', processed='destination(d_mesg)=4', processed='destination(d_mail)=0', processed='destination(d_auth)=0', processed='destination(d_cron)=0', processed='destination(d_hdfs)=30690', processed='center(queued)=61384', queued='global(scratch_buffers_count)=0', processed='source(remote_log)=30690', dropped='dst.java(d_hdfs#0,java_dst,hdfs,hdfs://CN03:25000,/user/syslog/$HOST-$DAY-$MONTH-$YEAR.log)=0', processed='dst.java(d_hdfs#0,java_dst,hdfs,hdfs://CN03:25000,/user/syslog/$HOST-$DAY-$MONTH-$YEAR.log)=30690', queued='dst.java(d_hdfs#0,java_dst,hdfs,hdfs://CN03:25000,/user/syslog/$HOST-$DAY-$MONTH-$YEAR.log)=0', processed='global(payload_reallocs)=0', processed='global(sdata_updates)=0', queued='global(scratch_buffers_bytes)=0', processed='src.journald(s_sys#0,journal)=0', stamp='src.journald(s_sys#0,journal)=0', processed='destination(d_boot)=0', processed='destination(d_kern)=0', processed='source(s_sys)=4', processed='destination(remote)=30690', processed='global(internal_queue_length)=0', processed='global(msg_clones)=0'<br><br></div><div>Thank you.<br><br></div><div>Regards,<br></div><div>KK<br></div><div><br></div><br></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 27, 2018 at 10:41 AM Lee Keng Ket <<a href="mailto:kengket@gmail.com" target="_blank">kengket@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi, Gabor<br><br></div>I am able to send the syslog to HDFS after adding in the hdfs-resources option. <br></div>Thanks a lot for your help.<br><br></div>Thank you.<br><br></div>Regards,<br></div>KK<br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 24, 2018 at 10:29 PM Nagy, Gábor <<a href="mailto:gabor.nagy@oneidentity.com" target="_blank">gabor.nagy@oneidentity.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>As I was searching for answer what i saw was that "SaslException: No common protection layer between client and server;" can occur</div><div>if the configuration differs on client-server side.</div><div><br></div><div>You should configure the "hadoop.rpc.protection" value in core-site.xml on the client side to the same one as on the server side.</div><div>To use that xml with hdfs, you should put the filename in syslog-ng config in the hdfs destination block:<br>destination d_hdfs {</div><div>  ...</div><div>  hdfs-resources("/path/to/xmlconfig/core-site.xml");</div><div>};</div><div><br></div><div>Regards,</div><div>Gabor</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 23, 2018 at 3:53 AM Lee Keng Ket <<a href="mailto:kengket@gmail.com" target="_blank">kengket@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi, Gabor<br><br></div>After I change the lib to executable as reminded by Janos, now there is different error. Any idea if this is Kerberos issue or still the Hadoop lib issue?<br><br></div>The Hadoop that I'm using is Huawei FusionInsight. Hadoop HDFS version should be 2.7.2.<br><br></div>This is the syslog-ng.conf for HDFS part:<br>destination d_hdfs {<br>        hdfs(client_lib_dir("/opt/hadoop/lib")<br>        hdfs_uri("hdfs://x.x.x.x:25000")<br>        kerberos-keytab-file("/etc/syslog.keytab")<br>        kerberos-principal("<a href="mailto:syslog@HADOOP.COM" target="_blank">syslog@HADOOP.COM</a>")<br>        hdfs_file("/user/syslog/$HOST-$DAY-$MONTH-$YEAR.log")<br>        template(t_cgnat)<br>        hdfs-append-enabled(true)<br>        );<br>};<br><br><div><div>There are the messages I get when starting in debug:<br><br>[2018-08-23T09:40:09.210168] Running application hooks; hook='1'<br>[2018-08-23T09:40:09.210192] Running application hooks; hook='3'<br>[2018-08-23T09:40:09.210501] syslog-ng starting up; version='3.14.1'<br>[2018-08-23T09:40:09.213049] Worker thread started; driver='d_hdfs#0'<br>[2018-08-23T09:40:09.214922] Opening hdfs;<br>[2018-08-23T09:40:09.548286] field org.apache.hadoop.metrics2.lib.MutableRate org.apache.hadoop.security.UserGroupInformation$UgiMetrics.loginSuccess with annotation @org.apache.hadoop.metrics2.annotation.Metric(about=, sampleName=Ops, always=false, type=DEFAULT, valueName=Time, value=[Rate of successful kerberos logins and latency (milliseconds)]);<br>[2018-08-23T09:40:09.561345] field org.apache.hadoop.metrics2.lib.MutableRate org.apache.hadoop.security.UserGroupInformation$UgiMetrics.loginFailure with annotation @org.apache.hadoop.metrics2.annotation.Metric(about=, sampleName=Ops, always=false, type=DEFAULT, valueName=Time, value=[Rate of failed kerberos logins and latency (milliseconds)]);<br>[2018-08-23T09:40:09.561608] field org.apache.hadoop.metrics2.lib.MutableRate org.apache.hadoop.security.UserGroupInformation$UgiMetrics.getGroups with annotation @org.apache.hadoop.metrics2.annotation.Metric(about=, sampleName=Ops, always=false, type=DEFAULT, valueName=Time, value=[GetGroups]);<br>[2018-08-23T09:40:09.562485] UgiMetrics, User and group related metrics;<br>[2018-08-23T09:40:09.604037] Failed to detect a valid hadoop home directory;<br>[2018-08-23T09:40:09.687386] setsid exited with exit code 0;<br>[2018-08-23T09:40:09.715804]  Creating new Groups object;<br>[2018-08-23T09:40:09.717743] Trying to load the custom-built native-hadoop library...;<br>[2018-08-23T09:40:09.718065] Failed to load native-hadoop with error: java.lang.UnsatisfiedLinkError: no hadoop in java.library.path;<br>[2018-08-23T09:40:09.718095] java.library.path=//usr/lib64/syslog-ng;<br>[2018-08-23T09:40:09.718117] Unable to load native-hadoop library for your platform... using builtin-java classes where applicable;<br>[2018-08-23T09:40:09.718418] Falling back to shell based;<br>[2018-08-23T09:40:09.718997] Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping;<br>[2018-08-23T09:40:09.753615] Group mapping impl=org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback\; cacheTimeout=300000\; warningDeltaMs=5000;<br>[2018-08-23T09:40:09.905060] hadoop login;<br>[2018-08-23T09:40:09.906493] hadoop login commit;<br>[2018-08-23T09:40:09.907300] using kerberos <a href="mailto:user%3Asyslog@HADOOP.COM" target="_blank">user:syslog@HADOOP.COM</a>;<br>[2018-08-23T09:40:09.907333] Using user: "<a href="mailto:syslog@HADOOP.COM" target="_blank">syslog@HADOOP.COM</a>" with name <a href="mailto:syslog@HADOOP.COM" target="_blank">syslog@HADOOP.COM</a>;<br>[2018-08-23T09:40:09.907592] User entry: "<a href="mailto:syslog@HADOOP.COM" target="_blank">syslog@HADOOP.COM</a>";<br>[2018-08-23T09:40:09.908005] Login successful for user <a href="mailto:syslog@HADOOP.COM" target="_blank">syslog@HADOOP.COM</a> using keytab file syslog.keytab;<br>[2018-08-23T09:40:10.104386] dfs.client.use.legacy.blockreader.local = false;<br>[2018-08-23T09:40:10.104436] dfs.client.read.shortcircuit = false;<br>[2018-08-23T09:40:10.104450] dfs.client.domain.socket.data.traffic = false;<br>[2018-08-23T09:40:10.104461] dfs.domain.socket.path = ;<br>[2018-08-23T09:40:10.121280] Sets dfs.client.block.write.replace-datanode-on-failure.replication to 0;<br>[2018-08-23T09:40:10.144892] multipleLinearRandomRetry = null;<br>[2018-08-23T09:40:10.168901] rpcKind=RPC_PROTOCOL_BUFFER, rpcRequestWrapperClass=class org.apache.hadoop.ipc.ProtobufRpcEngine$RpcProtobufRequest, rpcInvoker=org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker@4379f1a4;<br>[2018-08-23T09:40:10.173738] getting client out of cache: org.apache.hadoop.ipc.Client@5b52b909;<br>[2018-08-23T09:40:10.238466] finalize() called.;<br>[2018-08-23T09:40:10.238705] finalize() called.;<br>[2018-08-23T09:40:10.526021] Both short-circuit local reads and UNIX domain socket are disabled.;<br>[2018-08-23T09:40:10.532037] DataTransferProtocol not using SaslPropertiesResolver, no QOP found in configuration for dfs.data.transfer.protection;<br>[2018-08-23T09:40:10.555581] The ping interval is 60000 ms.;<br>[2018-08-23T09:40:10.556336] Connecting to /x.x.x.x:25000;<br>[2018-08-23T09:40:10.572385] PrivilegedAction <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) from:org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:771);<br>[2018-08-23T09:40:10.613823] Get kerberos info proto:interface org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB info:@org.apache.hadoop.security.KerberosInfo(clientPrincipal=, serverPrincipal=dfs.namenode.kerberos.principal);<br>[2018-08-23T09:40:10.723447] RPC Server's Kerberos principal name for protocol=org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB is hdfs/<a href="mailto:hadoop.hadoop.com@HADOOP.COM" target="_blank">hadoop.hadoop.com@HADOOP.COM</a>;<br>[2018-08-23T09:40:10.723514] Creating SASL GSSAPI(KERBEROS)  client to authenticate to service at <a href="http://hadoop.hadoop.com" target="_blank">hadoop.hadoop.com</a>;<br>[2018-08-23T09:40:10.730466] Use KERBEROS authentication for protocol ClientNamenodeProtocolPB;<br>[2018-08-23T09:40:10.758296] PrivilegedActionException <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) cause:javax.security.sasl.SaslException: No common protection layer between client and server;<br>[2018-08-23T09:40:10.759031] PrivilegedAction <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) from:org.apache.hadoop.ipc.Client$Connection.handleSaslConnectionFailure(Client.java:694);<br>[2018-08-23T09:40:10.759531] Exception encountered while connecting to the server : javax.security.sasl.SaslException: No common protection layer between client and server;<br>[2018-08-23T09:40:14.446925] PrivilegedAction <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) from:org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:771);<br>[2018-08-23T09:40:14.447824] Get kerberos info proto:interface org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB info:@org.apache.hadoop.security.KerberosInfo(clientPrincipal=, serverPrincipal=dfs.namenode.kerberos.principal);<br>[2018-08-23T09:40:14.447982] RPC Server's Kerberos principal name for protocol=org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB is hdfs/<a href="mailto:hadoop.hadoop.com@HADOOP.COM" target="_blank">hadoop.hadoop.com@HADOOP.COM</a>;<br>[2018-08-23T09:40:14.448001] Creating SASL GSSAPI(KERBEROS)  client to authenticate to service at <a href="http://hadoop.hadoop.com" target="_blank">hadoop.hadoop.com</a>;<br>[2018-08-23T09:40:14.449087] Use KERBEROS authentication for protocol ClientNamenodeProtocolPB;<br>[2018-08-23T09:40:14.455070] PrivilegedActionException <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) cause:javax.security.sasl.SaslException: No common protection layer between client and server;<br>[2018-08-23T09:40:14.455190] PrivilegedAction <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) from:org.apache.hadoop.ipc.Client$Connection.handleSaslConnectionFailure(Client.java:694);<br>[2018-08-23T09:40:14.455476] Exception encountered while connecting to the server : javax.security.sasl.SaslException: No common protection layer between client and server;<br>[2018-08-23T09:40:17.206928] PrivilegedAction <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) from:org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:771);<br>[2018-08-23T09:40:17.207978] Get kerberos info proto:interface org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB info:@org.apache.hadoop.security.KerberosInfo(clientPrincipal=, serverPrincipal=dfs.namenode.kerberos.principal);<br>[2018-08-23T09:40:17.208115] RPC Server's Kerberos principal name for protocol=org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB is hdfs/<a href="mailto:hadoop.hadoop.com@HADOOP.COM" target="_blank">hadoop.hadoop.com@HADOOP.COM</a>;<br>[2018-08-23T09:40:17.208133] Creating SASL GSSAPI(KERBEROS)  client to authenticate to service at <a href="http://hadoop.hadoop.com" target="_blank">hadoop.hadoop.com</a>;<br>[2018-08-23T09:40:17.208877] Use KERBEROS authentication for protocol ClientNamenodeProtocolPB;<br>[2018-08-23T09:40:17.214382] PrivilegedActionException <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) cause:javax.security.sasl.SaslException: No common protection layer between client and server;<br>[2018-08-23T09:40:17.214536] PrivilegedAction <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) from:org.apache.hadoop.ipc.Client$Connection.handleSaslConnectionFailure(Client.java:694);<br>[2018-08-23T09:40:17.214845] Exception encountered while connecting to the server : javax.security.sasl.SaslException: No common protection layer between client and server;<br>[2018-08-23T09:40:17.535313] PrivilegedAction <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) from:org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:771);<br>[2018-08-23T09:40:17.536419] Get kerberos info proto:interface org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB info:@org.apache.hadoop.security.KerberosInfo(clientPrincipal=, serverPrincipal=dfs.namenode.kerberos.principal);<br>[2018-08-23T09:40:17.536615] RPC Server's Kerberos principal name for protocol=org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB is hdfs/<a href="mailto:hadoop.hadoop.com@HADOOP.COM" target="_blank">hadoop.hadoop.com@HADOOP.COM</a>;<br>[2018-08-23T09:40:17.536634] Creating SASL GSSAPI(KERBEROS)  client to authenticate to service at <a href="http://hadoop.hadoop.com" target="_blank">hadoop.hadoop.com</a>;<br>[2018-08-23T09:40:17.537679] Use KERBEROS authentication for protocol ClientNamenodeProtocolPB;<br>[2018-08-23T09:40:17.546375] PrivilegedActionException <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) cause:javax.security.sasl.SaslException: No common protection layer between client and server;<br>[2018-08-23T09:40:17.546587] PrivilegedAction <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) from:org.apache.hadoop.ipc.Client$Connection.handleSaslConnectionFailure(Client.java:694);<br>[2018-08-23T09:40:17.546963] Exception encountered while connecting to the server : javax.security.sasl.SaslException: No common protection layer between client and server;<br>[2018-08-23T09:40:21.891382] PrivilegedAction <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) from:org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:771);<br>[2018-08-23T09:40:21.892476] Get kerberos info proto:interface org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB info:@org.apache.hadoop.security.KerberosInfo(clientPrincipal=, serverPrincipal=dfs.namenode.kerberos.principal);<br>[2018-08-23T09:40:21.909267] RPC Server's Kerberos principal name for protocol=org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB is hdfs/<a href="mailto:hadoop.hadoop.com@HADOOP.COM" target="_blank">hadoop.hadoop.com@HADOOP.COM</a>;<br>[2018-08-23T09:40:21.909306] Creating SASL GSSAPI(KERBEROS)  client to authenticate to service at <a href="http://hadoop.hadoop.com" target="_blank">hadoop.hadoop.com</a>;<br>[2018-08-23T09:40:21.910125] Use KERBEROS authentication for protocol ClientNamenodeProtocolPB;<br>[2018-08-23T09:40:21.915324] PrivilegedActionException <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) cause:javax.security.sasl.SaslException: No common protection layer between client and server;<br>[2018-08-23T09:40:21.915540] PrivilegedAction <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) from:org.apache.hadoop.ipc.Client$Connection.handleSaslConnectionFailure(Client.java:694);<br>[2018-08-23T09:40:21.915889] Exception encountered while connecting to the server : javax.security.sasl.SaslException: No common protection layer between client and server;<br>[2018-08-23T09:40:26.095299] PrivilegedAction <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) from:org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:771);<br>[2018-08-23T09:40:26.096234] Get kerberos info proto:interface org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB info:@org.apache.hadoop.security.KerberosInfo(clientPrincipal=, serverPrincipal=dfs.namenode.kerberos.principal);<br>[2018-08-23T09:40:26.096391] RPC Server's Kerberos principal name for protocol=org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB is hdfs/<a href="mailto:hadoop.hadoop.com@HADOOP.COM" target="_blank">hadoop.hadoop.com@HADOOP.COM</a>;<br>[2018-08-23T09:40:26.096411] Creating SASL GSSAPI(KERBEROS)  client to authenticate to service at <a href="http://hadoop.hadoop.com" target="_blank">hadoop.hadoop.com</a>;<br>[2018-08-23T09:40:26.097116] Use KERBEROS authentication for protocol ClientNamenodeProtocolPB;<br>[2018-08-23T09:40:26.101823] PrivilegedActionException <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) cause:javax.security.sasl.SaslException: No common protection layer between client and server;<br>[2018-08-23T09:40:26.101960] PrivilegedAction <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) from:org.apache.hadoop.ipc.Client$Connection.handleSaslConnectionFailure(Client.java:694);<br>[2018-08-23T09:40:26.102283] Couldn't setup connection for <a href="mailto:syslog@HADOOP.COM" target="_blank">syslog@HADOOP.COM</a> to /x.x.x.x:25000;<br>[2018-08-23T09:40:26.102365] PrivilegedActionException <a href="mailto:as%3Asyslog@HADOOP.COM" target="_blank">as:syslog@HADOOP.COM</a> (auth:KERBEROS) cause:java.io.IOException: Couldn't setup connection for <a href="mailto:syslog@HADOOP.COM" target="_blank">syslog@HADOOP.COM</a> to /x.x.x.x:25000;<br>[2018-08-23T09:40:26.103844] closing ipc connection to /x.x.x.x:25000: Couldn't setup connection for <a href="mailto:syslog@HADOOP.COM" target="_blank">syslog@HADOOP.COM</a> to /x.x.x.x:25000;<br>[2018-08-23T09:40:26.103994] IPC Client (1766482975) connection to /x.x.x.x:25000 from <a href="mailto:syslog@HADOOP.COM" target="_blank">syslog@HADOOP.COM</a>: closed;<br><br></div><div>Thank you.<br><br><br></div><div><div class="gmail_quote"><div dir="ltr">On Tue, Aug 21, 2018 at 6:48 PM Nagy, Gábor <<a href="mailto:gabor.nagy@oneidentity.com" target="_blank">gabor.nagy@oneidentity.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Can you tell ne what is the version of the hadoop lib you use with syslog-ng, please?</div><div><br></div><div>Can you share your syslog-ng configuration, mainly the hdfs part, please?</div><div><br></div><div>Regards,</div><div>Gabor</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 21, 2018 at 4:15 AM Lee Keng Ket <<a href="mailto:kengket@gmail.com" target="_blank">kengket@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Hi, Gabor<br><br></div>I have run it, seems like it stops at the HDFS side.<br><br>[2018-08-21T10:07:51.212015] Worker thread started; driver='d_hdfs#0'<br>[2018-08-21T10:07:51.212499] Running application hooks; hook='1'<br>[2018-08-21T10:07:51.212516] Running application hooks; hook='3'<br>[2018-08-21T10:07:51.212595] syslog-ng starting up; version='3.14.1'<br>[2018-08-21T10:07:51.214113] Opening hdfs;<br>[2018-08-21T10:08:01.215622] Opening hdfs;<br>[2018-08-21T10:08:11.216050] Opening hdfs;<br>[2018-08-21T10:08:21.226340] Opening hdfs;<br>[2018-08-21T10:08:31.236589] Opening hdfs;<br>[2018-08-21T10:08:41.240623] Opening hdfs;<br>[2018-08-21T10:08:51.250879] Opening hdfs;<br>[2018-08-21T10:09:01.261172] Opening hdfs;<br>[2018-08-21T10:09:11.271410] Opening hdfs;<br>[2018-08-21T10:09:21.281685] Opening hdfs;<br>[2018-08-21T10:09:31.290765] Opening hdfs;<br>[2018-08-21T10:09:41.301098] Opening hdfs;<br>[2018-08-21T10:09:51.311362] Opening hdfs;<br>[2018-08-21T10:10:01.321152] Opening hdfs;<br>[2018-08-21T10:10:11.321818] Opening hdfs;<br>[2018-08-21T10:10:21.330114] Opening hdfs;<br>[2018-08-21T10:10:31.340413] Opening hdfs;<br>[2018-08-21T10:10:41.350654] Opening hdfs;<br>[2018-08-21T10:10:51.354016] Opening hdfs;<br>[2018-08-21T10:11:01.364267] Opening hdfs;<br>[2018-08-21T10:11:11.374516] Opening hdfs;<br>[2018-08-21T10:11:21.384761] Opening hdfs;<br>[2018-08-21T10:11:31.395017] Opening hdfs;<br>[2018-08-21T10:11:41.402256] Opening hdfs;<br>[2018-08-21T10:11:51.404097] Opening hdfs;<br>^C[2018-08-21T10:11:59.672252] syslog-ng shutting down; version='3.14.1'<br>Exception in thread "" java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration<br>        at org.syslog_ng.hdfs.HdfsDestination.open(HdfsDestination.java:92)<br>        at org.syslog_ng.LogDestination.openProxy(LogDestination.java:65)<br>[2018-08-21T10:11:59.774895] Worker thread finished; driver='d_hdfs#0'<br>[2018-08-21T10:11:59.775384] Closing log transport fd; fd='13'<br>[2018-08-21T10:11:59.775508] Deinitialize hdfs destination;<br>[2018-08-21T10:11:59.776534] Java machine free;<br>[2018-08-21T10:11:59.778421] Running application hooks; hook='4'<br><br></div>Any idea what to be checked further?<br><br></div>Thank you.<br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 17, 2018 at 4:45 PM Nagy, Gábor <<a href="mailto:gabor.nagy@oneidentity.com" target="_blank">gabor.nagy@oneidentity.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello!<div><br></div><div>In the statistics it can be seen that the log message is not sent to the HDFS server:<br></div><div><div>dropped='dst.java(d_hdfs#0 java_dst hdfs hdfs://x.x.x.x:25000 /user/syslog/$HOST-$DAY-$MONTH-$YEAR.log)=0'</div><div>processed='dst.java(d_hdfs#0 java_dst hdfs hdfs://x.x.x.x:25000 /user/syslog/$HOST-$DAY-$MONTH-$YEAR.log)=1'</div><div>queued='dst.java(d_hdfs#0 java_dst hdfs hdfs://x.x.x.x:25000 /user/syslog/$HOST-$DAY-$MONTH-$YEAR.log)=1'</div></div><div><br></div><div>Well, generally on write error there should be an exception that results in an error message.</div><div><br></div><div>You should try debugging it either in running syslog-ng in foreground (-F option), forwarding internal logs to stderr (-e) and with debug mode (-dv) on.<br>Or in service mode use the internal() source in your config and connect it to a destination (e.g. file()) which you prefer.</div><div><br></div><div>You could turn on debug messages on java side too using jvm_options() in syslog-ng config and configuring the log4j logging service, e.g.:<br><div>options {</div><div>        jvm_options("-Dlog4j.configuration=file:/etc/hadoop/log4j.properties -Dlog4j.debug=true");</div><div>};</div></div><div><br></div><div>Regards,</div><div>Gabor</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 17, 2018 at 10:34 AM Czanik, Péter <<a href="mailto:peter.czanik@balabit.com" target="_blank">peter.czanik@balabit.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>As <a href="https://copr.fedorainfracloud.org/coprs/czanik/syslog-ng314/" target="_blank">https://copr.fedorainfracloud.org/coprs/czanik/syslog-ng314/</a> also writes: "Java is enabled, but JAR dependencies are not provided in package, except for Elasticsearch http mode." The syslog-ng-java-deps.noarch contains build time dependencies. Probably I should rename the package to syslog-ng-java-build-deps...</div><div><br></div><div>Check the documentation at <a href="https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.16/administration-guide/33#TOPIC-956506" target="_blank">https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.16/administration-guide/33#TOPIC-956506</a> on how to download and configure HDFS related JAR dependencies.</div><div><br></div><div>Bye,<br></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-2094101301647072329m_9196057597215898215m_-4536154527580568426m_-8558368705550691582gmail-m_5788115050752405235m_-8289036816759268877m_-4468223703778826464m_9221686417707055935gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Peter Czanik (CzP) <<a href="mailto:peter.czanik@balabit.com" target="_blank">peter.czanik@balabit.com</a>><br>Balabit / syslog-ng upstream<br><a href="https://syslog-ng.com/community/" target="_blank">https://syslog-ng.com/community/</a><br><a href="https://twitter.com/PCzanik" target="_blank">https://twitter.com/PCzanik</a></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Fri, Aug 17, 2018 at 10:22 AM, Lee Keng Ket <span dir="ltr"><<a href="mailto:kengket@gmail.com" target="_blank">kengket@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Hi,<br><br></div>I'm trying to connect syslog-ng 3.14.1 to HDFS to store the syslog messages. The syslog-ng can start without error, and it's able to write into local file. However, the log is not written to the HDFS. As there is no single error, I'm not sure how I should troubleshoot on this.<br><br></div><div>I have installed the syslog-ng from this repo, <a href="https://copr.fedorainfracloud.org/coprs/czanik/syslog-ng314/repo/epel-7/czanik-syslog-ng314-epel-7.repo" target="_blank">https://copr.fedorainfracloud.org/coprs/czanik/syslog-ng314/repo/epel-7/czanik-syslog-ng314-epel-7.repo</a><br><br>Installed Packages<br>syslog-ng.x86_64                                                                        3.14.1-4.el7.centos                                                              @czanik-syslog-ng314<br>syslog-ng-java.x86_64                                                                   3.14.1-4.el7.centos                                                              @czanik-syslog-ng314<br>syslog-ng-java-deps.noarch                                                              1.0-2                                                                            @czanik-syslog-ng314<br></div><div><br></div>This is the message from /var/log/message:<br>Log statistics; processed='src.internal(s_sys#0)=1', stamp='src.internal(s_sys#0)=1534491834', processed='destination(d_spol)=0', processed='destination(d_mlal)=0', processed='center(received)=2', processed='destination(d_mesg)=1', processed='destination(d_mail)=0', processed='destination(d_auth)=0', processed='destination(d_cron)=0', processed='destination(d_hdfs)=1', processed='center(queued)=3', queued='global(scratch_buffers_count)=0', processed='source(remote_log)=1', dropped='dst.java(d_hdfs#0,java_dst,hdfs,hdfs://x.x.x.x:25000,/user/syslog/$HOST-$DAY-$MONTH-$YEAR.log)=0', processed='dst.java(d_hdfs#0,java_dst,hdfs,hdfs://x.x.x.x:25000,/user/syslog/$HOST-$DAY-$MONTH-$YEAR.log)=1', queued='dst.java(d_hdfs#0,java_dst,hdfs,hdfs://x.x.x.x:25000,/user/syslog/$HOST-$DAY-$MONTH-$YEAR.log)=1', processed='global(payload_reallocs)=0', processed='src.journald(journal)=0', stamp='src.journald(journal)=0', processed='global(sdata_updates)=0', queued='global(scratch_buffers_bytes)=0', processed='destination(d_boot)=0', processed='destination(d_kern)=0', processed='source(s_sys)=1', processed='destination(remote)=1', processed='global(internal_queue_length)=0', processed='global(msg_clones)=0'<br><br></div>Anyone has any idea how should I proceed the troubleshooting?<br></div>
<br>______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
<br></blockquote></div><br></div>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div></div></div></div>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>
</blockquote></div>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>