Unable to remote debug server when APM agent is enabled

Hi, we're having an issue at the moment where if we startup a server with the APM flag present in the server startup we're not able to remote debug our server. We will get the following error;

image%20(2)

We've been running with the same config for some months, so unsure what's caused the issue. We've made no changes to the properties file and not changed the APM version that we're using. I was wondering if anyone here has experienced something similar or has any ideas on what the issue may be?

This is an unfortunate side-effect of instrumenting a method with Byte Buddy. Sometimes the this reference can't be resolved then. Which method are you trying to debug? This should only occur for a small subset of methods which are instrumented by default by the Java agent.

Are you using the trace_methods configuration option? In that case those methods would have the same problem.

See also https://stackoverflow.com/questions/52067467/byte-buddy-advice-breaks-eclipse-debugger for more details.

Thanks for clearing this up Felix, yes in all cases we are using the trace_methods property. It's not a huge issue for us seeing as we only debug certain servers which are non critical.

Do you know if in this case we'd be able to switch the active flag to false and we'd be able to debug these methods again? Or do we need the server to be started up without including the agent jar?

You'd need to restart with instrument=false or without the agent flag. I've created a Byte Buddy issue for this: https://github.com/raphw/byte-buddy/issues/739