Enabling Zookeeper as Windows Service

This section describes the procedure for enabling Zookeeper as a Windows service. Please follow the following steps:

  1. Download nssm-2.24.zip file from the path mentioned in the source field of Apache SOLR Requirements and unzip it.
  2. Copy nssm.exe from nssm-2.24\win64 to <zookeeper_install_dir >\bin.
  3. Go to the bin folder i.e., < zookeeper_install_dir >\bin and open the Command Prompt as Administrator.
  4. Execute the command below:
    nssm install zookeeper
  5. The window below will be displayed.
    Figure 1. Enabling Zookeeper as Windows Service
    A screenshot of a computer Description automatically generated
  6. Click Application tab and enter the information as mentioned below:
    Path: <zookeeper_install_dir> \bin\zkServer.cmd
     Startup Directory: <zookeeper_install_dir> \bin
    Figure 2. Enabling Zookeeper as Windows Service (cont.)
    A screenshot of a computer Description automatically generated
  7. Click Details tab and enter the information as displayed in the image below:
    Figure 3. Enabling Zookeeper as Windows Service (cont.)
    A screenshot of a computer Description automatically generated
  8. Click Install Service.

    Upon successful installation, the following message will appear.

    Figure 4. Enabling Zookeeper as Windows Service (cont.)
  9. Press Win+R, type services.msc and press OK.
    Figure 5. Enabling Zookeeper as Windows Service (cont.)
    A screenshot of a computer error Description automatically generated
  10. Search for zookeeper service and click on zookeeper service.
  11. Click Start the service on the left panel to start the service.
  12. If the services start without any error or warning pop-up means zookeeper is installation is success. Else change the clientPort and restart again.
    Figure 6. Enabling Zookeeper as Windows Service (cont.)
    A screenshot of a computer Description automatically generated