Posts Tagged ‘remote’
Remote debug on Mule 2.2.1
Case
You have to run a standalone Mule 2.2.1 in debug mode. Since Mule is launched in standalone, you have to debug a remote application.
Fix
Nice case
- Edit the
%MULE_HOME%/conf/wrapper.conf
- Uncomment the line:
wrapper.java.additional.<n>=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
- Don’t forget to set the parameter <n>
Boring case
In my case (Windows XP SP2, Java 1.5), the Mule refused to start and freezed:
------------------------------------------------------------------------ The JVM is being launched with a debugger enabled and could possibly be suspended. To avoid unwanted shutdowns, timeouts will be disabled, removing the ability to detect and restart frozen JVMs. ------------------------------------------------------------------------ Launching a JVM... Listening for transport dt_socket at address: 5005 ------------------------------------------------------------------------ Startup: Timed out waiting for a signal from the JVM. The JVM was launched with debug options so this may be because the JVM is currently suspended by a debugger. Any future timeouts during this JVM invocation will be silently ignored. ------------------------------------------------------------------------
The fix this:
- Download the jar spring-agent here.
- Move it into
%MULE_HOME%/lib/user/
- Edit the
%MULE_HOME%/conf/wrapper.conf
- add the following block:
wrapper.java.additional.3=-javaagent:%MULE_HOME%\lib\user\spring-agent-2.5.3.jar wrapper.java.additional.4=-Xdebug wrapper.java.additional.5=-Xnoagent wrapper.java.additional.6=-Djava.compiler=NONE wrapper.java.additional.7=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
localhost:5005