KBEC-00046 - Installing multiple ElectricCommander agents on the same machine


Sometimes it is desirable to install multiple ElectricCommander agents on the same machine. Example scenarios include:

  • Each Commander agent can be installed to run as different users in an environment where security/password management concerns preclude the use of user impersonation.
  • Procedures for development or testing Commander may be using an agent to install Commander.
  • Install a new version of the agent for testing while running production under a previous agent.


The best way to run multiple agents is to do multiple silent Commander installs. The interactive command line install will not work if the Commander agent is already installed.
For the silent install to work, each of the following fields must be unique.

Install the additional agent on the same host:

./ElectricCommander- \\
 --mode silent \\
 --parallelInstallName  \\
 --installAgent \\
 --installDirectory "/opt/agent/" \\
 --dataDirectory "/opt/agent/" \\
 --agentPort 7801 \\
 --agentLocalPort 6801 \\
 --unixAgentUser  \\ (In case of Windows, please use --windowsAgentUser)
 --unixAgentGroup  \\

After the silent install add the Resource to the Commander server - specifying the new agent port.

--mode silent 
--installDirectory /opt/electriccloud/ec-4.2 
--dataDirectory /opt/electriccloud/ec-4.2 
--remoteServerUser admin 
--remoteServerPassword changeme 
--parallelInstallName agent2 
--agentLocalPort 6801 
--agentPort 7801

For more information about the arguments:

Please goto http://docs.electric-cloud.com -> ElectricCommander and find “Silent Install Argument” or type cmd command like “ElectricCommander- –help” at your installer location.

Linux/UNIX (Alternate way when using an older version of Commander- pre-4.2.x)

You can create additional agents manually, but the process involves numerous steps. This section is meant to be an outline, not a step-by-step guide. Contact Electric Cloud Support for full details.

  1. Create a new agent configuration file.
    Modify the port number.
  2. Create a new agent.conf file. Copy agent.conf to agent-dev.conf by default found in /opt/electriccloud/electriccommander/conf and change two lines in it:
    1. the port number (7800 -> 7801)
    2. the path to the log file (agent.log -> agent-dev.log)
  3. Create a symlink from ecmdrAgent to ecmdrAgent-dev in the bin directory.
    (This is important, otherwise, stopping the agent may stop the wrong one.)
  4. Copy runAgent.sh to runAgent-dev.sh in the bin directory and change the last line to refer to the new binary name (ecmdrAgent-dev) and the new config file name (agent-dev.conf).
  5. Create a new version of ecmdrAgent in /etc/init.dModify AGENTEXE, runAgent.sh, and the lock file.
  6. Add symlinks in the various /etc/rcx.d directories
  7. Find the existing ones and duplicate for the new init.d file

Windows (Alternate way when use old version of Commander-Not for from 4.2.x)

To create a version specific (say XYZ) Commander agent to run on an alternate port (say 7801):

  1. Stop the Commander Agent service
  2. Copy the program files

    \Program Files (x86)\Electric Cloud\ElectricCommander


    \Program Files (x86)\Electric Cloud\ElectricCommanderXYZ
  3. Copy the data files
    1. for Windows XP, 2003

      \Documents and Settings\All Users\Application Data\Electric Cloud\ElectricCommander


      \Documents and Settings\All Users\Application Data\Electric Cloud\ElectricCommanderXYZ
    2. for Windows Vista, 2008, Windows 7

      \ProgramData\Electric Cloud\ElectricCommander


      \ProgramData\Electric Cloud\ElectricCommanderXYZ
  4. Modify the agent.conf file in
    1. for Windows XP, 2003

      \Documents and Settings\All Users\Application Data\Electric Cloud\ElectricCommanderXYZ\conf
    2. for Windows Vista, 2008, Windows 7

      \ProgramData\Electric Cloud\ElectricCommanderXYZ\conf

      to use port 7801

  5. Modify references to either program files or documents and settings to point at ElectricCommanderXYZ
  6. Create the XYZ version of the Service

    OS service registration is depended on the OS command sc to manage system service, so need to change options of command itself if doesn't work in future:
    In case of binPath, you need to see original binPath of your already registered Agent if you meet path error due to Commander version difference.
    sc delete CommanderAgentXYZ
    sc create CommanderAgentXYZ binPath= ""C:/Program Files/Electric Cloud/ElectricCommanderXYZ/agent/bin/wrapper-windows-x86-64.exe" -s "C:/ProgramData/Electric Cloud/ElectricCommanderXYZ/conf/agent/wrapper.conf"" start= auto DisplayName= "ElectricCommander AgentXYZ"
  7. Copy the resource in EC; rename resource name from hostName copy to hostName-XYZ and modify the port to 7801.
  8. Open services and locate new service “Electric Commander Agent XYZ”
  9. Modify the RunAs user on the new service to use the domain agent account
  10. Start the new service “Electric Commander Agent XYZ”
  11. Run the install for new agent; which upgraded the normal ElectricCommander install directories.

HPUX, MacOS and Solaris

Use the Commander installer silently and the undocumented installer option "–parallelInstallName " as in the following MacOS example:

./commander_i386_Darwin.bin --mode silent --parallelInstallName _360 --installAgent --installDirectory "/opt360/electriccloud/electriccommander/" --dataDirectory "/opt360/electriccloud/electriccommander/" --agentPort 7814 --unixAgentUser qa --unixAgentGroup qa

The –parallelInstallName switch does work on the silent Install on windows and Linux also.

Have more questions?


Please sign in to leave a comment.