Starting and Stopping an OpenSearch Service

If you modify the opensearch.yml or jvm.options file, use these instructions to stop and restart the OpenSearch services.

On Microsoft Windows, the OpenSearch service is installed by the DPK setup script.

  1. Open a command prompt, and change directory to OSK_HOME/bin.

  2. To see the usage for the service command:

    opensearch-service
    opensearch-service.bat install|remove|start|stop|manager [SERVICE_ID]
  3. To stop and remove the OpenSearch service:

    opensearch-service.bat remove
  4. To start the service, run these commands from OSK_HOME/bin:

    opensearch-service.bat install
    opensearch-service.bat start

On Linux to start and stop the process:

  1. In a terminal window, change directory to OSK_HOME/bin.

  2. To start the OpenSearch process:

    nohup ./opensearch &
  3. To stop the process:

    1. Use this command to find the OpenSearch process ID:

      ps -ef | grep opensearch
    2. Use this command to stop the process, substituting the process ID for pid:

      kill <pid>