fteStopAgent: stop an MFT agent

Use the fteStopAgent command to either stop a Managed File Transfer agent in a controlled way or to stop an agent immediately if necessary using the -i parameter.


Purpose

When you stop an agent by using the fteStopAgent command, we can either allow the agent to complete its current file transfer before stopping, or stop the agent immediately even if the agent is currently transferring a file. When the agent has stopped, we cannot use that agent to transfer files until you restart the agent.

If the agent we want to stop is connected to the IBM MQ network, we can run the fteStopAgent command from any system that can connect to the IBM MQ network and route to the agent queue manager. Specifically for the command to run, we must have installed and configured a Managed File Transfer component (either Service or Agent) on this system to communicate with the IBM MQ network. If no connectivity details are available, a bindings mode connection is made to the default queue manager on the local system. If command.properties does not exist then an error is generated.

If the agent we want to stop is not connected to the IBM MQ network, for example if the IBM MQ network is not currently available, we can only run the fteStopAgent command from the system that the agent is running on. In order to stop an agent that is not connected to the IBM MQ network we must run the fteStopAgent command from the same user the agent is running as. Alternatively, if the agent is running on a Windows system we can run the command as an administrator.

Specify the optional -p parameter for this command only if we want to use a set of configuration options different from your default set. See The MFT agent.properties file for more information.

If your agent is running as a Windows service, running the fteStopAgent command stops the Windows service. For more information, see Starting an MFT agent as a Windows service.


Syntax


fteStopAgent

fteStopAgent -magent_qmgr_name-pconfiguration_options-i-mquseriduserID-mqpasswordpassword agent_name


Parameters

    -m (agent_qmgr_name)
    Optional. The name of the queue manager that the agent that we want to stop is connected to.

    If the agent is on a remote system, or if the agent is on the local system but we are not the user that started it, we must use the -m parameter, and have the appropriate authorities. For more information about authorities, see Restricting group authorities for MFT-specific resources.

    -p (configuration_options)
    Optional. This parameter determines the set of configuration options that is used to issue the request to stop an agent. Use the name of a non-default coordination queue manager as the input for this parameter. The command then uses the set of properties files associated with this non-default coordination queue manager.

    If we do not specify this parameter, the set of configuration options based on the default coordination queue manager is used.

    -i
    Optional. Immediately stops the agent. The agent does not complete any transfers that are currently in progress.

    If we do not specify the -i parameter, the agent completes any transfers currently in progress but the agent does not start any new transfers.

    -mquserid (userID)
    Optional. Specifies the user ID to authenticate with the command queue manager.

    -mqpassword (password)
    Optional. Specifies the password to authenticate with the command queue manager. We must also specify the -mquserid parameter. If you specify -mquserid, but do not specify -mqpassword, we will be prompted to supply the associated password. The password will not be displayed.

    agent_name
    Required. The name of the Managed File Transfer agent that you want to stop.

    -? or -h
    Optional. Displays command syntax.


Example

In this example the agent AGENT2 on queue manager QM_JUPITER is stopped. The -m parameter is used because this queue manager that AGENT2 is connected to differs from the queue manager specified by the set of configuration options.
fteStopAgent -m QM_JUPITER AGENT2


Return codes

    0
    Command completed successfully.

    1
    Command ended unsuccessfully.

Parent topic: MFT commands


Related reference


Related information