On 08/26/14 13:27, Rainer Gerhards wrote:
> On Tue, Aug 26, 2014 at 12:49 PM, bodik <[email protected]> wrote:
> 
>> we have no problem with ASL2.0
>>
>> if you merge our proposal please use the latest version from
>>
>>
>> http://home.zcu.cz/~bodik/metasw/rsyslog2/metapatches/tcpsrv-peeraddr-logging1.patch
>>
>> which has just cosmetic difference ("NA" vs "N/A")
>>
>>
> do you have actual cases where this happens? I ask because this would be a
> bug that needs different addressing. The property needs to be set at that
> point of processing.

we see those log lines in production from time to time, and since we are unable
to tell which node is failing to connect, we choose to enhance logging. also we
are able to simulate it during our QA testing phase using simulated network
failures (http://home.zcu.cz/~bodik/metasw/rsyslog2/test02/test_clients.sh)



I also tried a different approach with getpeername() and getnameinfo(), but it
generaly does not work in every situation since I cann't get proper information
on failed socket [ENOTCONN]



So I choosed to use property which should be present and set at the very
begining of the connection (both tcp or gssapi)

http://git.adiscon.com/?p=rsyslog.git;a=blob;f=tcpsrv.c;h=3770a02cfda7ce8f372ce9f6040acef645f799c8;hb=HEAD#l456

and whole thing is based on actual rsyslog code

http://git.adiscon.com/?p=rsyslog.git;a=blob;f=tcpsrv.c;h=3770a02cfda7ce8f372ce9f6040acef645f799c8;hb=HEAD#l556



If there's something I'm missing we could elaborate further on, the goal is to
get the IP address on the server side in case of failing reading from socket



-----------------------------
the real world example:

Aug 26 07:59:59 127.0.0.1 xxx Aug 26 07:59:59 rsyslogd-2101: netstream session
0x7f67d8658570 will be closed due to error
Aug 26 08:00:04 127.0.0.1 xxx Aug 26 08:00:04 rsyslogd-2101: netstream session
0x7f67d83f3d20 will be closed due to error
Aug 26 08:02:58 127.0.0.1 xxx Aug 26 08:02:58 rsyslogd-2101: netstream session
0x1862e50 will be closed due to error

_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to