Re: Run Nifi in IntelliJ to debug?

2020-10-27 Thread Darren Govoni
That did the trick! Thank you for everyones input and if i missed an obvious 
suggestion along the way my regrets.

Should be good now!

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/ghei36>


From: Bryan Bende 
Sent: Tuesday, October 27, 2020 12:30:31 PM
To: users@nifi.apache.org 
Subject: Re: Run Nifi in IntelliJ to debug?

I haven't fully read this thread, but there is already a line in
nifi's bootstrap.conf that you can uncomment:

# Enable Remote Debugging
#java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000

Change the port if desired, and then create a Remote Debug
configuration in IntelliJ for that port.

This will debug the main application, not bootstrap.

On Tue, Oct 27, 2020 at 12:08 PM Darren Govoni  wrote:
>
> Hello,
>So i was able to get intelliJ to debug nifi but only inside the bootstrap 
> process. It looks like nifi spawns a new process and that process does not 
> run the debug options.
>
> Is there a way to instruct nifi to enable debug port on its main process? 
> That will have the actual app code i need to trace.
>
> Thanks for any tips. Much appreciated!
> Darren
>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android
>
> 
> From: Mike Thomsen 
> Sent: Monday, October 26, 2020 10:15:33 PM
> To: users@nifi.apache.org 
> Subject: Re: Run Nifi in IntelliJ to debug?
>
> Are you using a binary derived from the source code in your IDE? Like
> a 1.12.1 binary and the source code from the release?
>
> On Mon, Oct 26, 2020 at 7:47 PM Russell Bateman  wrote:
> >
> > Hmmm... It's rare that I debug NiFi code. And it's also rare that I debug 
> > my own in that context since the NiFi test runner allows me to fend off 
> > most surprises via my JUnit tests.
> >
> > I think back in 2016, I was debugging a start-up problem involving NiFi 
> > start-up and incompatibility with the Java Flight Recorder. As I recall, I 
> > downloaded the relevant NiFi code sources matching the version of NiFi I 
> > was debugging remotely. I remember ultimately making a slight (and only 
> > temporary) change to NiFi start-up that fixed the problem. At that point I 
> > must have been building my own copy to have seen it fixed.. It had to do 
> > with the order in which NiFi was getting command-line arguments making it 
> > so the JFR wasn't running. I'd have to dig back to figure out what I was 
> > doing, but it's probably not too relevant to what you need to do.
> >
> > What do you need to see in this?
> >
> > Russ
> >
> > On 10/26/20 5:38 PM, Darren Govoni wrote:
> >
> > Correct. Primarily the nifi-web-api module and AccessResource class. For 
> > starters.
> >
> > Sent from my Verizon, Samsung Galaxy smartphone
> > Get Outlook for Android
> >
> > 
> > From: Russell Bateman 
> > Sent: Monday, October 26, 2020 7:37:13 PM
> > To: Darren Govoni ; users@nifi.apache.org 
> > 
> > Subject: Re: Run Nifi in IntelliJ to debug?
> >
> > Darren,
> >
> > This is just Apache NiFi code out of NARs you want to step through or is it 
> > yours? You haven't stripped debug information or anything, right?
> >
> > Russ
> >
> > On 10/26/20 5:30 PM, Darren Govoni wrote:
> >
> > Kevin/Russel
> >
> > Thanks for the info. I did set things up this way.
> >
> > IntelliJ does connect to the nifi jvm and nifi runs and works but intellij 
> > isnt breaking on code it should.
> >
> > I did set the module where the code/classes are located (in the remote 
> > connection dialog) and i see the exception im tracking print on the console 
> > output but intellij never breaks.
> >
> > Is there an extra step needed? Generate sources?
> >
> > For future it would be nice if there was a maven goal for debug.
> >
> > Much appreciated!
> > Darren
> >
> > Sent from my Verizon, Samsung Galaxy smartphone
> > Get Outlook for Android
> > 
> > From: Russell Bateman 
> > Sent: Monday, October 26, 2020 4:09:50 PM
> > To: users@nifi.apache.org ; Darren Govoni 
> > 
> > Subject: Re: Run Nifi in IntelliJ to debug?
> >
> > Darren,
> >
> > I was out this morning and didn't see your plea until I got in just now. 
> > Here's a step by step I wrote up for both IntelliJ IDEA and Eclipse (I'm 
> > more an IntelliJ guy). It also covers using an IP tunnel.
> >
> > https://www.javahotchocolate.com/notes/nifi.html#20160323
> >
> > On 10/26/20 9:52 AM, Darren Govoni wrote:
> >
> > Hi
> >Is it possible to run Nifi from inside IntelliJ with debugging such that 
> > I can hit the app from my browser and trigger breakpoints?
> >
> > If anyone has done this can you please share any info?
> >
> > Thanks in advance!
> > Darren
> >
> > Sent from my Verizon, Samsung Galaxy smartphone
> > Get Outlook for Android
> >
> >
> >
> >


Re: Run Nifi in IntelliJ to debug?

2020-10-27 Thread Bryan Bende
I haven't fully read this thread, but there is already a line in
nifi's bootstrap.conf that you can uncomment:

# Enable Remote Debugging
#java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000

Change the port if desired, and then create a Remote Debug
configuration in IntelliJ for that port.

This will debug the main application, not bootstrap.

On Tue, Oct 27, 2020 at 12:08 PM Darren Govoni  wrote:
>
> Hello,
>So i was able to get intelliJ to debug nifi but only inside the bootstrap 
> process. It looks like nifi spawns a new process and that process does not 
> run the debug options.
>
> Is there a way to instruct nifi to enable debug port on its main process? 
> That will have the actual app code i need to trace.
>
> Thanks for any tips. Much appreciated!
> Darren
>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android
>
> 
> From: Mike Thomsen 
> Sent: Monday, October 26, 2020 10:15:33 PM
> To: users@nifi.apache.org 
> Subject: Re: Run Nifi in IntelliJ to debug?
>
> Are you using a binary derived from the source code in your IDE? Like
> a 1.12.1 binary and the source code from the release?
>
> On Mon, Oct 26, 2020 at 7:47 PM Russell Bateman  wrote:
> >
> > Hmmm... It's rare that I debug NiFi code. And it's also rare that I debug 
> > my own in that context since the NiFi test runner allows me to fend off 
> > most surprises via my JUnit tests.
> >
> > I think back in 2016, I was debugging a start-up problem involving NiFi 
> > start-up and incompatibility with the Java Flight Recorder. As I recall, I 
> > downloaded the relevant NiFi code sources matching the version of NiFi I 
> > was debugging remotely. I remember ultimately making a slight (and only 
> > temporary) change to NiFi start-up that fixed the problem. At that point I 
> > must have been building my own copy to have seen it fixed.. It had to do 
> > with the order in which NiFi was getting command-line arguments making it 
> > so the JFR wasn't running. I'd have to dig back to figure out what I was 
> > doing, but it's probably not too relevant to what you need to do.
> >
> > What do you need to see in this?
> >
> > Russ
> >
> > On 10/26/20 5:38 PM, Darren Govoni wrote:
> >
> > Correct. Primarily the nifi-web-api module and AccessResource class. For 
> > starters.
> >
> > Sent from my Verizon, Samsung Galaxy smartphone
> > Get Outlook for Android
> >
> > 
> > From: Russell Bateman 
> > Sent: Monday, October 26, 2020 7:37:13 PM
> > To: Darren Govoni ; users@nifi.apache.org 
> > 
> > Subject: Re: Run Nifi in IntelliJ to debug?
> >
> > Darren,
> >
> > This is just Apache NiFi code out of NARs you want to step through or is it 
> > yours? You haven't stripped debug information or anything, right?
> >
> > Russ
> >
> > On 10/26/20 5:30 PM, Darren Govoni wrote:
> >
> > Kevin/Russel
> >
> > Thanks for the info. I did set things up this way.
> >
> > IntelliJ does connect to the nifi jvm and nifi runs and works but intellij 
> > isnt breaking on code it should.
> >
> > I did set the module where the code/classes are located (in the remote 
> > connection dialog) and i see the exception im tracking print on the console 
> > output but intellij never breaks.
> >
> > Is there an extra step needed? Generate sources?
> >
> > For future it would be nice if there was a maven goal for debug.
> >
> > Much appreciated!
> > Darren
> >
> > Sent from my Verizon, Samsung Galaxy smartphone
> > Get Outlook for Android
> > 
> > From: Russell Bateman 
> > Sent: Monday, October 26, 2020 4:09:50 PM
> > To: users@nifi.apache.org ; Darren Govoni 
> > 
> > Subject: Re: Run Nifi in IntelliJ to debug?
> >
> > Darren,
> >
> > I was out this morning and didn't see your plea until I got in just now. 
> > Here's a step by step I wrote up for both IntelliJ IDEA and Eclipse (I'm 
> > more an IntelliJ guy). It also covers using an IP tunnel.
> >
> > https://www.javahotchocolate.com/notes/nifi.html#20160323
> >
> > On 10/26/20 9:52 AM, Darren Govoni wrote:
> >
> > Hi
> >Is it possible to run Nifi from inside IntelliJ with debugging such that 
> > I can hit the app from my browser and trigger breakpoints?
> >
> > If anyone has done this can you please share any info?
> >
> > Thanks in advance!
> > Darren
> >
> > Sent from my Verizon, Samsung Galaxy smartphone
> > Get Outlook for Android
> >
> >
> >
> >


Re: Run Nifi in IntelliJ to debug?

2020-10-27 Thread Andy LoPresto
Did you follow Kevin’s guide below? If you put a breakpoint inside any of the 
code other than the bootstrap, the IDE should pause there. Many of the NiFi 
developers perform this process daily. 

If you are still having trouble, please share your bootstrap.conf file and the 
locations of the breakpoints within your code. 

Andy LoPresto
alopre...@apache.org
alopresto.apa...@gmail.com
He/Him
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Oct 27, 2020, at 9:08 AM, Darren Govoni  wrote:
> 
> Hello,
>So i was able to get intelliJ to debug nifi but only inside the bootstrap 
> process. It looks like nifi spawns a new process and that process does not 
> run the debug options. 
> 
> Is there a way to instruct nifi to enable debug port on its main process? 
> That will have the actual app code i need to trace.
> 
> Thanks for any tips. Much appreciated!
> Darren
> 
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android <https://aka.ms/ghei36>
> From: Mike Thomsen 
> Sent: Monday, October 26, 2020 10:15:33 PM
> To: users@nifi.apache.org 
> Subject: Re: Run Nifi in IntelliJ to debug?
>  
> Are you using a binary derived from the source code in your IDE? Like
> a 1.12.1 binary and the source code from the release?
> 
> On Mon, Oct 26, 2020 at 7:47 PM Russell Bateman  wrote:
> >
> > Hmmm... It's rare that I debug NiFi code. And it's also rare that I debug 
> > my own in that context since the NiFi test runner allows me to fend off 
> > most surprises via my JUnit tests.
> >
> > I think back in 2016, I was debugging a start-up problem involving NiFi 
> > start-up and incompatibility with the Java Flight Recorder. As I recall, I 
> > downloaded the relevant NiFi code sources matching the version of NiFi I 
> > was debugging remotely. I remember ultimately making a slight (and only 
> > temporary) change to NiFi start-up that fixed the problem. At that point I 
> > must have been building my own copy to have seen it fixed.. It had to do 
> > with the order in which NiFi was getting command-line arguments making it 
> > so the JFR wasn't running. I'd have to dig back to figure out what I was 
> > doing, but it's probably not too relevant to what you need to do.
> >
> > What do you need to see in this?
> >
> > Russ
> >
> > On 10/26/20 5:38 PM, Darren Govoni wrote:
> >
> > Correct. Primarily the nifi-web-api module and AccessResource class. For 
> > starters.
> >
> > Sent from my Verizon, Samsung Galaxy smartphone
> > Get Outlook for Android
> >
> > 
> > From: Russell Bateman 
> > Sent: Monday, October 26, 2020 7:37:13 PM
> > To: Darren Govoni ; users@nifi.apache.org 
> > 
> > Subject: Re: Run Nifi in IntelliJ to debug?
> >
> > Darren,
> >
> > This is just Apache NiFi code out of NARs you want to step through or is it 
> > yours? You haven't stripped debug information or anything, right?
> >
> > Russ
> >
> > On 10/26/20 5:30 PM, Darren Govoni wrote:
> >
> > Kevin/Russel
> >
> > Thanks for the info. I did set things up this way.
> >
> > IntelliJ does connect to the nifi jvm and nifi runs and works but intellij 
> > isnt breaking on code it should.
> >
> > I did set the module where the code/classes are located (in the remote 
> > connection dialog) and i see the exception im tracking print on the console 
> > output but intellij never breaks.
> >
> > Is there an extra step needed? Generate sources?
> >
> > For future it would be nice if there was a maven goal for debug.
> >
> > Much appreciated!
> > Darren
> >
> > Sent from my Verizon, Samsung Galaxy smartphone
> > Get Outlook for Android
> > 
> > From: Russell Bateman 
> > Sent: Monday, October 26, 2020 4:09:50 PM
> > To: users@nifi.apache.org ; Darren Govoni 
> > 
> > Subject: Re: Run Nifi in IntelliJ to debug?
> >
> > Darren,
> >
> > I was out this morning and didn't see your plea until I got in just now. 
> > Here's a step by step I wrote up for both IntelliJ IDEA and Eclipse (I'm 
> > more an IntelliJ guy). It also covers using an IP tunnel.
> >
> > https://www.javahotchocolate.com/notes/nifi.html#20160323 
> > <https://www.javahotchocolate.com/notes/nifi.html#20160323>
> >
> > On 10/26/20 9:52 AM, Darren Govoni wrote:
> >
> > Hi
> >Is it possible to run Nifi from inside IntelliJ with debugging such that 
> > I can hit the app from my browser and trigger breakpoints?
> >
> > If anyone has done this can you please share any info?
> >
> > Thanks in advance!
> > Darren
> >
> > Sent from my Verizon, Samsung Galaxy smartphone
> > Get Outlook for Android
> >
> >
> >
> >



Re: Run Nifi in IntelliJ to debug?

2020-10-27 Thread Darren Govoni
Hello,
   So i was able to get intelliJ to debug nifi but only inside the bootstrap 
process. It looks like nifi spawns a new process and that process does not run 
the debug options.

Is there a way to instruct nifi to enable debug port on its main process? That 
will have the actual app code i need to trace.

Thanks for any tips. Much appreciated!
Darren

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/ghei36>


From: Mike Thomsen 
Sent: Monday, October 26, 2020 10:15:33 PM
To: users@nifi.apache.org 
Subject: Re: Run Nifi in IntelliJ to debug?

Are you using a binary derived from the source code in your IDE? Like
a 1.12.1 binary and the source code from the release?

On Mon, Oct 26, 2020 at 7:47 PM Russell Bateman  wrote:
>
> Hmmm... It's rare that I debug NiFi code. And it's also rare that I debug my 
> own in that context since the NiFi test runner allows me to fend off most 
> surprises via my JUnit tests.
>
> I think back in 2016, I was debugging a start-up problem involving NiFi 
> start-up and incompatibility with the Java Flight Recorder. As I recall, I 
> downloaded the relevant NiFi code sources matching the version of NiFi I was 
> debugging remotely. I remember ultimately making a slight (and only 
> temporary) change to NiFi start-up that fixed the problem. At that point I 
> must have been building my own copy to have seen it fixed.. It had to do with 
> the order in which NiFi was getting command-line arguments making it so the 
> JFR wasn't running. I'd have to dig back to figure out what I was doing, but 
> it's probably not too relevant to what you need to do.
>
> What do you need to see in this?
>
> Russ
>
> On 10/26/20 5:38 PM, Darren Govoni wrote:
>
> Correct. Primarily the nifi-web-api module and AccessResource class. For 
> starters.
>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android
>
> 
> From: Russell Bateman 
> Sent: Monday, October 26, 2020 7:37:13 PM
> To: Darren Govoni ; users@nifi.apache.org 
> 
> Subject: Re: Run Nifi in IntelliJ to debug?
>
> Darren,
>
> This is just Apache NiFi code out of NARs you want to step through or is it 
> yours? You haven't stripped debug information or anything, right?
>
> Russ
>
> On 10/26/20 5:30 PM, Darren Govoni wrote:
>
> Kevin/Russel
>
> Thanks for the info. I did set things up this way.
>
> IntelliJ does connect to the nifi jvm and nifi runs and works but intellij 
> isnt breaking on code it should.
>
> I did set the module where the code/classes are located (in the remote 
> connection dialog) and i see the exception im tracking print on the console 
> output but intellij never breaks.
>
> Is there an extra step needed? Generate sources?
>
> For future it would be nice if there was a maven goal for debug.
>
> Much appreciated!
> Darren
>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android
> 
> From: Russell Bateman 
> Sent: Monday, October 26, 2020 4:09:50 PM
> To: users@nifi.apache.org ; Darren Govoni 
> 
> Subject: Re: Run Nifi in IntelliJ to debug?
>
> Darren,
>
> I was out this morning and didn't see your plea until I got in just now. 
> Here's a step by step I wrote up for both IntelliJ IDEA and Eclipse (I'm more 
> an IntelliJ guy). It also covers using an IP tunnel.
>
> https://www.javahotchocolate.com/notes/nifi.html#20160323
>
> On 10/26/20 9:52 AM, Darren Govoni wrote:
>
> Hi
>Is it possible to run Nifi from inside IntelliJ with debugging such that I 
> can hit the app from my browser and trigger breakpoints?
>
> If anyone has done this can you please share any info?
>
> Thanks in advance!
> Darren
>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android
>
>
>
>


Re: Run Nifi in IntelliJ to debug?

2020-10-26 Thread Mike Thomsen
Are you using a binary derived from the source code in your IDE? Like
a 1.12.1 binary and the source code from the release?

On Mon, Oct 26, 2020 at 7:47 PM Russell Bateman  wrote:
>
> Hmmm... It's rare that I debug NiFi code. And it's also rare that I debug my 
> own in that context since the NiFi test runner allows me to fend off most 
> surprises via my JUnit tests.
>
> I think back in 2016, I was debugging a start-up problem involving NiFi 
> start-up and incompatibility with the Java Flight Recorder. As I recall, I 
> downloaded the relevant NiFi code sources matching the version of NiFi I was 
> debugging remotely. I remember ultimately making a slight (and only 
> temporary) change to NiFi start-up that fixed the problem. At that point I 
> must have been building my own copy to have seen it fixed.. It had to do with 
> the order in which NiFi was getting command-line arguments making it so the 
> JFR wasn't running. I'd have to dig back to figure out what I was doing, but 
> it's probably not too relevant to what you need to do.
>
> What do you need to see in this?
>
> Russ
>
> On 10/26/20 5:38 PM, Darren Govoni wrote:
>
> Correct. Primarily the nifi-web-api module and AccessResource class. For 
> starters.
>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android
>
> 
> From: Russell Bateman 
> Sent: Monday, October 26, 2020 7:37:13 PM
> To: Darren Govoni ; users@nifi.apache.org 
> 
> Subject: Re: Run Nifi in IntelliJ to debug?
>
> Darren,
>
> This is just Apache NiFi code out of NARs you want to step through or is it 
> yours? You haven't stripped debug information or anything, right?
>
> Russ
>
> On 10/26/20 5:30 PM, Darren Govoni wrote:
>
> Kevin/Russel
>
> Thanks for the info. I did set things up this way.
>
> IntelliJ does connect to the nifi jvm and nifi runs and works but intellij 
> isnt breaking on code it should.
>
> I did set the module where the code/classes are located (in the remote 
> connection dialog) and i see the exception im tracking print on the console 
> output but intellij never breaks.
>
> Is there an extra step needed? Generate sources?
>
> For future it would be nice if there was a maven goal for debug.
>
> Much appreciated!
> Darren
>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android
> 
> From: Russell Bateman 
> Sent: Monday, October 26, 2020 4:09:50 PM
> To: users@nifi.apache.org ; Darren Govoni 
> 
> Subject: Re: Run Nifi in IntelliJ to debug?
>
> Darren,
>
> I was out this morning and didn't see your plea until I got in just now. 
> Here's a step by step I wrote up for both IntelliJ IDEA and Eclipse (I'm more 
> an IntelliJ guy). It also covers using an IP tunnel.
>
> https://www.javahotchocolate.com/notes/nifi.html#20160323
>
> On 10/26/20 9:52 AM, Darren Govoni wrote:
>
> Hi
>Is it possible to run Nifi from inside IntelliJ with debugging such that I 
> can hit the app from my browser and trigger breakpoints?
>
> If anyone has done this can you please share any info?
>
> Thanks in advance!
> Darren
>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android
>
>
>
>


Re: Run Nifi in IntelliJ to debug?

2020-10-26 Thread Russell Bateman
Hmmm... It's rare that I debug NiFi code. And it's also rare that I 
debug my own in that context since the NiFi test runner allows me to 
fend off most surprises via my JUnit tests.


I think back in 2016, I was debugging a start-up problem involving NiFi 
start-up and incompatibility with the Java Flight Recorder. As I recall, 
I downloaded the relevant NiFi code sources matching the version of NiFi 
I was debugging remotely. I remember ultimately making a slight (and 
only temporary) change to NiFi start-up that fixed the problem. At that 
point I must have been building my own copy to have seen it fixed.. It 
had to do with the order in which NiFi was getting command-line 
arguments making it so the JFR wasn't running. I'd have to dig back to 
figure out what I was doing, but it's probably not too relevant to what 
you need to do.


What do you need to see in this?

Russ

On 10/26/20 5:38 PM, Darren Govoni wrote:
Correct. Primarily the nifi-web-api module and AccessResource class. 
For starters.


Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android <https://aka.ms/ghei36>


*From:* Russell Bateman 
*Sent:* Monday, October 26, 2020 7:37:13 PM
*To:* Darren Govoni ; users@nifi.apache.org 


*Subject:* Re: Run Nifi in IntelliJ to debug?
Darren,

This is just Apache NiFi code out of NARs you want to step through or 
is it yours? You haven't stripped debug information or anything, right?


Russ

On 10/26/20 5:30 PM, Darren Govoni wrote:

Kevin/Russel

Thanks for the info. I did set things up this way.

IntelliJ does connect to the nifi jvm and nifi runs and works but 
intellij isnt breaking on code it should.


I did set the module where the code/classes are located (in the 
remote connection dialog) and i see the exception im tracking print 
on the console output but intellij never breaks.


Is there an extra step needed? Generate sources?

For future it would be nice if there was a maven goal for debug.

Much appreciated!
Darren

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android <https://aka.ms/ghei36>

*From:* Russell Bateman  
<mailto:r...@windofkeltia.com>

*Sent:* Monday, October 26, 2020 4:09:50 PM
*To:* users@nifi.apache.org <mailto:users@nifi.apache.org> 
 <mailto:users@nifi.apache.org>; Darren Govoni 
 <mailto:dar...@ontrenet.com>

*Subject:* Re: Run Nifi in IntelliJ to debug?
Darren,

I was out this morning and didn't see your plea until I got in just 
now. Here's a step by step I wrote up for both IntelliJ IDEA and 
Eclipse (I'm more an IntelliJ guy). It also covers using an IP tunnel.


https://www.javahotchocolate.com/notes/nifi.html#20160323

On 10/26/20 9:52 AM, Darren Govoni wrote:

Hi
   Is it possible to run Nifi from inside IntelliJ with debugging 
such that I can hit the app from my browser and trigger breakpoints?


If anyone has done this can you please share any info?

Thanks in advance!
Darren

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android <https://aka.ms/ghei36>








Re: Run Nifi in IntelliJ to debug?

2020-10-26 Thread Darren Govoni
Correct. Primarily the nifi-web-api module and AccessResource class. For 
starters.

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/ghei36>


From: Russell Bateman 
Sent: Monday, October 26, 2020 7:37:13 PM
To: Darren Govoni ; users@nifi.apache.org 

Subject: Re: Run Nifi in IntelliJ to debug?

Darren,

This is just Apache NiFi code out of NARs you want to step through or is it 
yours? You haven't stripped debug information or anything, right?

Russ

On 10/26/20 5:30 PM, Darren Govoni wrote:
Kevin/Russel

Thanks for the info. I did set things up this way.

IntelliJ does connect to the nifi jvm and nifi runs and works but intellij isnt 
breaking on code it should.

I did set the module where the code/classes are located (in the remote 
connection dialog) and i see the exception im tracking print on the console 
output but intellij never breaks.

Is there an extra step needed? Generate sources?

For future it would be nice if there was a maven goal for debug.

Much appreciated!
Darren

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/ghei36>

From: Russell Bateman <mailto:r...@windofkeltia.com>
Sent: Monday, October 26, 2020 4:09:50 PM
To: users@nifi.apache.org<mailto:users@nifi.apache.org> 
<mailto:users@nifi.apache.org>; Darren Govoni 
<mailto:dar...@ontrenet.com>
Subject: Re: Run Nifi in IntelliJ to debug?

Darren,

I was out this morning and didn't see your plea until I got in just now. Here's 
a step by step I wrote up for both IntelliJ IDEA and Eclipse (I'm more an 
IntelliJ guy). It also covers using an IP tunnel.

https://www.javahotchocolate.com/notes/nifi.html#20160323

On 10/26/20 9:52 AM, Darren Govoni wrote:
Hi
   Is it possible to run Nifi from inside IntelliJ with debugging such that I 
can hit the app from my browser and trigger breakpoints?

If anyone has done this can you please share any info?

Thanks in advance!
Darren

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/ghei36>




Re: Run Nifi in IntelliJ to debug?

2020-10-26 Thread Russell Bateman

Darren,

This is just Apache NiFi code out of NARs you want to step through or is 
it yours? You haven't stripped debug information or anything, right?


Russ

On 10/26/20 5:30 PM, Darren Govoni wrote:

Kevin/Russel

Thanks for the info. I did set things up this way.

IntelliJ does connect to the nifi jvm and nifi runs and works but 
intellij isnt breaking on code it should.


I did set the module where the code/classes are located (in the remote 
connection dialog) and i see the exception im tracking print on the 
console output but intellij never breaks.


Is there an extra step needed? Generate sources?

For future it would be nice if there was a maven goal for debug.

Much appreciated!
Darren

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android <https://aka.ms/ghei36>

*From:* Russell Bateman 
*Sent:* Monday, October 26, 2020 4:09:50 PM
*To:* users@nifi.apache.org ; Darren Govoni 


*Subject:* Re: Run Nifi in IntelliJ to debug?
Darren,

I was out this morning and didn't see your plea until I got in just 
now. Here's a step by step I wrote up for both IntelliJ IDEA and 
Eclipse (I'm more an IntelliJ guy). It also covers using an IP tunnel.


https://www.javahotchocolate.com/notes/nifi.html#20160323

On 10/26/20 9:52 AM, Darren Govoni wrote:

Hi
   Is it possible to run Nifi from inside IntelliJ with debugging 
such that I can hit the app from my browser and trigger breakpoints?


If anyone has done this can you please share any info?

Thanks in advance!
Darren

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android <https://aka.ms/ghei36>






Re: Run Nifi in IntelliJ to debug?

2020-10-26 Thread Darren Govoni
Kevin/Russel

Thanks for the info. I did set things up this way.

IntelliJ does connect to the nifi jvm and nifi runs and works but intellij isnt 
breaking on code it should.

I did set the module where the code/classes are located (in the remote 
connection dialog) and i see the exception im tracking print on the console 
output but intellij never breaks.

Is there an extra step needed? Generate sources?

For future it would be nice if there was a maven goal for debug.

Much appreciated!
Darren

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/ghei36>

From: Russell Bateman 
Sent: Monday, October 26, 2020 4:09:50 PM
To: users@nifi.apache.org ; Darren Govoni 

Subject: Re: Run Nifi in IntelliJ to debug?

Darren,

I was out this morning and didn't see your plea until I got in just now. Here's 
a step by step I wrote up for both IntelliJ IDEA and Eclipse (I'm more an 
IntelliJ guy). It also covers using an IP tunnel.

https://www.javahotchocolate.com/notes/nifi.html#20160323

On 10/26/20 9:52 AM, Darren Govoni wrote:
Hi
   Is it possible to run Nifi from inside IntelliJ with debugging such that I 
can hit the app from my browser and trigger breakpoints?

If anyone has done this can you please share any info?

Thanks in advance!
Darren

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/ghei36>



Re: Run Nifi in IntelliJ to debug?

2020-10-26 Thread Mike Thomsen
If you want to use the Docker image, add "-e NIFI_JVM_DEBUGGER=1" and
map port 8000 to something on your machine.

On Mon, Oct 26, 2020 at 4:10 PM Russell Bateman  wrote:
>
> Darren,
>
> I was out this morning and didn't see your plea until I got in just now. 
> Here's a step by step I wrote up for both IntelliJ IDEA and Eclipse (I'm more 
> an IntelliJ guy). It also covers using an IP tunnel.
>
> https://www.javahotchocolate.com/notes/nifi.html#20160323
>
> On 10/26/20 9:52 AM, Darren Govoni wrote:
>
> Hi
>Is it possible to run Nifi from inside IntelliJ with debugging such that I 
> can hit the app from my browser and trigger breakpoints?
>
> If anyone has done this can you please share any info?
>
> Thanks in advance!
> Darren
>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android
>
>


Re: Run Nifi in IntelliJ to debug?

2020-10-26 Thread Russell Bateman

Darren,

I was out this morning and didn't see your plea until I got in just now. 
Here's a step by step I wrote up for both IntelliJ IDEA and Eclipse (I'm 
more an IntelliJ guy). It also covers using an IP tunnel.


https://www.javahotchocolate.com/notes/nifi.html#20160323

On 10/26/20 9:52 AM, Darren Govoni wrote:

Hi
   Is it possible to run Nifi from inside IntelliJ with debugging such 
that I can hit the app from my browser and trigger breakpoints?


If anyone has done this can you please share any info?

Thanks in advance!
Darren

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android 




Re: Run Nifi in IntelliJ to debug?

2020-10-26 Thread Javi Roman
Hi!

Here instructions for running MiNiFi (debugging) within IntelliJ IDEA,
practically the same steps for NiFi.

shorturl.at/bkloI

--
Javi Roman

Twitter: @javiromanrh
GitHub: github.com/javiroman
Linkedin: es.linkedin.com/in/javiroman
Big Data Blog: dataintensive.info


On Mon, Oct 26, 2020 at 6:08 PM Kevin Doran  wrote:

> Hi, Darren -
>
> I am not aware of a method of running a full NiFi instance directly in
> IntelliJ, but I use the method Matt mentioned: attaching IntelliJ as a
> remote debugger to a running NiFi instance.
>
> I put together a guide a few years back for folks unfamiliar with this
> process or new to IntelliJ:
>
> https://community.cloudera.com/t5/Community-Articles/NiFi-Debugging-Tutorial/ta-p/246082
>
> The screenshots are for an older IntelliJ, but the same basic steps should
> still work.
>
> Hope this helps!
> Kevin
>
> On Oct 26, 2020, at 12:12, Darren Govoni  wrote:
>
> Thanks Matt. I think if i can attach remotely and step through the code
> that will satisfy my needs. Let me give it a try.
>
> I also found how to run mvnDebug and attach to that from intellij. Just
> need to find a maven goal that runs nifi but i havent seen one yet.
>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android <https://aka.ms/ghei36>
>
> --
> *From:* Matt Burgess 
> *Sent:* Monday, October 26, 2020 12:05:03 PM
> *To:* users@nifi.apache.org 
> *Subject:* Re: Run Nifi in IntelliJ to debug?
>
> Sorry I misread the part where you wanted to run NiFi inside IntelliJ,
> I was talking about running it externally (from the command-line,
> e.g.) and connecting the IntelliJ debugger. I haven't run NiFi itself
> using IntelliJ, maybe someone else can chime in for that.
>
> On Mon, Oct 26, 2020 at 12:03 PM Matt Burgess 
> wrote:
> >
> > Yes, that's a pretty common operation amongst NiFi developers. In
> > conf/bootstrap.conf there's a section called Enable Remote Debugging
> > and a commented-out line something like:
> >
> >
> java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
> >
> > You can remove the comment from that line and set things like the
> > address to the desired port, whether to suspend the JVM until a
> > debugger connects, etc. Then in IntelliJ you can create a new
> > configuration of type Remote, point it at the port you set in the
> > above line, and connect the debugger. It will then stop at breakpoints
> > and you can do all the debugging stuff like add Watches, execute
> > expressions (to change values at runtime), etc.
> >
> > Regards,
> > Matt
> >
> > On Mon, Oct 26, 2020 at 11:52 AM Darren Govoni 
> wrote:
> > >
> > > Hi
> > >Is it possible to run Nifi from inside IntelliJ with debugging such
> that I can hit the app from my browser and trigger breakpoints?
> > >
> > > If anyone has done this can you please share any info?
> > >
> > > Thanks in advance!
> > > Darren
> > >
> > > Sent from my Verizon, Samsung Galaxy smartphone
> > > Get Outlook for Android
>
>
>


Re: Run Nifi in IntelliJ to debug?

2020-10-26 Thread Kevin Doran
Hi, Darren -

I am not aware of a method of running a full NiFi instance directly in 
IntelliJ, but I use the method Matt mentioned: attaching IntelliJ as a remote 
debugger to a running NiFi instance.

I put together a guide a few years back for folks unfamiliar with this process 
or new to IntelliJ:
https://community.cloudera.com/t5/Community-Articles/NiFi-Debugging-Tutorial/ta-p/246082
 
<https://community.cloudera.com/t5/Community-Articles/NiFi-Debugging-Tutorial/ta-p/246082>

The screenshots are for an older IntelliJ, but the same basic steps should 
still work. 

Hope this helps!
Kevin

> On Oct 26, 2020, at 12:12, Darren Govoni  wrote:
> 
> Thanks Matt. I think if i can attach remotely and step through the code that 
> will satisfy my needs. Let me give it a try.
> 
> I also found how to run mvnDebug and attach to that from intellij. Just need 
> to find a maven goal that runs nifi but i havent seen one yet.
> 
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android <https://aka.ms/ghei36>
> From: Matt Burgess 
> Sent: Monday, October 26, 2020 12:05:03 PM
> To: users@nifi.apache.org 
> Subject: Re: Run Nifi in IntelliJ to debug?
>  
> Sorry I misread the part where you wanted to run NiFi inside IntelliJ,
> I was talking about running it externally (from the command-line,
> e.g.) and connecting the IntelliJ debugger. I haven't run NiFi itself
> using IntelliJ, maybe someone else can chime in for that.
> 
> On Mon, Oct 26, 2020 at 12:03 PM Matt Burgess  wrote:
> >
> > Yes, that's a pretty common operation amongst NiFi developers. In
> > conf/bootstrap.conf there's a section called Enable Remote Debugging
> > and a commented-out line something like:
> >
> > java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
> >
> > You can remove the comment from that line and set things like the
> > address to the desired port, whether to suspend the JVM until a
> > debugger connects, etc. Then in IntelliJ you can create a new
> > configuration of type Remote, point it at the port you set in the
> > above line, and connect the debugger. It will then stop at breakpoints
> > and you can do all the debugging stuff like add Watches, execute
> > expressions (to change values at runtime), etc.
> >
> > Regards,
> > Matt
> >
> > On Mon, Oct 26, 2020 at 11:52 AM Darren Govoni  wrote:
> > >
> > > Hi
> > >Is it possible to run Nifi from inside IntelliJ with debugging such 
> > > that I can hit the app from my browser and trigger breakpoints?
> > >
> > > If anyone has done this can you please share any info?
> > >
> > > Thanks in advance!
> > > Darren
> > >
> > > Sent from my Verizon, Samsung Galaxy smartphone
> > > Get Outlook for Android



Re: Run Nifi in IntelliJ to debug?

2020-10-26 Thread Darren Govoni
Thanks Matt. I think if i can attach remotely and step through the code that 
will satisfy my needs. Let me give it a try.

I also found how to run mvnDebug and attach to that from intellij. Just need to 
find a maven goal that runs nifi but i havent seen one yet.

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android<https://aka.ms/ghei36>


From: Matt Burgess 
Sent: Monday, October 26, 2020 12:05:03 PM
To: users@nifi.apache.org 
Subject: Re: Run Nifi in IntelliJ to debug?

Sorry I misread the part where you wanted to run NiFi inside IntelliJ,
I was talking about running it externally (from the command-line,
e.g.) and connecting the IntelliJ debugger. I haven't run NiFi itself
using IntelliJ, maybe someone else can chime in for that.

On Mon, Oct 26, 2020 at 12:03 PM Matt Burgess  wrote:
>
> Yes, that's a pretty common operation amongst NiFi developers. In
> conf/bootstrap.conf there's a section called Enable Remote Debugging
> and a commented-out line something like:
>
> java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
>
> You can remove the comment from that line and set things like the
> address to the desired port, whether to suspend the JVM until a
> debugger connects, etc. Then in IntelliJ you can create a new
> configuration of type Remote, point it at the port you set in the
> above line, and connect the debugger. It will then stop at breakpoints
> and you can do all the debugging stuff like add Watches, execute
> expressions (to change values at runtime), etc.
>
> Regards,
> Matt
>
> On Mon, Oct 26, 2020 at 11:52 AM Darren Govoni  wrote:
> >
> > Hi
> >Is it possible to run Nifi from inside IntelliJ with debugging such that 
> > I can hit the app from my browser and trigger breakpoints?
> >
> > If anyone has done this can you please share any info?
> >
> > Thanks in advance!
> > Darren
> >
> > Sent from my Verizon, Samsung Galaxy smartphone
> > Get Outlook for Android


Re: Run Nifi in IntelliJ to debug?

2020-10-26 Thread Matt Burgess
Sorry I misread the part where you wanted to run NiFi inside IntelliJ,
I was talking about running it externally (from the command-line,
e.g.) and connecting the IntelliJ debugger. I haven't run NiFi itself
using IntelliJ, maybe someone else can chime in for that.

On Mon, Oct 26, 2020 at 12:03 PM Matt Burgess  wrote:
>
> Yes, that's a pretty common operation amongst NiFi developers. In
> conf/bootstrap.conf there's a section called Enable Remote Debugging
> and a commented-out line something like:
>
> java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
>
> You can remove the comment from that line and set things like the
> address to the desired port, whether to suspend the JVM until a
> debugger connects, etc. Then in IntelliJ you can create a new
> configuration of type Remote, point it at the port you set in the
> above line, and connect the debugger. It will then stop at breakpoints
> and you can do all the debugging stuff like add Watches, execute
> expressions (to change values at runtime), etc.
>
> Regards,
> Matt
>
> On Mon, Oct 26, 2020 at 11:52 AM Darren Govoni  wrote:
> >
> > Hi
> >Is it possible to run Nifi from inside IntelliJ with debugging such that 
> > I can hit the app from my browser and trigger breakpoints?
> >
> > If anyone has done this can you please share any info?
> >
> > Thanks in advance!
> > Darren
> >
> > Sent from my Verizon, Samsung Galaxy smartphone
> > Get Outlook for Android


Re: Run Nifi in IntelliJ to debug?

2020-10-26 Thread Matt Burgess
Yes, that's a pretty common operation amongst NiFi developers. In
conf/bootstrap.conf there's a section called Enable Remote Debugging
and a commented-out line something like:

java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

You can remove the comment from that line and set things like the
address to the desired port, whether to suspend the JVM until a
debugger connects, etc. Then in IntelliJ you can create a new
configuration of type Remote, point it at the port you set in the
above line, and connect the debugger. It will then stop at breakpoints
and you can do all the debugging stuff like add Watches, execute
expressions (to change values at runtime), etc.

Regards,
Matt

On Mon, Oct 26, 2020 at 11:52 AM Darren Govoni  wrote:
>
> Hi
>Is it possible to run Nifi from inside IntelliJ with debugging such that I 
> can hit the app from my browser and trigger breakpoints?
>
> If anyone has done this can you please share any info?
>
> Thanks in advance!
> Darren
>
> Sent from my Verizon, Samsung Galaxy smartphone
> Get Outlook for Android


Run Nifi in IntelliJ to debug?

2020-10-26 Thread Darren Govoni
Hi
   Is it possible to run Nifi from inside IntelliJ with debugging such that I 
can hit the app from my browser and trigger breakpoints?

If anyone has done this can you please share any info?

Thanks in advance!
Darren

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android