vikrant vij created LOG4J2-2006:
-----------------------------------

             Summary: LOG4j2 Syslog appender UDP message excceds limit error 
when  over 65446 bytes
                 Key: LOG4J2-2006
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2006
             Project: Log4j 2
          Issue Type: Question
          Components: Appenders
    Affects Versions: 2.8.2
            Reporter: vikrant vij


I am using UDP in log4j2 Syslog appender, I have configured the appender 
progrmmatically, messages are being logged into console and syslog, it's 
working fine unless the message becomes larger than 65446 characters.

Is there any way in Syslog (Log4j2) for UDP to increase the limit size of 
message to be sent over network..

The following is the error it shows-:

2017-08-10 14:12:21,321 main ERROR Unable to write to stream UDP:localhost:514 
for appender Bill: 
org.apache.logging.log4j.core.appender.AppenderLoggingException: Error flushing 
stream UDP:localhost:514
2017-08-10 14:12:21,322 main ERROR An exception occurred processing Appender 
Bill org.apache.logging.log4j.core.appender.AppenderLoggingException: Error 
flushing stream UDP:localhost:514
at 
org.apache.logging.log4j.core.appender.OutputStreamManager.flushDestination(OutputStreamManager.java:272)
at 
org.apache.logging.log4j.core.appender.OutputStreamManager.write(OutputStreamManager.java:228)
at 
org.apache.logging.log4j.core.appender.OutputStreamManager.write(OutputStreamManager.java:201)
at 
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.writeByteArrayToManager(AbstractOutputStreamAppender.java:186)
at 
org.apache.logging.log4j.core.appender.SocketAppender.directEncodeEvent(SocketAppender.java:446)
at 
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:170)
at 
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:161)
at 
org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
at 
org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
at 
org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
at 
org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
at 
org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:448)
at 
org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:433)
at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:417)
at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:403)
at 
org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63)
at org.apache.logging.log4j.core.Logger.logMessage(Logger.java:146)
at 
org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2091)
at 
org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:1988)
at 
org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1960)
at org.apache.logging.log4j.spi.AbstractLogger.debug(AbstractLogger.java:311)
at Log4j2Example.main(Log4j2Example.java:81)
Caused by: java.net.SocketException: The message is larger than the maximum 
supported by the underlying transport: Datagram send failed
at java.net.DualStackPlainDatagramSocketImpl.socketSend(Native Method)
at java.net.DualStackPlainDatagramSocketImpl.send(Unknown Source)
at java.net.DatagramSocket.send(Unknown Source)
at 
org.apache.logging.log4j.core.net.DatagramOutputStream.flush(DatagramOutputStream.java:103)
at 
org.apache.logging.log4j.core.appender.OutputStreamManager.flushDestination(OutputStreamManager.java:270)
... 21 more



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to