cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Starting & Stopping ThingWorx Analytics 8.1 (Native Linux Deployment)

Highlighted
Alexandrite

Starting & Stopping ThingWorx Analytics 8.1 (Native Linux Deployment)

Preface

 

In this blog post, we will discuss how to Start and Stop ThingWorx Analytics, as well as some other useful triaging/troubleshooting commands. This applies to all flavors of the native Linux installation of the Application.

 

In order to perform these steps, you will have to have sudo or ROOT access on the host machine; as you will have to execute a shell script and be able to view the outputs.

 

The example screenshots below were taken on a virtual CentOS 7 Server with a GUI as ROOT user.

 

 

Checking ThingWorx Analytics Server Application Status

 

1. Change directory to the installation destination of the ThingWorx Analytics (TWA) Application.

    1. In the screenshot below, the application is installed to the /opt/ThingWorxAnalyticsServer directory

 

2. In the install directory, there are a series of folders and files. You can use the ​ls​ command to see a list of files and folders in the installation directory.

    a. You will need to go navigate one more level down into the ./ThingWorxAnalyticsServer/bin​directory by using command ​cd ./bin

    b. As you can see above, we used the ​pwd​ command to verify that we are in the correct directory.

 

3. In the ./ThingWorxAnalyticsServer/bin directory, there should be three shell files: configure-apirouter.sh, configure-user.sh, and twas.sh

    a. To run a status check of the application, use the command ./twas.sh status

          i. This will provide a list of outputs, and a few warning messages. This is normal, see screenshot below: 

    b. You will have a series of services, which will have a green active (running) or red not active (stopped).

          i. List of services:

      • twas-results-ms.service - ThingWorx Analytics - Results Microservice
      • twas-data-ms.service - ThingWorx Analytics - Data Microservice
      • twas-analytics-ms.service - ThingWorx Analytics - Analytics Microservice
      • twas-profiling-ms.service - ThingWorx Analytics - Profiling Microservice
      • twas-clustering-ms.service - ThingWorx Analytics - Clustering Microservice
      • twas-prediction-ms.service - ThingWorx Analytics - PredictionMicroservice
      • twas-training-ms.service - ThingWorx Analytics - Training Microservice
      • twas-validation-ms.service - ThingWorx Analytics - Validation Microservice
      • twas-apirouter.service - ThingWorx Analytics - API Router
      • twas-edge-ms.service - ThingWorx Analytics - Edge Microservice

 

Starting and Stopping ThingWorx Analytics

 

If you encounter any errors or stopped services in the above, a good solution would be to restart the TWA Server application.

 

There are two methods to restart the application, one being the restart ​command, the other would be using the stop​ and ​start​ commands.

 

Method 1 - Restart Command:

 

1. In the same ./ThingWorxAnalyticsServer/bin​ ​directory, run the following command: ./twas.sh restart

    a. The output of a successful restart will look like the following:

2. The restart should only take a few seconds to complete

 

Method 2 - Stop / Start Commands:

 

1. In the same ./ThingWorxAnalyticsServer/bin ​directory, run the following command: ./twas.sh stop

2. After the application stops, run the following command: ./twas.sh start

 

Note: You can confirm the status of the TWA Server application by following the steps in the "Checking ThingWorx Analytics Server Application Status" section above.