Start and Stop Fusion

This topic explains how to start and stop Fusion Server.

Define groups of services

The fusion.properties 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 don’t use it.

Here is the group.default definition in fusion.properties:

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.

To modify the default list of services

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
To define other lists of services (Unix)

You can define other lists of services by defining other group properties. For example, define this group property to start and stop services for Spark and SQL together:

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

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 don’t 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/4.1.x/bin.

Start required services

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

To start all required services

./fusion start

Tip
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.properties 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.

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:

    ./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.

Stop Fusion

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.

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

    cd /opt/fusion/4.1.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/4.1.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 fusion start
sudo systemctl fusion stop

Log files for Fusion services are found in directories under fusion/4.1.x/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/{version}/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 fusion/4.1.x/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{version}.x\bin.

Start required services

To start all required Fusion services as Java processes
fusion.cmd start
To start all required Fusion services as Windows services
start-services.cmd

Start services individually

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:

    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

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)

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

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 can’t access the system, see the Troubleshooting topic. Checking System State shows how to inspect Fusion services.