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.

If you have problems starting an agent or database logger as a Windows service, try setting the logging level to debug using the -sl parameter. Additional information is written to the servicedate.log file.
Note: When the logging level is set to 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, 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

The Windows account that you use to run the service must have the Log on as a service right. If you try to start the service, either with the fteStartAgent command or with the Windows Sc.exe command, and you are using a user account that does not have this right, a Services window opens. If the service you wanted to start was to run an agent, this window contains the following message:
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.
To prevent this error, give the Windows account that you use to run the service the Log on as a service right. For example, on Windows XP Professional or Vista, carry out the following steps:
  1. From the Control Panel, open Administrative Tools, and then open Local Security Policy.
  2. In the left pane, expand Local Policies, and then click User Rights Assignments.
  3. In the right pane, double-click Log on as a service.
  4. 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.
Note: The error 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

When you configure your agent or database logger to run as a Windows service, you specify a user name and password to use. In the following example, the agent AGENT1 is created, which has an agent queue manager QMGR1 and is configured to run as a Windows service:
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:
  1. 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.
  2. Open the Windows Services window.
  3. 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).
  4. In the Properties window, select the Log On tab.
  5. 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.
  6. 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.


Concept Concept

Feedback

Timestamp icon Last updated: Tuesday, 30 January 2018
http://www.ibm.com/support/knowledgecenter/SSEP7X_7.0.4/com.ibm.wmqfte.doc/trouble_win_service.htm