Technical Blog Post
Abstract
How to run multiple File Agents
Body
How to run Multiple File Agents
Over the years I have frequently been asked “How do I run more than one instance of Connect:Direct File Agent?” My normal response is “Why do you think you need to run more than one instance?” More often than not the answer I get has to do with adding another trading partner, adding another watch directory, I have to add a new Connect:Direct process and so forth.
There are actually very few scenarios where you will need to run multiple instances of File Agent. The most common need for multiple File Agents is when you will need for the File Agent to attach to different local Connect:Direct nodes. In this case you need different configuration files since a configuration file can only be setup to attach to a single node using a single userid.
If you need to start watching a new directory, use the File Agent configuration tool by going to:
Start>All Programs>IBM Sterling Connect Direct File Agent>Configure IBM Sterling Connect Direct File Agent
for Windows or:
…/FileAgent/cdfa –C
for UNIX/Linux.
Select your configuration file from the list in the left box of the GUI. Click the Edit button. Add the watch directories to the list in the “Watched directories” field. There is no limit to the number of watched directories in the code. There will be, however, practical limits based on the hardware and software of the machine, how many files are put in each watch directory at a time, etc.
After you add your new watch directories you need to review the rules you have in place to make sure they will still accomplish your goals. You might need to create new rule(s) to properly handle the files landing in your new watch directories. Rules as with watch directories have no coded limits.
In the event you determine that you need to run multiple instances of File Agent you will need to determine if you will need to run the additional instances on the same machine or on different machine. You will also need to determine whether or not any of the File Agents will be monitoring common watch directories.
Scenario #1 for multiple File Agent Instances:
Assumptions:
- Two File Agent instances
- Both instances on the same machine
- There is no overlap watched directories
You will first need to create the two configuration files. The configuration file for the first instance will be the Default_Config.ser file. Create the second configuration file. The first instance of File Agent will be started and run as a Windows service running the Default_Config.ser as its configuration. Since Windows only allows you to start one instance of the service the second instance will have to be run from a Windows command prompt. After opening the command window change directories to the File Agent installation directory and type:
cdfa –cConfigurationFile.ser
The major drawback with this method is that the second instance of File Agent will stop if for any reason the command window is closed.
Scenario #2 for multiple File Agent Instances:
Assumptions:
- Two File Agent instances
- The instances on the different machines
- There is no overlap watched directories
If you have need to run multiple instances of File Agent this method will be more stable since the File Agent will be running as a service on each machine. You simply configure the Default_Config.ser file on each machine to watch its watched directories and start the service.
Scenario #3 for multiple File Agent Instances:
Assumptions:
- Two File Agent instances
- The instances on the different machines
- There is might be an overlap of watched directories
In this instance you would setup the File Agents in the same manner as in Scenario 2 except that you need configure File Agent for a Gate Keeper. To do this you will select one instance to be the Gate Keeper, make note of the Gate Keeper’s IP address. When configuring the File Agent click on the File Agent tab the Gate Keeper port field will be populated with the default Gate Keeper port 65530 and the Gate Keeper DNS name will be set to the default 127.0.0.1, update the address to either the DNS name of your designated Gate Keeper or its IP address. The Gate Keeper will lock the Gate Keeper port and the File Agents will use that port to communicate. If there are common watched directories between the File Agents only the Gate Keeper will process files in the common locations. The Gate Keeper functionality is same if both instances of File Agent are the same machine except in this case the first instance of File Agent to come up will be the Gate Keeper.
It is important to note that when running multiple File Agents and the Gate Keeper is used if the Gate Keeper goes down for any reason no other File Agent will assume the role of Gate Keeper. This means that if you try to use the Gate Keeper function for redundancy it will not work. If you configure all File Agents to monitor the same directories and the Gate Keeper goes down there will be no File Agent functioning to handle incoming files.
UID
ibm11124139