kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jun Rao <jun...@gmail.com>
Subject Re: Location of Logging Files/How To Turn On Logging For Kafka Components
Date Thu, 06 Nov 2014 23:31:38 GMT
The log4j entries before that error should tell you the cause of the error.

Thanks,

Jun

On Tue, Nov 4, 2014 at 11:25 PM, Alex Melville <amelville@g.hmc.edu> wrote:

> Background:
>
> I have searched for a while online, and through the files located in the
> kafka/logs directory, trying to find where kafka writes log output to in
> order to debug the SimpleProducer I wrote. My producer is almost identical
> to the simple producer located here
>
> https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+Producer+Example
>
> except for I'm using Protobuffers instead of Strings to publish data to a
> cluster. I'm receiving the following error when I try to run the
> SimpleProducer
>
> Exception in thread "main" kafka.common.FailedToSendMessageException:
> Failed to send messages after 3 tries.
>
> at
>
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
>
> at kafka.producer.Producer.send(Producer.scala:76)
>
> at kafka.javaapi.producer.Producer.send(Producer.scala:33)
>
> at stream.SimpleProducer.send(Unknown Source)
>
> at stream.SimpleProducer.main(Unknown Source)
>
>
> I know this isn't a network problem, because I ran the console-producer and
> successfully published data to the same broker that my Simple Producer is
> trying to publish to. I now want to try to debug this error.
>
>
>
> Question:
>
> Where would my Simple Producer write info about its startup and eventual
> error, such that I can read it and try to reason as to why it failed? If it
> produces no log data on its own, what is the best way to write this data to
> a somewhere where I can use it to debug? I've noticed that log4j, which I
> understand is a often-used library for logging in Java, came with my kafka
> download. Am I supposed to use log4j for this info? I do not know very much
> about log4j, so any info on how to get this setup would also be
> appreciated.
>
>
> -Alex
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message