Start and Stop CleanSpeak

1. Start and Stop CleanSpeak

If you using self-hosting CleanSpeak, you may need to start or stop CleanSpeak periodically. If you find yourself in this situation, you’ll be glad you have the know-how.

If you are using CleanSpeak Cloud, these instructions do not apply to you.

Note that you MUST start the CleanSpeak Search Engine before starting the Management Interface or Webservice. You should also shutdown the Search Engine last. CleanSpeak utilizes the Search Engine and database for persisting and retrieving content.

The following examples will make the assumption that all of the services are running on the same server. Based upon how you have installed CleanSpeak you may or may not have all of the services running on the same server.

The macOS and Windows instructions assume an installation directory of /usr/local/cleanspeak and \cleanspeak respectively. Please adjust to your specific installation directory.

1.1. Linux

When you install CleanSpeak using our Debian or RPM packages a service is registered. It is recommended you utilize these services to start and stop CleanSpeak. Starting in CleanSpeak version 3.4.1 if the version of Linux supports systemd you may use the systemctl command as well to manage services.

The service names are as follows:

  • cleanspeak-search-engine

  • cleanspeak-webservice

  • cleanspeak-management-interface

Start CleanSpeak
$ sudo service cleanspeak-search-engine start
$ sudo service cleanspeak-webservice start
$ sudo service cleanspeak-management-interface start
Stop CleanSpeak
$ sudo service cleanspeak-management-interface stop
$ sudo service cleanspeak-webservice stop
$ sudo service cleanspeak-search-engine stop

If you’d like to use the systemctl command instead, the syntax is similar to the service command. For example, to check the status, stop and then start the CleanSpeak Management Interface using the systemctl command

Check Status, then Stop and Start CleanSpeak
$ systemctl status cleanspeak-management-interface.service
$ systemctl stop cleanspeak-management-interface.service
$ systemctl start cleanspeak-management-interface.service

If you’d prefer to use the native Elasticsearch and Tomcat scripts you may follow the macOS instructions, the same scripts may be executed on Linux.

1.2. macOS

Start and Stop services using the native Elasticsearch and Tomcat scripts

Prior to version 3.6.0 the Apache Tomcat directory will be named apache-tomcat-8.0.12 instead of apache-tomcat and the ElasticSearch Engine directory will be named elasticsearch-1.3.4 instead of elasticsearch.

Start CleanSpeak
$ /usr/local/cleanspeak/cleanspeak-search-engine/elasticsearch/bin/elasticsearch
$ /usr/local/cleanspeak/cleanspeak-webservice/apache-tomcat/bin/catalina.bat start
$ /usr/local/cleanspeak/cleanspeak-management-interface/apache-tomcat/bin/catalina.bat start
Stop CleanSpeak
$ /usr/local/cleanspeak/cleanspeak-management-interface/apache-tomcat/bin/catalina.bat stop
$ /usr/local/cleanspeak/cleanspeak-webservice/apache-tomcat/bin/catalina.bat stop

Elasticsearch should be stopped last. If you started Elasticsearch using the elasticsearch script then you may simply kill the terminal where the service is running to initiate shutdown.

1.3. Windows

Start and Stop services using the native Elastic and Tomcat scripts

Prior to version 3.6.0 the Apache Tomcat directory will be named apache-tomcat-8.0.12 instead of apache-tomcat and the ElasticSearch Engine directory will be named elasticsearch-1.3.4 instead of elasticsearch.

Start CleanSpeak
> \cleanspeak\cleanspeak-search-engine\elasticsearch\bin\elasticsearch.bat
> \cleanspeak\cleanspeak-webservice\apache-tomcat\bin\catalina.bat start
> \cleanspeak\cleanspeak-management-interface\apache-tomcat\bin\catalina.bat start
Stop CleanSpeak
> \cleanspeak\cleanspeak-management-interface\apache-tomcat\bin\catalina.bat stop
> \cleanspeak\cleanspeak-webservice\apache-tomcat\bin\catalina.bat stop

Elasticsearch should be stopped last. If you started Elasticsearch using the elasticsearch.bat script then you may simply close the command window where the service is running to initiate shutdown.

Start and Stop services using Windows Services

We also provide support for running CleanSpeak as a Windows service.

Register Windows Services
> \cleanspeak\cleanspeak-search-engine\elasticsearch\bin\CleanSpeakSearchEngine.exe /install
> \cleanspeak\cleanspeak-webservice\apache-tomcat\bin\CleanSpeakWebservice.exe /install
> \cleanspeak\cleanspeak-management-interface\apache-tomcat\bin\CleanSpeakManagementInterface.exe /install
Unregister Windows Services
> \cleanspeak\cleanspeak-management-interface\apache-tomcat\bin\CleanSpeakManagementInterface.exe /uninstall
> \cleanspeak\cleanspeak-webservice\apache-tomcat\bin\CleanSpeakWebservice.exe /uninstall
> \cleanspeak\cleanspeak-search-engine\elasticsearch\bin\CleanSpeakSearchEngine.exe /uninstall
Start Services
> net start CleanSpeakSearchEngine
> net start CleanSpeakWebservice
> net start CleanSpeakManagementInterface
Stop Services
> net stop CleanSpeakManagementInterface
> net stop CleanSpeakWebservice
> net stop CleanSpeakSearchEngine