Running the TIBCO Cloud™ Integration - Hybrid Agent as a Windows Service

Improve TIBCO Cloud Integration - Hybrid Agent reliability by registering the Hybrid Agent as a Windows Service. If the Windows server hosting the Hybrid Agent is shut down for any reason, Windows restarts the Hybrid Agent service when the server is restarted.

Note: Only a Hybrid Agent used for Hybrid Connectivity can be configured as a Windows Service. Hybrid Agents used to manage remote apps must be installed in a Kubernetes environment.

Considerations

Procedure

  1. Open a Windows Command Prompt as an Administrator. Administrator access is required to create Windows services.
  2. Set up the following environment variables. Be sure to set the values for TIBAGENT_CONFIG_DIR, TIBAGENT_EXECUTABLE, and TIBAGENT_LOG_FILE to match your environment. The TIBAGENT_SERVICE_NAME variable must be unique for each Agent running on the same machine.
    set TIBAGENT_CONFIG_DIR=C:\TIBCO\Agent\.tibagent
    set TIBAGENT_EXECUTABLE=C:\TIBCO\Agent\tibagent.exe
    set TIBAGENT_LOG_FILE=C:\TIBCO\Agent\logs\.tibagent\log-file.log
    set TIBAGENT_SERVICE_NAME=tibagent
    set TIBAGENT_SERVICE_DESCRIPTION="TIBCO Cloud Integration - Hybrid Agent"
  3. Configure the Hybrid Agent.
    %TIBAGENT_EXECUTABLE% configure agent --port 7816 --config-dir %TIBAGENT_CONFIG_DIR% yourAgentName
  4. Create the Windows Service for the Hybrid Agent.
    Important: The Windows Service must be created with an administrator user account and password.
    sc create %TIBAGENT_SERVICE_NAME% binpath= "%TIBAGENT_EXECUTABLE% start agent --log-file %TIBAGENT_LOG_FILE% yourAgentName" obj= adserver\administrator password= yourPassword
  5. Configure the Service Description. This step is optional.
    sc description %TIBAGENT_SERVICE_NAME% %TIBAGENT_SERVICE_DESCRIPTION%
  6. Run the tibagent Windows Service from the command line.
    sc start %TIBAGENT_SERVICE_NAME%
  7. To stop the tibagent Windows Service, enter the following on the command line.
    sc stop %TIBAGENT_SERVICE_NAME%
  8. To delete the tibagent Windows Service, enter the following on the command line.
    sc delete %TIBAGENT_SERVICE_NAME%