karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4594) Log4J socket collector error handling mutiple clients
Date Thu, 23 Jun 2016 16:05:16 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15346668#comment-15346668

ASF subversion and git services commented on KARAF-4594:

Commit c73ad8a2e1d529c76e7f86ef962b4a193a2bb239 in karaf-decanter's branch refs/heads/master
from [~adrianluisgonzalez]
[ https://git-wip-us.apache.org/repos/asf?p=karaf-decanter.git;h=c73ad8a ]

[KARAF-4594] Log4JSocketCollector multiple clients

This commit fixes current SocketCollector limitation : it handled only 1 client

With the following implementation :

* you configure number of workers
* serverSocket is handled by a master thread
* client sockets are handled by the workers

I've also added some unit tests, but since I'm testing a multi-threaded module results are
unpredictable (I've set unit test timeout to 10s so it should be ok to process 1 ou 2 events
in most cases).

> Log4J socket collector error handling mutiple clients
> -----------------------------------------------------
>                 Key: KARAF-4594
>                 URL: https://issues.apache.org/jira/browse/KARAF-4594
>             Project: Karaf
>          Issue Type: Bug
>          Components: decanter
>    Affects Versions: decanter-1.1.0
>            Reporter: gonzalad
> Hello, 
> I'm using org.apache.karaf.decanter.collector.log.socketSocketCollector in my project.
> *Summary*
> Once SocketCollector accepts a client socket, it seems to loop forever on this client
socket (it won't accept another client socket - unless the previous client socket disconnects).
> Perhaps SocketCollector should handle client sockets in another thread ?
> Code : https://github.com/apache/karaf-decanter/blob/master/collector/log4j-socket/src/main/java/org/apache/karaf/decanter/collector/log/socket/SocketCollector.java#L75
> *My application setup*
> I have 2 client applications both using Log4J 1.x with the following configuration.
> {code}
> log4j.rootCategory=INFO, Socket
> log4j.appender.Socket=org.apache.log4j.net.SocketAppender
> log4j.appender.Socket.Threshold=INFO
> log4j.appender.Socket.RemoteHost=
> log4j.appender.Socket.Port=4560 
> log4j.appender.Socket.ReconnectionDelay=5000
> log4j.appender.Socket.LocationInfo=true
> {code}
> When I start the first application, everything works fine, I see decanter agent output
my application logs.
> When I start the second one, no logging happens (my app starts fine, but no logging).

This message was sent by Atlassian JIRA

View raw message