Debugging the Email Engine on Windows


To enable the -Dmail.debug=true debug mode option for Windows, perform the following steps:

Important

If you are using Email Engine on Windows, do not run the Email Engine service and EmailStart.bat at the same time.

  1. In the EmailStart.bat file, add the -Dmail.debug=true option:

    "%JavaPath%\java" -Dmail.debug=true -cp emaildaemon.jar;arapi<releaseNum>.jar;arutil<releaseNum>.jar;activation.jar;mail.jar;imap.jar;smtp.jar;pop3.jar;armapi<releaseNum>.jar com.bmc.arsys.emaildaemon.EmailDaemon

    The default location of the EmailStart.bat file is C:\Program Files\BMC Software\ARSystem\AREmail.

  2. Save the batch file with another name, for example, emaildebug.bat.
  3. Make sure that the Email Engine service is stopped in the Services window.
  4. Open a command prompt, change the directory to the location of the AR System install directory, and run the new batch file.
    This batch file adds debug information to the screen when the Email Engine is started from a command prompt. You can also direct the output to a file by adding > c:\temp\debug.out to the end of the previous Java statement.

To generate debug log using the Windows Email Engine service

  1. From the Services window, stop the Email Engine service.
  2. Open the Windows registry, and navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet> Services \HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\BMC Remedy Email Engine – MACHINE_NAME 1\Parameters.
  3. Create a new String Value, name it JVM Option Number 4, and set its value to -Dmail.debug=true.
  4. Change the value of JVM Option Count to 5.
  5. Start the Email Engine service.

The debug log is available in the emailEngineInstallDir\AREmail\Logs\email.log file.

When you set the value of the com.bmc.arsys.emaildaemon.ReceiverModule.level parameter to SEVERE, the debug entries are displayed at the top of the email.log file and the module entries are displayed at the bottom of the email.log file.

See the following screenshots:

Debug entries displayed at the top of the email.log file:

Debug entries at the top.png

Module entries displayed at the bottom of the email.log file:

module entries at the bottom of the log.png


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*