Kbase 47196: How to debug the SonicMQ broker running as NT service
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Solution ID: P17196
GOAL:
How to debug the SonicMQ broker java process running as NT service
FACT(s) (Environment):
Windows NT 32 Intel/Windows 2000
FIX:
1. You need to run the service with java.exe from the JDK instead of
that from the JRE to be able to use the debugger. The additional jvmargs to be able to attach the debugger are:
-Xdebug -Xrunjdwp:transport=<mode>,address=<id>,server=<b>,suspend=<b>
where <mode> can be dt_shmem (which means the debugger connects to the JVM over shared memory) and <id> a name free to use.
Example:
-Xdebug -Xrunjdwp:transport=dt_shmem,address=brokerdbg,server=y,suspend=n
2. To be able to connect the debugger over shared memory it is also
necessary to run the service with the same user account as the debugger:
With my test I used the same domain user account with which I connected to the Win2k machine for the service as well.
3. Additionally copy:
dt_shmem.dll and dt_socket.dll to the WINNT\system32 directory to be
sure the service can use them.
4. Attach the debugger using the shared memory identifier specified for
starting the broker:
jdb -attach <id>
Example:
jdb -attach brokerdbg
5. Example for the service creation script:
SonicServiceSetup -install Sonic402b106 -jre=e:\jdk1.3\bin\java.exe -home=e:\Sm402106\broker.ini -cp e:\Sm402106\jre\lib\rt.jar;e:\Sm402106\lib\jetty.jar;e:\Sm402106\lib\broker.jar;e:\Sm402106\lib\jndi.jar;e:\Sm402106\lib\defdb_server.jar;e:\Sm402106\lib\jetty.jar -Xdebug -Xrunjdwp:transport=dt_shmem,address=brokerdbg,server=y,suspend=n -Xrs