Product Selector

Fusion 5.9
    Fusion 5.9

    Start or Stop Fusion

    This topic explains how to start and stop Fusion Server and its services using the scripts in the bin directory below the Fusion home directory:

    • /opt/fusion/latest.x/bin (Unix)

    • C:\lucidworks\fusion\latest.x\bin (Windows)

    Command summary

    You can control all Fusion services at once under the management of the Fusion agent, or you can control services individually.

    How to control all services using the Fusion agent:
    • Unix. /opt/fusion/latest.x/bin/fusion <command>

    • Windows. C:\lucidworks\fusion\latest.x\bin\fusion.cmd <command>

    How to control individual services:
    • Unix. /opt/fusion/latest.x/bin/<servicename> <command>

      For example: /opt/fusion/latest.x/bin/proxy restart

    • Windows. C:\lucidworks\fusion\latest.x\bin\<servicename>.cmd <command>

      For example: C:\lucidworks\fusion\latest.x\bin\proxy.cmd restart

    When starting services individually, start Zookeeper first.

    The commands below can be issued to the fusion/fusion.cmd script to issue the command to all services in the correct sequence, or they can be issued to an individual service.

    start

    Start one or all Fusion services.

    status

    Display the status of one or all Fusion services.

    restart

    Restart one or all Fusion services.

    stop

    Stop one or all Fusion services.

    run

    Start one or all Fusion services in the foreground.

    run-in-shell (Unix only)

    (Fusion 4.2+ only.)

    Start an individual service using Bash’s exec function, which allows the service to assume the shell process’s PID. See Run Fusion in shell mode below.

    Define groups of services

    The fusion.cors (fusion.properties in Fusion 4.x) file includes the property definition group.default. This property defines the Fusion services to start and stop by default (if no property is named in the start or stop command).

    The default list of services out-of-the-box is also the minimum set of services, with the exception of the log-shipper service, which you can remove if you do not use it.

    Here is the group.default definition in fusion.cors (fusion.properties in Fusion 4.x):

    In Fusion 4.1+.

    group.default = zookeeper, solr, api, connectors-classic, connectors-rpc, proxy, webapps, admin-ui, log-shipper

    With the exception of the log-shipper service, these are all required services. Even if only using RPC connectors, the connectors-classic service is required. The log-shipper service is required to use the Log Shipper.

    In Fusion 4.0.x.

    group.default = zookeeper, solr, api, connectors-rpc, connectors-classic, admin-ui, proxy, webapps

    Even if only using RPC connectors, the connectors-classic service is required.

    How to modify the default list of services

    In Fusion 4.1+.

    Edit the group.default property, for example, to include Spark and SQL related services:

    group.default = zookeeper, solr, api, connectors-classic, connectors-rpc, proxy, webapps, admin-ui, log-shipper, spark-master, spark-worker, sql
    In Fusion 4.0.x.

    Edit the group.default property, for example, to include Spark related services:

    group.default = zookeeper, solr, api, connectors-classic, connectors-rpc, proxy, webapps, admin-ui, spark-master, spark-worker

    How to define other lists of services (Unix)

    You can define other lists of services by defining other group properties.

    In Fusion 4.1+.

    For example, define this group property to start and stop services for Spark and SQL together:

    group.spark-only = spark-master, spark-worker, sql
    In Fusion 4.0.x.

    For example, define this group property to start and stop services for Spark together:

    group.spark-only = spark-master, spark-worker

    Define this group property to start and stop services for classic and RPC connectors together:

    group.connectors = connectors-classic, connectors-rpc

    Unix

    Start and stop Fusion on Unix.

    Start Fusion

    All Fusion start scripts must be executed by a user who has permissions to read and write to the directories where Fusion is installed. These scripts do not need to be run as root (or sudo), nor should they be. Use a suitable user, or create a new one, and then ensure that it owns the directory where Fusion resides, (for example, C:\lucidworks).

    Give the commands that follow from the directory fusion/latest.x/bin.

    Start required services

    Start the required services that are defined in the group.default property.

    How to start all required services

    ./fusion start

    This is equivalent to ./fusion start default. You can omit the group name default.

    Start a group of services

    You can start a group of services together. Reference the property in fusion.cors (fusion.properties in Fusion 4.x) that defines the group.

    Examples of when this is useful are:

    • Spark and SQL. The spark-master, spark-worker, and sql services are interdependent and should be started and stopped together.

      ./fusion start spark-master spark-worker sql
    • Classic and RPC connectors. RPC connectors require both the connectors-classic and connectors-rpc services to be running.

      ./fusion start connectors-classic connectors-rpc

    Start services individually

    You can start services individually.

    How to start services individually
    • Fusion UI service:

      ./admin-ui start

    • API services:

      ./api start

    • Classic Connectors services:

      ./connectors-classic start

    • RPC Connectors services:

      ./connectors-rpc start

    • Log shipper service (Fusion 4.1+ only):

      ./log-shipper start

    • Proxy:

      ./proxy start

    • Solr:

      ./solr start

    • Spark Master:

      ./spark-master start

    • Spark Worker:

      ./spark-worker start

    • SQL service:

      ./sql start

    • Web Apps:

      ./webapps start

    • ZooKeeper:

      ./zookeeper start

    For information about default ports, see Default Ports.

    Run Fusion in the foreground

    To run Fusion or any of its services in the foreground, use the run command-line argument in place of start.

    Run Fusion in shell mode

    This section applies to Fusion 4.2+ only.

    To start any of Fusion’s services using Bash’s exec function, which allows the service to assume the shell process’s PID, use the run-in-shell command-line argument in place of start or run. The run-in-shell argument can only be used to start one service at a time.

    Examples

    ./fusion run-in-shell zookeeper

    or

    ./zookeeper run-in-shell

    Shell mode is particularly useful in containerized environments, which generally assume that only one process runs per container and that process is "process 0", that is, the initial process invoked within the container, not a separate spawned process.

    Stop Fusion

    How to stop Fusion services

    To stop Fusion or any of its services, use the command above with the stop command-line argument in place of start, for example:

    ./solr stop

    Using systemd to manage processes

    On Red Hat Enterprise Linux, CentOS 7 and newer, and Ubuntu 15.04 LTS and newer, we support using the operating system-provided systemd for process management.

    Launching Fusion at system start

    You can configure systemd to launch Fusion when your system starts.

    How to launch Fusion at system start:
    1. Change your working directory to Fusion’s systemd directory, for example:

      cd /opt/fusion/latest.x/init/systemd
    2. Edit fusion.service to provide correct values for the FUSION_HOME and JAVA_HOME environment variables.

    3. Stop Fusion if it is already running:

      /opt/fusion/latest.x/bin/fusion stop
    4. Create the systemd management file, which launches Fusion under systemd management:

      sudo bash install.sh

    Starting and stopping Fusion

    You can use the systemctl command to start and stop Fusion:

    sudo systemctl start fusion
    sudo systemctl stop fusion

    Log files for Fusion services are found in directories under https://FUSION_HOST:FUSION_PORT/var/log.

    Using Ubuntu Upstart to manage processes

    Under Ubuntu 12.04 LTS through Ubuntu 14.10, we support using Upstart for process management. This requires Fusion to be installed in the /opt/lucidworks/ directory.

    To configure upstart, run the following commands:

    $ cd /opt/lucidworks/fusion/latest/init/upstart
    $ sudo bash install.sh

    If this complains with no JAVA_HOME set, replace sudo with sudo -E. Then you can use the service command to control the server:

    $ sudo service fusion-solr start
    $ sudo service fusion-api start
    $ sudo service fusion-connectors start
    $ sudo service fusion-ui start

    and similarly use stop and status.

    Log files for Fusion services are found in directories under https://FUSION_HOST:FUSION_PORT/var/log.

    Windows

    Start and stop Fusion on Windows.

    Start Fusion

    All Fusion start scripts must be executed by a user who has permissions to read and write to the directories where Fusion is installed. Ensure that the user owns the directory where Fusion resides (for example, C:\lucidworks).

    Give the commands that follow from the directory fusion\latest.x\bin.

    Start required services

    How to start all required Fusion services as Java processes

    fusion.cmd start

    How to start all required Fusion services as Windows services

    start-services.cmd

    Start services individually

    How to start specific services as Java processes
    • UI service:

      admin-ui.cmd start

    • API services:

      api.cmd start

    • Classic Connectors services:

      connectors-classic.cmd start

    • RPC Connectors services:

      connectors-rpc.cmd start

    • Log shipper service (Fusion 4.1+ only):

      log-shipper.cmd start

    • Proxy:

      proxy.cmd start

    • Solr:

      solr.cmd start

    • Spark Master:

      spark-master.cmd start

    • Spark Worker:

      spark-worker.cmd start

    • SQL service:

      sql.cmd start

    • Web Apps:

      webapps.cmd start

    • ZooKeeper:

      zookeeper.cmd start

    For information about default ports, see Default Ports.

    Run Fusion in the foreground

    To run Fusion or any of its services in the foreground, use the run command-line argument in place of start, for example:

    connectors.cmd run

    Stop Fusion

    How to stop all Fusion services
    • fusion.cmd stop (Stop all Fusion services, if they are running as Java processes)

    • stop-services.cmd (Stop all Fusion services, if they are running as Windows services)

    How to stop a specific service running as a Java process

    To stop a specific Fusion service that is running as a Java process, use the command above with the stop command-line argument in place of start, for example:

    connectors.cmd stop

    Run Fusion with a service account

    This example assumes the following:

    Field Value

    Account

    FUSION_SVC

    Domain

    qe

    Installation directory

    C:\fusion\<version>

    Server

    EC2AMAZ-79FD9JL

    1. As an administrator, create the service account, and install it to the server you want to use for Fusion:

      C:\Users\Administrator>New-ADServiceAccount -Name "FUSION_SVC" -RestrictToSingleComputer
      C:\Users\Administrator>Add-ADComputerServiceAccount -Identity EC2AMAZ-79FD9JL -ServiceAccount "FUSION_SVC"
      C:\Users\Administrator>Install-ADServiceAccount -Identity "FUSION_SVC"
      C:\Users\Administrator>Test-ADServiceAccount "FUSION_SVC"
      C:\Users\Administrator>Get-ADServiceAccount "FUSION_SVC"
    2. Run install-services.cmd as a local administrator:

      C:\Users\Administrator> C:\fusion\4.2.2\bin\install-services.cmd
      ECHO is off.
                    Thank you for choosing
       ====================================================
      "  _            _     _                    _         "
      " | |          (_)   | |                  | |        "
      " | |_   _  ___ _  __| |_      _____  _ __| | _____  "
      " | | | | |/ __| |/ _` \ \ /\ / / _ \| '__| |/ / __| "
      " | | |_| | (__| | (_| |\ V  V / (_) | |  |   <\__ \ "
      " |_|\__._|\___|_|\__._| \_/\_/ \___/|_|  |_|\_\___/ "
       ====================================================
      You will now be prompted for the username and password of the Windows account that will launch Fusion.
      IMPORTANT NOTE 1: When prompted 'Set Account rights to allow log on as a service', enter 'Y'
      IMPORTANT NOTE 2: You must enter the username in domain\username format.
      .... Starting winsw (https://github.com/kohsuke/winsw) service wrapper utility ...
      2019-06-12 17:37:21,737 INFO  - Starting ServiceWrapper in the CLI mode
      Username: EC2AMAZ-79FD9JL\Administrator
      Password: ************
      Set Account rights to allow log on as a service (y/n)?: n
      2019-06-12 17:38:02,970 INFO  - Completed. Exit code is 0
    3. Grant the service account full access to Fusion:

      C:\Users\Administrator>$path = "C:\fusion"
      $Acl = Get-Acl "$path"
      $permission = "qe\FUSION_SVC$", "FullControl", "ContainerInherit,ObjectInherit", "None", "Allow"
      $accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission
      $Acl.SetAccessRule($accessRule)
      Set-Acl "$path" $Acl
      Get-Acl "$path" | fl
    4. Modify the Lucidworks Fusion service to use the service account.

      1. Open Administrative Tools > Services on your Windows server.

      2. Select the Lucidworks Fusion service.

      3. Open the Properties > Log On dialog.

      4. Change the service user account to the FUSION_SVC user account.

        Only the account name is required. The password is managed by Windows.

    Access Fusion after startup

    After Fusion services have started, you can open the Fusion UI in a web browser at http://localhost:8764/ (replace localhost with your server name or IP address if necessary).

    The first time you access Fusion, you must set the password for the user admin and agree to the Fusion Licensing Agreement (which contains terms of service). This is followed by an optional registration step. After this, Fusion displays the Fusion launcher (the page from which you can open apps).

    If you cannot access the system, see the Troubleshooting topic. Checking System State shows how to inspect Fusion services.