kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enrico Olivelli (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KAFKA-6757) Log runtime exception in case of server startup errors
Date Fri, 06 Apr 2018 08:05:00 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-6757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Enrico Olivelli updated KAFKA-6757:
-----------------------------------
    Description: 
Sometimes while running Kafka server inside tests of an upstream application it can happen
that the server cannot start due to a bad runtime error, like a missing jar on the classpath.

I would like KafkaServerStartable to log any 'Throwable' in order to catch these unpredictable
errors

 

like this
{code:java}
java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonMerge
    at com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector.<clinit>(JacksonAnnotationIntrospector.java:50)
    at com.fasterxml.jackson.databind.ObjectMapper.<clinit>(ObjectMapper.java:291)
    at kafka.utils.Json$.<init>(Json.scala:29)
    at kafka.utils.Json$.<clinit>(Json.scala)
    at kafka.utils.ZkUtils$ClusterId$.toJson(ZkUtils.scala:299)
    at kafka.utils.ZkUtils.createOrGetClusterId(ZkUtils.scala:314)
    at kafka.server.KafkaServer$$anonfun$getOrGenerateClusterId$1.apply(KafkaServer.scala:356)
    at kafka.server.KafkaServer$$anonfun$getOrGenerateClusterId$1.apply(KafkaServer.scala:356)
    at scala.Option.getOrElse(Option.scala:121)
    at kafka.server.KafkaServer.getOrGenerateClusterId(KafkaServer.scala:356)
    at kafka.server.KafkaServer.startup(KafkaServer.scala:197)
    at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
    at magnews.datastream.server.DataStreamServer.start(DataStreamServer.java:96)
    at magnews.datastream.server.RealServerSinglePartitionTest.test(RealServerSinglePartitionTest.java:85)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325){code}

  was:
Sometimes while running Kafka server inside tests of an upstream application it can happen
that the server cannot start due to a bad runtime error, like a missing jar on the classpath.

I would like KafkaServerStartable to log any 'Throwable' in order to catch this unpredictable
errors

 

like this
{code:java}

java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonMerge
    at com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector.<clinit>(JacksonAnnotationIntrospector.java:50)
    at com.fasterxml.jackson.databind.ObjectMapper.<clinit>(ObjectMapper.java:291)
    at kafka.utils.Json$.<init>(Json.scala:29)
    at kafka.utils.Json$.<clinit>(Json.scala)
    at kafka.utils.ZkUtils$ClusterId$.toJson(ZkUtils.scala:299)
    at kafka.utils.ZkUtils.createOrGetClusterId(ZkUtils.scala:314)
    at kafka.server.KafkaServer$$anonfun$getOrGenerateClusterId$1.apply(KafkaServer.scala:356)
    at kafka.server.KafkaServer$$anonfun$getOrGenerateClusterId$1.apply(KafkaServer.scala:356)
    at scala.Option.getOrElse(Option.scala:121)
    at kafka.server.KafkaServer.getOrGenerateClusterId(KafkaServer.scala:356)
    at kafka.server.KafkaServer.startup(KafkaServer.scala:197)
    at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
    at magnews.datastream.server.DataStreamServer.start(DataStreamServer.java:96)
    at magnews.datastream.server.RealServerSinglePartitionTest.test(RealServerSinglePartitionTest.java:85)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325){code}


> Log runtime exception in case of server startup errors
> ------------------------------------------------------
>
>                 Key: KAFKA-6757
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6757
>             Project: Kafka
>          Issue Type: Improvement
>          Components: log
>    Affects Versions: 1.0.1
>            Reporter: Enrico Olivelli
>            Priority: Minor
>
> Sometimes while running Kafka server inside tests of an upstream application it can happen
that the server cannot start due to a bad runtime error, like a missing jar on the classpath.
> I would like KafkaServerStartable to log any 'Throwable' in order to catch these unpredictable
errors
>  
> like this
> {code:java}
> java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonMerge
>     at com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector.<clinit>(JacksonAnnotationIntrospector.java:50)
>     at com.fasterxml.jackson.databind.ObjectMapper.<clinit>(ObjectMapper.java:291)
>     at kafka.utils.Json$.<init>(Json.scala:29)
>     at kafka.utils.Json$.<clinit>(Json.scala)
>     at kafka.utils.ZkUtils$ClusterId$.toJson(ZkUtils.scala:299)
>     at kafka.utils.ZkUtils.createOrGetClusterId(ZkUtils.scala:314)
>     at kafka.server.KafkaServer$$anonfun$getOrGenerateClusterId$1.apply(KafkaServer.scala:356)
>     at kafka.server.KafkaServer$$anonfun$getOrGenerateClusterId$1.apply(KafkaServer.scala:356)
>     at scala.Option.getOrElse(Option.scala:121)
>     at kafka.server.KafkaServer.getOrGenerateClusterId(KafkaServer.scala:356)
>     at kafka.server.KafkaServer.startup(KafkaServer.scala:197)
>     at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
>     at magnews.datastream.server.DataStreamServer.start(DataStreamServer.java:96)
>     at magnews.datastream.server.RealServerSinglePartitionTest.test(RealServerSinglePartitionTest.java:85)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>     at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>     at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>     at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message