Windows Fusion service install scripts for 2.4.x

A frequently asked question is how to run Fusion as a Windows service, or how to ensure it stays running if the user who started it logs off. We addressed this need by re-packaging the Fusion configuration and bin scripts for Windows based development and production servers. 

The services are dependent upon each other to avoid startup memory contention issues.

  • You can log out of virtual desktop session, and the services will stay up.
  • You can restart the machine and the services will automatically come back up.
  • If a service dies, it will automatically try to restart it.

Steps to install and use the updated files 

1. Save a copy of the %FUSION_HOME%\bin\ directory.

2. Do an "Extract Here" of the attached file in a temporary location.

3. Replace the existing bin folder with the one provided. There will be additional CMD files:

  • Install services (%FUSION_HOME%\bin\install-services.cmd)
  • Unistall services (%FUSION_HOME%\bin\uninstall-services.cmd)
  • Start the services (%FUSION_HOME%\bin\start-services.cmd start)
  • Stop the services (%FUSION_HOME%\bin\stop-services.cmd stop)

4. Replace the FUSION_HOME/conf/config.cmd file with the one provided in conf/config.cmd

2. Open a command line as administrator
 
3. Cd to %FUSION_HOME%\bin
 
4. Run install-services.cmd. Specify a username/password and path to the your Java home.


5. Verify that the installation completed successfully. You should see 7 Fusion services in the services manager.
 
 
You can remove the installed services by running unistall-services.cmd through the command line as administrator.

Manually Starting / Stopping Fusion services
 
1. Make sure that the install-services.cmd was run successfully

2. Open a command line
 
3. Cd to %FUSION_HOME%\bin

4. start-services.cmd starts all Fusion services

5. stop-services.cmd stops all Fusion services


 

Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    Edwin Stauthamer

    Hi,

    This is what was I was waiting for. But when I ran the script (opened the CMD as Admin) The result was the following.

    A couple of services manual and a coupe automatic. I assume that Zookeeper must be the first to start and then at least Solr. But both are Manual. 

    Below the output of the command window after executing the command:

     

    ---------------

    D:\fusion-2.4.1-ing\bin>install-services ".\Administrator" "7g53DVr2je4v4Nh"
    ===================================
    - Fusion home: D:\fusion-2.4.1-ing
    - Windows account that runs this service: ".\Administrator"
    - Java home: C:\Program Files\Java\jre1.8.0_101
    - Jdk home:
    - Jre home:
    ===================================
    Next app is zookeeper
    Can't open service!
    OpenService(): The specified service does not exist as an installed service.

    Service "zookeeper" installed successfully!
    Set parameter "AppDirectory" for service "zookeeper".
    Set parameter "DisplayName" for service "zookeeper".
    Set parameter "Description" for service "zookeeper".
    Set parameter "AppStdout" for service "zookeeper".
    Set parameter "AppStderr" for service "zookeeper".
    Reset parameter "AppStdoutCreationDisposition" for service "zookeeper" to its de
    fault.
    Reset parameter "AppStderrCreationDisposition" for service "zookeeper" to its de
    fault.
    Set parameter "AppRotateFiles" for service "zookeeper".
    Set parameter "AppRotateOnline" for service "zookeeper".
    Set parameter "AppRotateSeconds" for service "zookeeper".
    Set parameter "AppRotateBytes" for service "zookeeper".
    Set parameter "AppEnvironmentExtra" for service "zookeeper".
    The "Log on as a service" right was granted to account .\Administrator.
    Set parameter "ObjectName" for service "zookeeper".
    Set parameter "Start" for service "zookeeper".
    Next app is solr
    Can't open service!
    OpenService(): The specified service does not exist as an installed service.

    Service "solr" installed successfully!
    Set parameter "AppDirectory" for service "solr".
    Set parameter "DisplayName" for service "solr".
    Set parameter "Description" for service "solr".
    Set parameter "AppStdout" for service "solr".
    Set parameter "AppStderr" for service "solr".
    Reset parameter "AppStdoutCreationDisposition" for service "solr" to its default
    .
    Reset parameter "AppStderrCreationDisposition" for service "solr" to its default
    .
    Set parameter "DependOnService" for service "solr".
    Set parameter "AppRotateFiles" for service "solr".
    Set parameter "AppRotateOnline" for service "solr".
    Set parameter "AppRotateSeconds" for service "solr".
    Set parameter "AppRotateBytes" for service "solr".
    Set parameter "AppEnvironmentExtra" for service "solr".
    Set parameter "ObjectName" for service "solr".
    Set parameter "Start" for service "solr".
    Next app is api
    Can't open service!
    OpenService(): The specified service does not exist as an installed service.

    Service "api" installed successfully!
    Set parameter "AppDirectory" for service "api".
    Set parameter "DisplayName" for service "api".
    Set parameter "Description" for service "api".
    Set parameter "AppStdout" for service "api".
    Set parameter "AppStderr" for service "api".
    Reset parameter "AppStdoutCreationDisposition" for service "api" to its default.

    Reset parameter "AppStderrCreationDisposition" for service "api" to its default.

    Set parameter "DependOnService" for service "api".
    Set parameter "AppRotateFiles" for service "api".
    Set parameter "AppRotateOnline" for service "api".
    Set parameter "AppRotateSeconds" for service "api".
    Set parameter "AppRotateBytes" for service "api".
    Set parameter "AppEnvironmentExtra" for service "api".
    Set parameter "ObjectName" for service "api".
    Set parameter "Start" for service "api".
    Next app is connectors
    Can't open service!
    OpenService(): The specified service does not exist as an installed service.

    Service "connectors" installed successfully!
    Set parameter "AppDirectory" for service "connectors".
    Set parameter "DisplayName" for service "connectors".
    Set parameter "Description" for service "connectors".
    Set parameter "AppStdout" for service "connectors".
    Set parameter "AppStderr" for service "connectors".
    Reset parameter "AppStdoutCreationDisposition" for service "connectors" to its d
    efault.
    Reset parameter "AppStderrCreationDisposition" for service "connectors" to its d
    efault.
    Set parameter "DependOnService" for service "connectors".
    Set parameter "AppRotateFiles" for service "connectors".
    Set parameter "AppRotateOnline" for service "connectors".
    Set parameter "AppRotateSeconds" for service "connectors".
    Set parameter "AppRotateBytes" for service "connectors".
    Set parameter "AppEnvironmentExtra" for service "connectors".
    Set parameter "ObjectName" for service "connectors".
    Set parameter "Start" for service "connectors".
    Next app is ui
    Can't open service!
    OpenService(): The specified service does not exist as an installed service.

    Service "ui" installed successfully!
    Set parameter "AppDirectory" for service "ui".
    Set parameter "DisplayName" for service "ui".
    Set parameter "Description" for service "ui".
    Set parameter "AppStdout" for service "ui".
    Set parameter "AppStderr" for service "ui".
    Reset parameter "AppStdoutCreationDisposition" for service "ui" to its default.
    Reset parameter "AppStderrCreationDisposition" for service "ui" to its default.
    Set parameter "AppRotateFiles" for service "ui".
    Set parameter "AppRotateOnline" for service "ui".
    Set parameter "AppRotateSeconds" for service "ui".
    Set parameter "AppRotateBytes" for service "ui".
    Set parameter "DependOnService" for service "ui".
    Set parameter "AppEnvironmentExtra" for service "ui".
    Set parameter "ObjectName" for service "ui".
    [SC] ChangeServiceConfig SUCCESS
    Next app is spark-master
    Can't open service!
    OpenService(): The specified service does not exist as an installed service.

    Service "spark-master" installed successfully!
    Set parameter "AppDirectory" for service "spark-master".
    Set parameter "DisplayName" for service "spark-master".
    Set parameter "Description" for service "spark-master".
    Set parameter "AppStdout" for service "spark-master".
    Set parameter "AppStderr" for service "spark-master".
    Reset parameter "AppStdoutCreationDisposition" for service "spark-master" to its
    default.
    Reset parameter "AppStderrCreationDisposition" for service "spark-master" to its
    default.
    Set parameter "AppRotateFiles" for service "spark-master".
    Set parameter "AppRotateOnline" for service "spark-master".
    Set parameter "AppRotateSeconds" for service "spark-master".
    Set parameter "AppRotateBytes" for service "spark-master".
    Set parameter "AppEnvironmentExtra" for service "spark-master".
    Set parameter "ObjectName" for service "spark-master".
    [SC] ChangeServiceConfig SUCCESS
    Next app is spark-worker
    Can't open service!
    OpenService(): The specified service does not exist as an installed service.

    Service "spark-worker" installed successfully!
    Set parameter "AppDirectory" for service "spark-worker".
    Set parameter "DisplayName" for service "spark-worker".
    Set parameter "Description" for service "spark-worker".
    Set parameter "AppStdout" for service "spark-worker".
    Set parameter "AppStderr" for service "spark-worker".
    Reset parameter "AppStdoutCreationDisposition" for service "spark-worker" to its
    default.
    Reset parameter "AppStderrCreationDisposition" for service "spark-worker" to its
    default.
    Set parameter "AppRotateFiles" for service "spark-worker".
    Set parameter "AppRotateOnline" for service "spark-worker".
    Set parameter "AppRotateSeconds" for service "spark-worker".
    Set parameter "AppRotateBytes" for service "spark-worker".
    Set parameter "AppEnvironmentExtra" for service "spark-worker".
    Set parameter "ObjectName" for service "spark-worker".
    [SC] ChangeServiceConfig SUCCESS

    D:\fusion-2.4.1-ing\bin>

    ----------------

  • 0
    Avatar
    Robert Lucarini

    Hi Edwin, 

    The Spark services can start independently from the other Fusion services so it made sense to have those start automatically. The UI service starts the Fusion services in the correct order so it made sense just to have that set to automatic. Hope this helps.

     

     

Please sign in to leave a comment.
Powered by Zendesk