You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "M. Manna" <ma...@gmail.com> on 2018/05/16 21:46:29 UTC

Kafka Scala debugging and diagnostics

Hello,

Is there anyone who can provide a few steps for setting up Eclipse IDE to
debug Kafka cluster ?  Has anyone got eclipse/scala IDE experience in Kafka
debugging ?

I have been trying for days, but couldn’t start the debugger to connect to
port 5005 when the Cluster is running. Everything else is set up call as
per github and cwiki docs.

Thanks in advance,

Re: Kafka Scala debugging and diagnostics

Posted by Martin Gainty <mg...@hotmail.com>.
supposedly scala ide for eclipse should work:

http://scala-ide.org/


YMMV

Martin


________________________________
From: M. Manna <ma...@gmail.com>
Sent: Wednesday, May 16, 2018 5:46 PM
To: Kafka Users
Subject: Kafka Scala debugging and diagnostics

Hello,

Is there anyone who can provide a few steps for setting up Eclipse IDE to
debug Kafka cluster ?  Has anyone got eclipse/scala IDE experience in Kafka
debugging ?

I have been trying for days, but couldn’t start the debugger to connect to
port 5005 when the Cluster is running. Everything else is set up call as
per github and cwiki docs.

Thanks in advance,

Re: Kafka Scala debugging and diagnostics

Posted by "M. Manna" <ma...@gmail.com>.
First, I setup all debug ops - but kept the suspend=n. I ran zookeeper
first.

1. I followed Cwiki steps.
2. Then I setup Scala Debugger Using debug options on Scala IDE (a generic
setup guide is available on Scala IDE site).




3. Since a specific server config is required, I added it in argument list.



4. IMPORTANT - by default, the setup doesn't work if the output folders
aren't included manually. I understand that KAFKA-4617 was raised, but it
doesn't work. So I added the User Entries for core and client to be the
following, and replaced Scala 2.12 with 2.11 as highlighted below:



5. Once everything is complete, I click "Debug" and I get the breakpoint
into main!




4. From Eclipse, I initially got an error "Could not find or load main
class kafka.Kafka".

I can step through the single node broker as expected, but the zookeeper
can also be started in the same way. Is this something you also had to do,
or was it even simpler for you.

Regards,


On 17 May 2018 at 17:17, Ted Yu <yu...@gmail.com> wrote:

> Can you share what you plan to write (on the mailing list) ?
>
> Thanks
>
> On Thu, May 17, 2018 at 9:15 AM, M. Manna <ma...@gmail.com> wrote:
>
> > I have had some success.
> >
> > Is it okay for us to update Cwiki with the setup steps which I've got ?
> or
> > too generic?
> >
> > On 16 May 2018 at 23:04, M. Manna <ma...@gmail.com> wrote:
> >
> > > Must have missed that in Kafka-run-class.bat which sets suspend=n by
> > > default. Thanks for pointing that out, giving it a try.
> > >
> > >
> > >
> > > And didn
> > >
> > > On Wed, 16 May 2018 at 22:57, Ted Yu <yu...@gmail.com> wrote:
> > >
> > >> Have you set the following two environment variables:
> > >>
> > >> export KAFKA_DEBUG=y; export DEBUG_SUSPEND_FLAG=y;
> > >>
> > >> The above would freeze the process until debugger is attached.
> > >>
> > >> Cheers
> > >>
> > >> On Wed, May 16, 2018 at 2:46 PM, M. Manna <ma...@gmail.com> wrote:
> > >>
> > >> > Hello,
> > >> >
> > >> > Is there anyone who can provide a few steps for setting up Eclipse
> IDE
> > >> to
> > >> > debug Kafka cluster ?  Has anyone got eclipse/scala IDE experience
> in
> > >> Kafka
> > >> > debugging ?
> > >> >
> > >> > I have been trying for days, but couldn’t start the debugger to
> > connect
> > >> to
> > >> > port 5005 when the Cluster is running. Everything else is set up
> call
> > as
> > >> > per github and cwiki docs.
> > >> >
> > >> > Thanks in advance,
> > >> >
> > >>
> > >
> >
>

Re: Kafka Scala debugging and diagnostics

Posted by Ted Yu <yu...@gmail.com>.
Can you share what you plan to write (on the mailing list) ?

Thanks

On Thu, May 17, 2018 at 9:15 AM, M. Manna <ma...@gmail.com> wrote:

> I have had some success.
>
> Is it okay for us to update Cwiki with the setup steps which I've got ? or
> too generic?
>
> On 16 May 2018 at 23:04, M. Manna <ma...@gmail.com> wrote:
>
> > Must have missed that in Kafka-run-class.bat which sets suspend=n by
> > default. Thanks for pointing that out, giving it a try.
> >
> >
> >
> > And didn
> >
> > On Wed, 16 May 2018 at 22:57, Ted Yu <yu...@gmail.com> wrote:
> >
> >> Have you set the following two environment variables:
> >>
> >> export KAFKA_DEBUG=y; export DEBUG_SUSPEND_FLAG=y;
> >>
> >> The above would freeze the process until debugger is attached.
> >>
> >> Cheers
> >>
> >> On Wed, May 16, 2018 at 2:46 PM, M. Manna <ma...@gmail.com> wrote:
> >>
> >> > Hello,
> >> >
> >> > Is there anyone who can provide a few steps for setting up Eclipse IDE
> >> to
> >> > debug Kafka cluster ?  Has anyone got eclipse/scala IDE experience in
> >> Kafka
> >> > debugging ?
> >> >
> >> > I have been trying for days, but couldn’t start the debugger to
> connect
> >> to
> >> > port 5005 when the Cluster is running. Everything else is set up call
> as
> >> > per github and cwiki docs.
> >> >
> >> > Thanks in advance,
> >> >
> >>
> >
>

Re: Kafka Scala debugging and diagnostics

Posted by "M. Manna" <ma...@gmail.com>.
I have had some success.

Is it okay for us to update Cwiki with the setup steps which I've got ? or
too generic?

On 16 May 2018 at 23:04, M. Manna <ma...@gmail.com> wrote:

> Must have missed that in Kafka-run-class.bat which sets suspend=n by
> default. Thanks for pointing that out, giving it a try.
>
>
>
> And didn
>
> On Wed, 16 May 2018 at 22:57, Ted Yu <yu...@gmail.com> wrote:
>
>> Have you set the following two environment variables:
>>
>> export KAFKA_DEBUG=y; export DEBUG_SUSPEND_FLAG=y;
>>
>> The above would freeze the process until debugger is attached.
>>
>> Cheers
>>
>> On Wed, May 16, 2018 at 2:46 PM, M. Manna <ma...@gmail.com> wrote:
>>
>> > Hello,
>> >
>> > Is there anyone who can provide a few steps for setting up Eclipse IDE
>> to
>> > debug Kafka cluster ?  Has anyone got eclipse/scala IDE experience in
>> Kafka
>> > debugging ?
>> >
>> > I have been trying for days, but couldn’t start the debugger to connect
>> to
>> > port 5005 when the Cluster is running. Everything else is set up call as
>> > per github and cwiki docs.
>> >
>> > Thanks in advance,
>> >
>>
>

Re: Kafka Scala debugging and diagnostics

Posted by "M. Manna" <ma...@gmail.com>.
Must have missed that in Kafka-run-class.bat which sets suspend=n by
default. Thanks for pointing that out, giving it a try.



And didn

On Wed, 16 May 2018 at 22:57, Ted Yu <yu...@gmail.com> wrote:

> Have you set the following two environment variables:
>
> export KAFKA_DEBUG=y; export DEBUG_SUSPEND_FLAG=y;
>
> The above would freeze the process until debugger is attached.
>
> Cheers
>
> On Wed, May 16, 2018 at 2:46 PM, M. Manna <ma...@gmail.com> wrote:
>
> > Hello,
> >
> > Is there anyone who can provide a few steps for setting up Eclipse IDE to
> > debug Kafka cluster ?  Has anyone got eclipse/scala IDE experience in
> Kafka
> > debugging ?
> >
> > I have been trying for days, but couldn’t start the debugger to connect
> to
> > port 5005 when the Cluster is running. Everything else is set up call as
> > per github and cwiki docs.
> >
> > Thanks in advance,
> >
>

Re: Kafka Scala debugging and diagnostics

Posted by Ted Yu <yu...@gmail.com>.
Have you set the following two environment variables:

export KAFKA_DEBUG=y; export DEBUG_SUSPEND_FLAG=y;

The above would freeze the process until debugger is attached.

Cheers

On Wed, May 16, 2018 at 2:46 PM, M. Manna <ma...@gmail.com> wrote:

> Hello,
>
> Is there anyone who can provide a few steps for setting up Eclipse IDE to
> debug Kafka cluster ?  Has anyone got eclipse/scala IDE experience in Kafka
> debugging ?
>
> I have been trying for days, but couldn’t start the debugger to connect to
> port 5005 when the Cluster is running. Everything else is set up call as
> per github and cwiki docs.
>
> Thanks in advance,
>