Guidance for running an agent or logger as a Windows service
You can run a IBM® MQ Managed File Transfer agent, a stand-alone database logger, and a stand-alone file logger, as Windows services. If you are having a problem with these Windows services, you can use the service log files and the information in this topic to diagnose the issue.
For information about configuring your agent, stand-alone logger, or stand-alone file logger, to run as a Windows service, see Starting an agent as a Windows service and fteModifyLogger (run a IBM MQ Managed File Transfer logging application as a Windows service).
Location of log files
When you use the fteCreateAgent, fteCreateWebAgent, fteCreateCDAgent, fteCreateBridgeAgent, fteModifyAgent, fteCreateLogger,
or fteModifyLogger command to run an agent or
logger as a Windows service,
you can choose the level of logging by using the -sl parameter.
The possible values for this parameter are error
, info
, warn
,
and debug
. The default value is info
.
The log file for the Windows service has the file name servicedate.log, where date is the date when the service was started. The file for an agent is written to the directory MQ_DATA_PATH\mqft\logs\coordination_qmgr_name\agents\agent_name. This directory is the same directory that IBM MQ Managed File Transfer agent trace files are written to. The file for the logger is written to the directory MQ_DATA_PATH\mqft\logs\coordination_qmgr_name\loggers\logger_name.
debug
using the -sl parameter.
Additional information is written to the servicedate.log file. debug
, the user account
and password that you are using to run the Windows service are shown in the log file
in plain text.Number of log files
When you use the fteCreateAgent, fteCreateWebAgent, fteCreateCDAgent, fteCreateBridgeAgent, fteModifyAgent, fteCreateLogger,or fteModifyLogger command
to run an agent or a stand-alone logger as a Windows service, you can choose the number
of log files by using the -sj parameter. Specify
the following text as part of your command to change the number of
log files: -sj -Dcom.ibm.wmqfte.daemon.windows.windowsServiceLogFiles=number
,
where number
is the number of
log files that you want expressed as a positive integer. If you do
not specify the number of log files, the default is five.
"Log on as a service" authority
Unable to start Windows service mqmftAgentAGENT@QMGR.
System error 1069: The service did not start due to a logon failure.
In
this message, AGENT is your agent name and QMGR is
your agent queue manager name. If you are trying to run a stand-alone
logger as a service, a similar message is produced, which refers to
the logger rather than an agent.- From the Start menu, click .
- In the Security Settings pane, expand Local Policies, and then click User Rights Assignments.
- In the Policy and Security Setting pane, double-click Log on as a service.
- Click Add User or Group, and then add the user that you want to run the service to the list of users that have the Log on as a service right. You provided this user name when you ran the fteCreateAgent, fteCreateWebAgent, fteCreateCDAgent, fteCreateBridgeAgent, fteModifyAgent,fteCreateLogger, or fteModifyLogger command.
System error 1069: The service did not
start due to a logon failure.
can also be caused by an incorrect
password.Hiding your Windows account password
fteCreateAgent -agentName AGENT1 -agentQMgr QMGR1 -s -su fteuser -sp ftepassword
In
this example, the Windows service
runs with a user name of fteuser
, which has an associated
password ftepassword
. When you run the fteCreateAgent command,
or one of the other commands that accepts the -s parameter,
you specify the password for the Windows account
in plain text. If you prefer not to display your password, carry out
the following steps:- Run the command (fteCreateAgent, fteCreateWebAgent, fteCreateCDAgent, fteCreateBridgeAgent, fteModifyAgent, fteCreateLoggeror fteModifyLogger)
without specifying the -sp parameter. For example:
fteCreateAgent -agentName AGENT1 -agentQMgr QMGR1 -s -su fteuser
Note: The command produces a message that warns you that you must set the password by using the Windows Services tool before the service starts successfully. - Open the Windows Services window.
- In the list of services, right-click the agent or stand-alone
logger service and select Properties. The agent
service display name is
WebSphere MQ Managed File Transfer agent AGENT @ QMGR
, where AGENT is the agent name and QMGR is your agent queue manager name. The logger service display name isWebSphere MQ Managed File Transfer logger for property set coordination_qmgr_name
, where coordination_qmgr_name is the coordination queue manager that you specified for the stand-alone logger to use as its property set. For more information about the property set, see fteStartLogger (start a logger) and fteModifyLogger (run a IBM MQ Managed File Transfer logging application as a Windows service). - In the Properties window, select the Log On tab.
- Enter the password for the user account that runs the service in the Password and Confirm password fields. The password characters are hidden as you enter them.
- Click OK.
Known issues
- Problem using the JAVA_HOME system environment variable (applies to IBM MQ Managed File Transfer V7.5.0.1 or earlier only).
- The JAVA_HOME system environment variable must not be set, otherwise the agent or logger Windows Service is unlikely to start. The agent or logger Windows Service must be run with the Websphere MQ Java runtime.