Guidance for running an agent or database logger as a Windows service
You can run a WebSphere® MQ File Transfer Edition agent, and the stand-alone database 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 or database logger to run as a Windows service, see Starting an agent as a Windows service and fteModifyDatabaseLogger (run a WebSphere MQ File Transfer Edition database logging application as a Windows service).
Location of log files
When you use the fteCreateAgent, fteCreateWebAgent, fteCreateCDAgent, fteCreateBridgeAgent, fteModifyAgent, or fteModifyDatabaseLogger command to run an agent or database 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 configuration_directory\coordination_qmgr_name\agents\agent_name\logs. This directory is the same directory that WebSphere MQ File Transfer Edition agent trace files are written to. The file for the database logger is written to the directory configuration_directory\coordination_qmgr_name\logs.
Number of log files
When you use the fteCreateAgent, fteCreateWebAgent, fteCreateCDAgent, fteCreateBridgeAgent, fteModifyAgent, or fteModifyDatabaseLogger command to run an agent or database 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
Could not start the IBM WMQFTE agent AGENT@QMGR service on Local Computer.
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 the database
logger as a service, a similar message is produced, which refers to
the database logger rather than an agent.- From the Control Panel, open Administrative Tools, and then open Local Security Policy.
- In the left pane, expand Local Policies, and then click User Rights Assignments.
- In the right 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, or fteModifyDatabaseLogger command.
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,
or fteModifyDatabaseLogger) 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 database logger service and select Properties. The agent service display name is IBM WMQFTE agent AGENT @ QMGR, where AGENT is the agent name and QMGR is your agent queue manager name. The database logger service display name is IBM WMQFTE database logger for property set coordination_qmgr_name, where coordination_qmgr_name is the coordination queue manager that you specified for the database logger to use as its property set. For more information about the property set, see fteStartDatabaseLogger (start the stand-alone database logger) and fteModifyDatabaseLogger (run a WebSphere MQ File Transfer Edition database 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
- Error when stopping the service (applies to WebSphere MQ File Transfer Edition V7.0.3 only)
- If you use the Windows Services tool to stop the service, Windows might produce an error that starts Windows could not stop the IBM WMQFTE agent service. Despite this error, the agent has stopped successfully. This behavior is a known limitation with the Java™ runtime environment that is used by WebSphere MQ File Transfer Edition.