You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Manoj Jaiswal <ma...@gmail.com> on 2014/11/11 20:12:49 UTC

Re:

I dont think storm provides a JMX port for debugging.
You can always run your code in Local Cluster mode or through the IDE
itself.
Activate topology debugging to dig deep .

-Manoj

On Tue, Nov 11, 2014 at 10:11 AM, Nick Katsipoulakis <ni...@gmail.com>
wrote:

> Hello,
>
> Has anyone ever managed to remote debug a topology through Eclipse IDE? My
> workstation runs on Windows and I have a small cluster of Linux Machines
> that I run my topologies on. Therefore, it would be really nice if I
> managed to debug my code remotely (even by running the topology in a
> standalone mode).
>
> Thanks,
> Nick
>

Re:

Posted by Nick Katsipoulakis <ni...@gmail.com>.
Thank you very much Milad and Manoj.

Milad, I will try your approach and let you know how it went.

Thank you again for your help.

Nick

2014-11-11 15:16 GMT-05:00 Milad Fatenejad <ic...@gmail.com>:

> Hello:
>
> I have been able to remote debug my topologies without using local
> mode (I was using intellij not eclipse). You just have to edit your
> storm.yaml file to tell storm to open up a debugging port when
> launching the worker process. The worker.childopts setting can be used
> to tell storm what JVM options to use when launching the worker. For
> example, you can modify the worker.childopts line in your storm.yaml
> to look like this:
>
> worker.childopts: "-Xmx1024m -Dcom.sun.management.jmxremote
> -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.port=1%ID%
> -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=2%ID%"
>
> This will open up a JMX port with port number "1%ID%" and a remote
> debugging port at "2%ID%". Storm will replace "%ID%" with the worker
> port number. So if supervisor.slots.ports is set to launch a worker on
> port 6700, the worker should have a remote debugging port open at
> 26700 and the JMX port open at 16700.
>
> Once this is done, you should be able to connect to the worker for
> remote debugging. Since JMX is available, you can also connect
> visualVM or some other profiler to monitor memory usage, etc...
>
> I hope this is helpful!
> Milad
>
> On Tue, Nov 11, 2014 at 1:12 PM, Manoj Jaiswal
> <ma...@gmail.com> wrote:
> > I dont think storm provides a JMX port for debugging.
> > You can always run your code in Local Cluster mode or through the IDE
> > itself.
> > Activate topology debugging to dig deep .
> >
> > -Manoj
> >
> > On Tue, Nov 11, 2014 at 10:11 AM, Nick Katsipoulakis <
> nick.katsip@gmail.com>
> > wrote:
> >>
> >> Hello,
> >>
> >> Has anyone ever managed to remote debug a topology through Eclipse IDE?
> My
> >> workstation runs on Windows and I have a small cluster of Linux Machines
> >> that I run my topologies on. Therefore, it would be really nice if I
> managed
> >> to debug my code remotely (even by running the topology in a standalone
> >> mode).
> >>
> >> Thanks,
> >> Nick
> >
> >
>



-- 
Nikolaos Romanos Katsipoulakis,
University of Pittsburgh, PhD candidate

Re:

Posted by Milad Fatenejad <ic...@gmail.com>.
Hello:

I have been able to remote debug my topologies without using local
mode (I was using intellij not eclipse). You just have to edit your
storm.yaml file to tell storm to open up a debugging port when
launching the worker process. The worker.childopts setting can be used
to tell storm what JVM options to use when launching the worker. For
example, you can modify the worker.childopts line in your storm.yaml
to look like this:

worker.childopts: "-Xmx1024m -Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=1%ID%
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=2%ID%"

This will open up a JMX port with port number "1%ID%" and a remote
debugging port at "2%ID%". Storm will replace "%ID%" with the worker
port number. So if supervisor.slots.ports is set to launch a worker on
port 6700, the worker should have a remote debugging port open at
26700 and the JMX port open at 16700.

Once this is done, you should be able to connect to the worker for
remote debugging. Since JMX is available, you can also connect
visualVM or some other profiler to monitor memory usage, etc...

I hope this is helpful!
Milad

On Tue, Nov 11, 2014 at 1:12 PM, Manoj Jaiswal
<ma...@gmail.com> wrote:
> I dont think storm provides a JMX port for debugging.
> You can always run your code in Local Cluster mode or through the IDE
> itself.
> Activate topology debugging to dig deep .
>
> -Manoj
>
> On Tue, Nov 11, 2014 at 10:11 AM, Nick Katsipoulakis <ni...@gmail.com>
> wrote:
>>
>> Hello,
>>
>> Has anyone ever managed to remote debug a topology through Eclipse IDE? My
>> workstation runs on Windows and I have a small cluster of Linux Machines
>> that I run my topologies on. Therefore, it would be really nice if I managed
>> to debug my code remotely (even by running the topology in a standalone
>> mode).
>>
>> Thanks,
>> Nick
>
>