fteStartAgent: start an MFT agent

The fteStartAgent command starts a Managed File Transfer agent from the command line.


Purpose

Use the fteStartAgent command to start a Managed File Transfer agent. We must start an agent before we can use it to perform file transfers. The fteStartAgent command starts an agent on the system where we issue the command: we cannot start an agent on a remote system.

For IBM WebSphere MQ Version 7.5 or later, the agent process controller manages starting the agent. However, the agent process controller may wait for a period of time, for example where there have been a high rate of agent failures, before attempting to start the agent again. As an IBM MQ administrator we can use fteStartAgent command to override this wait and initiate a start of the agent. If the agent process controller was waiting for the queue manager to become available this command will also initiate the agent process controller attempting to reconnect to the queue manager.

If we have configured the agent to run as a Windows service by using the fteCreateAgent or fteModifyAgent command, running the fteStartAgent command starts the Windows service.

This command returns an error if the agent does not start or is already started. The agent communicates with its queue manager based on the values defined in the agent.properties file.

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


Syntax


fteStartAgent

fteStartAgent -F-p configuration_options agent_name


Parameter

    -F
    Optional. This parameter runs the agent daemon as a foreground process. The default is for the agent daemon to run in the background.

    If we are running on Windows, and you have configured the agent to run as a Windows service by using the fteCreateAgent or fteModifyAgent commands, the -F parameter overrides this configuration.

    -p configuration_options
    Optional. This parameter determines the set of configuration options that is used to issue the request to start 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.

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

    -? or -h
    Optional. Displays command syntax.


Example

In this example, AGENT2 is started and runs in the foreground.
fteStartAgent -F AGENT2 
In the following example (for UNIX and Linux systems), AGENT2 is started with a non-default coordination queue manager, QM_SATURN:
./fteStartAgent -p QM_SATURN AGENT2 
We can also run the command by specifying the path to fteStartAgent as follows:
path/fteStartAgent agentname


Return codes

    0 (RC_SUCCESS)
    Command completed successfully.

    1 (RC_FAILURE)
    Command ended unsuccessfully.

    78 (RC_CONFIG)
    A configuration error was encountered.

    79 (RC_API_ERROR)
    A MFT exception occured.

    80 (RC_IO_ERROR)
    A Java IOException occurred.

    81 (RC_IPC_ERROR)
    An MFT interprocess communication error occurred.


Responses

In some circumstances, you might see error messages after running the fteStartAgent command:

  • If you run the fteStartAgent command and see the following error message, the environment probably has additional library paths that conflict with Managed File Transfer:
    BFGCL0001E: An internal error has occurred. The exception was: 'CC=2;RC=2495;AMQ8568:
     The native JNI library 'mqjbnd' was not found. [3=mqjbnd]
    If the LD_LIBRARY_PATH or LIBPATH environment variable is set to reference a 64-bit version of the library before the 32-bit version when the agent is running with a 32-bit version of Java (as is currently the case for most platforms), this error occurs.

    To resolve this issue, set the Managed File Transfer agent property javaLibraryPath to reference the correct location for the library. For example, for mqjbnd on AIX, set to: /usr/mqm/java/lib. For mqjbnd on Linux, set to: /opt/mqm/java/lib

Parent topic: MFT commands


Related information