[jira] [Commented] (LOG4J2-2162) KafkaAppender fails application startup when bootstrap server are not available

2018-01-05 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16312962#comment-16312962
 ] 

Mikael Ståldal commented on LOG4J2-2162:


[~Shwetank] have you seen any other failure modes than DNS lookup? Can it also 
fail and block application startup when server is down (but DNS lookup is 
successful)? Have you tried to specify explicit IP address to avoid DNS lookup?

> KafkaAppender fails application startup when bootstrap server are not 
> available
> ---
>
> Key: LOG4J2-2162
> URL: https://issues.apache.org/jira/browse/LOG4J2-2162
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.8.2, 2.10.0
> Environment: Tried on Windows 10, IDE Eclipse Oxygen
>Reporter: Shwetank Sharma
>  Labels: kafka, newbie
> Attachments: log4j2.xml
>
>
> When the server mentioned in bootstrap.servers property in kafka appender are 
> not available.
> For e.g. Unable to resolve DNS etc.
> The application isn't starting and the java process terminates after trying 
> to connect to the server.
> Failure to initialize the appender should not block the application process 
> and other appenders, just like file appender, for e.g. when file path is not 
> resolvable, it moves forward.
> Attached log4j2.xml. 
> Tried wrapping it in async appender as well, does not provide expected result 
> as the issue is with initialization of appender.



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


[jira] [Commented] (LOG4J2-2162) KafkaAppender fails application startup when bootstrap server are not available

2018-01-04 Thread Gary Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16312099#comment-16312099
 ] 

Gary Gregory commented on LOG4J2-2162:
--

Roger that. I'm not there yet ;-)

> KafkaAppender fails application startup when bootstrap server are not 
> available
> ---
>
> Key: LOG4J2-2162
> URL: https://issues.apache.org/jira/browse/LOG4J2-2162
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.8.2, 2.10.0
> Environment: Tried on Windows 10, IDE Eclipse Oxygen
>Reporter: Shwetank Sharma
>  Labels: kafka, newbie
> Attachments: log4j2.xml
>
>
> When the server mentioned in bootstrap.servers property in kafka appender are 
> not available.
> For e.g. Unable to resolve DNS etc.
> The application isn't starting and the java process terminates after trying 
> to connect to the server.
> Failure to initialize the appender should not block the application process 
> and other appenders, just like file appender, for e.g. when file path is not 
> resolvable, it moves forward.
> Attached log4j2.xml. 
> Tried wrapping it in async appender as well, does not provide expected result 
> as the issue is with initialization of appender.



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


[jira] [Commented] (LOG4J2-2162) KafkaAppender fails application startup when bootstrap server are not available

2018-01-04 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16312067#comment-16312067
 ] 

Mikael Ståldal commented on LOG4J2-2162:


Reconnection, while useful, is not identical to what this ticket is about. 
Reconnection could, depending on how it is implemented, also block application 
startup until successful, and thus not fully address this ticket.

Reconnection is also useful for recovering from a broken connection after 
successful startup, which is a different use case. However, I think that the 
Kafka client library we use already does this, so maybe general reconnection 
support like for socket and JMS is redundant for KafkaAppender. We should check 
that before implementing that [~garydgregory].

> KafkaAppender fails application startup when bootstrap server are not 
> available
> ---
>
> Key: LOG4J2-2162
> URL: https://issues.apache.org/jira/browse/LOG4J2-2162
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.8.2, 2.10.0
> Environment: Tried on Windows 10, IDE Eclipse Oxygen
>Reporter: Shwetank Sharma
>  Labels: kafka, newbie
> Attachments: log4j2.xml
>
>
> When the server mentioned in bootstrap.servers property in kafka appender are 
> not available.
> For e.g. Unable to resolve DNS etc.
> The application isn't starting and the java process terminates after trying 
> to connect to the server.
> Failure to initialize the appender should not block the application process 
> and other appenders, just like file appender, for e.g. when file path is not 
> resolvable, it moves forward.
> Attached log4j2.xml. 
> Tried wrapping it in async appender as well, does not provide expected result 
> as the issue is with initialization of appender.



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


[jira] [Commented] (LOG4J2-2162) KafkaAppender fails application startup when bootstrap server are not available

2018-01-04 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16312056#comment-16312056
 ] 

Mikael Ståldal commented on LOG4J2-2162:


[~garydgregory] There is a general rule of thumb to abstract and generalize 
when you have the same use case the third time, so let's do it now.

> KafkaAppender fails application startup when bootstrap server are not 
> available
> ---
>
> Key: LOG4J2-2162
> URL: https://issues.apache.org/jira/browse/LOG4J2-2162
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.8.2, 2.10.0
> Environment: Tried on Windows 10, IDE Eclipse Oxygen
>Reporter: Shwetank Sharma
>  Labels: kafka, newbie
> Attachments: log4j2.xml
>
>
> When the server mentioned in bootstrap.servers property in kafka appender are 
> not available.
> For e.g. Unable to resolve DNS etc.
> The application isn't starting and the java process terminates after trying 
> to connect to the server.
> Failure to initialize the appender should not block the application process 
> and other appenders, just like file appender, for e.g. when file path is not 
> resolvable, it moves forward.
> Attached log4j2.xml. 
> Tried wrapping it in async appender as well, does not provide expected result 
> as the issue is with initialization of appender.



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


[jira] [Commented] (LOG4J2-2162) KafkaAppender fails application startup when bootstrap server are not available

2018-01-04 Thread Shwetank Sharma (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311717#comment-16311717
 ] 

Shwetank Sharma commented on LOG4J2-2162:
-

[~mikaelstaldal] Yes, fixing LOG4J-1043 would provide a work around. Is it in 
pipeline for any future version.

Retry with a configurable count would be a better solution.
reconnectionDelayMillis or reconnectionDelayMillis provide similar behavior.

> KafkaAppender fails application startup when bootstrap server are not 
> available
> ---
>
> Key: LOG4J2-2162
> URL: https://issues.apache.org/jira/browse/LOG4J2-2162
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.8.2, 2.10.0
> Environment: Tried on Windows 10, IDE Eclipse Oxygen
>Reporter: Shwetank Sharma
>  Labels: kafka, newbie
> Attachments: log4j2.xml
>
>
> When the server mentioned in bootstrap.servers property in kafka appender are 
> not available.
> For e.g. Unable to resolve DNS etc.
> The application isn't starting and the java process terminates after trying 
> to connect to the server.
> Failure to initialize the appender should not block the application process 
> and other appenders, just like file appender, for e.g. when file path is not 
> resolvable, it moves forward.
> Attached log4j2.xml. 
> Tried wrapping it in async appender as well, does not provide expected result 
> as the issue is with initialization of appender.



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


[jira] [Commented] (LOG4J2-2162) KafkaAppender fails application startup when bootstrap server are not available

2018-01-04 Thread Gary Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311610#comment-16311610
 ] 

Gary Gregory commented on LOG4J2-2162:
--

The Socket and JMS Managers both use a "Reconnector" class. I suppose that 
could be made more generic and reused. It's certainly what I would want for 
this Appender.

> KafkaAppender fails application startup when bootstrap server are not 
> available
> ---
>
> Key: LOG4J2-2162
> URL: https://issues.apache.org/jira/browse/LOG4J2-2162
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.8.2, 2.10.0
> Environment: Tried on Windows 10, IDE Eclipse Oxygen
>Reporter: Shwetank Sharma
>  Labels: kafka, newbie
> Attachments: log4j2.xml
>
>
> When the server mentioned in bootstrap.servers property in kafka appender are 
> not available.
> For e.g. Unable to resolve DNS etc.
> The application isn't starting and the java process terminates after trying 
> to connect to the server.
> Failure to initialize the appender should not block the application process 
> and other appenders, just like file appender, for e.g. when file path is not 
> resolvable, it moves forward.
> Attached log4j2.xml. 
> Tried wrapping it in async appender as well, does not provide expected result 
> as the issue is with initialization of appender.



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


[jira] [Commented] (LOG4J2-2162) KafkaAppender fails application startup when bootstrap server are not available

2018-01-04 Thread Ralph Goers (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311351#comment-16311351
 ] 

Ralph Goers commented on LOG4J2-2162:
-

[~mikaelstaldal] That would only partially address this. What is being 
requested here is to not block the application. But as I read things it is 
implied that initialization would be retried until it recovers.

> KafkaAppender fails application startup when bootstrap server are not 
> available
> ---
>
> Key: LOG4J2-2162
> URL: https://issues.apache.org/jira/browse/LOG4J2-2162
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.8.2, 2.10.0
> Environment: Tried on Windows 10, IDE Eclipse Oxygen
>Reporter: Shwetank Sharma
>  Labels: kafka, newbie
> Attachments: log4j2.xml
>
>
> When the server mentioned in bootstrap.servers property in kafka appender are 
> not available.
> For e.g. Unable to resolve DNS etc.
> The application isn't starting and the java process terminates after trying 
> to connect to the server.
> Failure to initialize the appender should not block the application process 
> and other appenders, just like file appender, for e.g. when file path is not 
> resolvable, it moves forward.
> Attached log4j2.xml. 
> Tried wrapping it in async appender as well, does not provide expected result 
> as the issue is with initialization of appender.



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


[jira] [Commented] (LOG4J2-2162) KafkaAppender fails application startup when bootstrap server are not available

2018-01-03 Thread Gary Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309998#comment-16309998
 ] 

Gary Gregory commented on LOG4J2-2162:
--

We need the same kind of reconnect logic the JMS Appender uses here. I am 
likely to need this soon as well...

> KafkaAppender fails application startup when bootstrap server are not 
> available
> ---
>
> Key: LOG4J2-2162
> URL: https://issues.apache.org/jira/browse/LOG4J2-2162
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.8.2, 2.10.0
> Environment: Tried on Windows 10, IDE Eclipse Oxygen
>Reporter: Shwetank Sharma
>  Labels: kafka, newbie
> Attachments: log4j2.xml
>
>
> When the server mentioned in bootstrap.servers property in kafka appender are 
> not available.
> For e.g. Unable to resolve DNS etc.
> The application isn't starting and the java process terminates after trying 
> to connect to the server.
> Failure to initialize the appender should not block the application process 
> and other appenders, just like file appender, for e.g. when file path is not 
> resolvable, it moves forward.
> Attached log4j2.xml. 
> Tried wrapping it in async appender as well, does not provide expected result 
> as the issue is with initialization of appender.



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