Module Debugging 8.0.10

Getting a null pointer exception and I have no idea where its coming from and for some reason not getting a complete stack.

Attempting to do remote debugging to see what is happening when the issue occurs but I’m getting connection refused. We can’t see that we have any firewall rules local or remote that would cause the issue so wondering if we have it configured incorrectly.

Below are our config lines

Then my remote debugger config is setup like so (host ip is a local ip of our gateway server)

Any input is appreciated as to where we are going wrong!

Have you restarted the gateway since uncommenting or adding those debug parameters?

Yeah we followed this document. Steps 1 and 2
https://docs.inductiveautomation.com/display/SE/Debugging

It doesn’t appear that it’s listening on 8000 for some reason.

Not sure then, looks okay to me. I used exactly these parameters only yesterday to remote debug an issue QA shared with me.

And the client scope section is just for designer stuff right nothing we need to look at for gateway modules?

As long as the config looks good we’ll keep poking from there I suppose hmmmm.

Yes, you seem to have everything needed for remote debugging in gateway scope.

If you can get a shell on the gateway machine do you see it bound/listening to port 8000 when running something like netstat -a?

So we did another restart of the gateway and saw that it was listening on 8000
I tried to connect and got and exception I’ll have to google.
But now it’s not listening anymore. So whatever the exception is it’s causing the listener to die

Maybe make sure both sides are configured to use JDK 11? (err, not really an option, the gateway is using JDK 11, so make sure your IDE is configured for it as well).

I haven’t used Eclipse in many years so I’m not sure I can offer any more specific advice there.

I’m thinking my module wouldn’t run on the gateway if my JDK version wasn’t 11 but I’m not sure. Will keep poking. Thanks for the help!

Does this have any impact on debug?

No.

Dang… well I’m fresh out of ideas for today.

Tried running Eclipse as Administrator, no dice.
image

Ensured Eclipse is setup with JDK 11, still no dice.
image

Verified my local PC firewall is off, double no dice LOL
image

Are you using a different IDE?

We pretty much all use IntelliJ at IA.

As a test, you could try setting a specific address in the address part of the debug parameter? Maybe choose explicitly localhost / explicitly your local IP, and match that with the address you try to remote debug to.

The host value set as the remote IP address of our gateway.

I didn't quite follow the second part of your response I apologize

So i installed IntelliJ and it’s pretty cool it tells you the command the remote server needs to have. It shows the line that matches the Inductive SDK documentation but for version JDK 1.4.x
“-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000”

Version JDK 9+ is a different command?
“-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000”

This is the current command in our gateway config looks like we have a little syntax mix of both?

I think the syntax suggested by IJ might be more modern but both should work.

I just established a remote debug against an 8.0.13 I have lying around that using whatever was already in the ignition.conf:

wrapper.java.additional.2=-Xdebug
wrapper.java.additional.3=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:8000
1 Like

I guess the solution was to not use Eclipse? Got the project all setup in IntelliJ and that appears to be working fine.

For so many reasons :wink:

2 Likes

For Designer debugging under Eclipse, I start the Ignition 8 Designer with a bash script like this

/Users/chuckc/.ignition/cache/resources/runtimes/11.0.11.1/bin/java -classpath /Users/chuckc/.ignition/cache/resources/platform/launchclient.jar/00000000D3444BFA/launchclient.jar -Djavaws.sr.gateway.addr.0=http://localhost:8088 -Djavaws.sr.launchts=1633459689119 -Djavaws.sr.main=com.inductiveautomation.ignition.designer.DesignerStartupHook -Djavaws.sr.platform.edition= -Djavaws.sr.platform.plugins= -Xms64M -Xmx1024M -Djavaws.sr.memory.init=64M -Djavaws.sr.memory.max=1024M -Xdock:name=Ignition-chuckc-imac.local -Xdock:icon="/Users/chuckc/.ignition/clientlauncher-data/DesignerIcon.icns" -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:9002 -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=false -Djavaws.sr.screen=0 -Djavaws.sr.scope=D com.inductiveautomation.ignition.client.launch.BootstrapSwing

I then set an eclipse remote java application debugger to attach to port 9002. Works like a charm. The console log goes to my terminal window which is very convenient. By the way, the script comes from ~/.ignition/clientlauncher-data/designerlauncher.log

1 Like