This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.
Control-M/Enterprise Manager 9.0.00 and 9.0.18
When running "Test Connectivity" for Usage Alerts in Control-M/Enterprise Manager, receive the error "Connection test for environment XXX resulted with failure".
This is also apparent in the EM's cms_diag*log file with an error similar to:
23/02/2018 15:02:03.951  cms_usage_alerts CmsUsageAlertsService::runUsageAlertsTool(thread 368) Failed to run:F:\Program Files\BMC Software\Control-M EM\Default\\bin\emusagetool.bat. Exit code: 1 errstr:
When running the emusagetool by hand, similar to:
emusagetool -cfg "F:\Program Files\BMC Software\Control-M EM 9.0.00\Default\usagetool\data\usagealert.xml" -out c:\temp\blah.txt -xalert_host myhost -xalert_port 1433 -mail_host mail.mydomain.com -mail_port 25
this command will return an error:
ERROR: Not authorized to run
Change to the in the Enterprise Manager Reporting Tool authorizatins, preventing it from running in certain circumstances
Add the variable "EM_ENABLE_USAGE_UTIL" set to "1".
In Windows, this must be added to the host's system parameters and the EM Server components recycled.
In UNIX, this needs to be added to the user's logon environment (i.e. .cshrc/.profile). The EM Server components must be recycled after logging out and logging in.