Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
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.
1. Change directory to the installation destination of the ThingWorx Analytics (TWA) Application.
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:
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.
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
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.