[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4net-dev
Subject:    [jira] Created: (LOG4NET-261) RemoteSyslogAppender doesn't work
From:       "Antonio Anzivino (JIRA)" <jira () apache ! org>
Date:       2010-07-06 21:31:49
Message-ID: 21696254.223841278451909504.JavaMail.jira () thor
[Download RAW message or body]

RemoteSyslogAppender doesn't work because of IPv6
-------------------------------------------------

                 Key: LOG4NET-261
                 URL: https://issues.apache.org/jira/browse/LOG4NET-261
             Project: Log4net
          Issue Type: Bug
          Components: Appenders
    Affects Versions: 1.2.10
         Environment: Windows Seven x86_64
Visual Studio Team System unit test
            Reporter: Antonio Anzivino


I tried to make experiments with Log4net and Syslog appender for a research open \
source project I'm working. Tried to send the log messages to a local UDP listener \
using RemoteSyslogAppender.

Logging code executed but on the debug console I got an exception:

log4net:ERROR [RemoteSyslogAppender] Unable to send logging event to remote syslog \
                fe80::8038:6515:ad7a:bdb5%15 on port 3434.
System.Net.Sockets.SocketException: Indirizzo utilizzato incompatibile con il \
protocollo richiesto [Address used is incompatible with required protocol]  in \
System.Net.Sockets.Socket.SendTo(Byte[] buffer, Int32 offset, Int32 size, SocketFlags \
socketFlags, EndPoint remoteEP)  in System.Net.Sockets.UdpClient.Send(Byte[] dgram, \
Int32 bytes, IPEndPoint endPoint)  in \
                log4net.Appender.RemoteSyslogAppender.Append(LoggingEvent \
                loggingEvent)
ALL: 2010-07-06 23:24:11,364 [Agent: adapter run thread for test 'TestMethod' with id \
'f3dfe8eb-635a-4683-8777-a029f3897071'] ERROR ALL [(null)] - Test error message

RemoteSyslogAppender is trying to send the message to an IPv6 address rather than \
127.0.0.1 Precisely, if I configure <remoteAddress> as "localhost", it tries to send \
to ::1, if I use "127.0.0.1" it tries to send to an IPv6 link-local address \
(fe80:...)

Code can be found at \
https://logbus-ng.svn.sourceforge.net/viewvc/logbus-ng/trunk/logbus-core/Log4test/?pathrev=106 \
as a Visual Studio Unit Test. It is revision 106 of \
https://logbus-ng.svn.sourceforge.net/svnroot/logbus-ng/trunk/logbus-core/Log4test/

I tried to look at RemoteSyslogAppender implementation. I couldn't find a possible \
root cause because I can see you correctly initialize the UdpClient with \
parameterless constructor (UdpAppender::InitializeConnection()). The only way I could \
send datagrams was to use a FQDN as remoteAddress for which only A record is defined \
in the DNS.

I also found that the RemoteSyslog appender doesn't respect RFC3164 by default unless \
you configure it with an appropriate pattern. I will open a new issue about it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic