In this part of the Troubleshooting blog series, we will review the process on how to restart individual services essential to the ThingWorx Analytics Application within the Virtual Machine Appliance.

 

Services have stopped, and I cannot run my Analytics jobs!

In some cases, we have had users encounter issues where a system or process has halted and they are unable to proceed with their tasks. This can be due to a myriad of reasons, ranging from OS hanging issues to memory issues with certain components.

 

As we covered earlier in Part II, the ThingWorx Analytics Application is installed in a CentOS (Linux) Operating System. As with most Linux Operating Systems, you have the ability to manually check and restart processes as needed.

 

Steps to Restart Services


With how the Application is installed and configured, the services for functionality should auto start when you boot up the VM. You will have to verify that the Appliance is functional by running your desired API call.

 

If a system is not functioning as expected, you will receive an error in your output when you POST an API call. Some errors are very specific and you can search the Knowledge Database for any existing Knowledge Articles that may solve the issue.

 

For error messages that do not have an existing article, you may want to attempted the following

 

Method 1:

 

If you are encountering issues, and are unsure what process is not working correctly, we would recommend a full Application restart. This involves restarting the Virtual Machine Appliance via the command line terminal.

 

We would recommend that you use the following command, as root user or using SUDO, as this is known as a “Graceful restart”

  • sudo reboot -h now

 

This will restart the virtual machine safely, and once you are back up and running you can run your API calls to verify functionality. This should resolve any incremental issues you may have faced.

 

Method 2:

 

If you want to restart an individual service, there is a particular start order that needs to be followed to make sure the Application is operating as expected.

 

The first step is check what services are not running, you can use the following command to check what is running and its current status:

  • service –status-all

 

The services you are looking for are the following:

  • Zookeeper
  • PostgreSQL Server
  • GridWorker(s)
  • Tomcat

 

If a particular service is not on the running list, you will have to manually start them by using the service start command.

  • service [name of service] start
    • e.g. service tomcat start
    • You may be prompted for the root password

 

You can verify that the services are operating by running the status check command as described above.

 

If you need to restart all services, we have a specific start order, this is important to do as there are some dependencies such as Postgres for the GridWorker(s) and Tomcat to use.

 

The start order is as follows:

  1. Zookeeper
  2. PostgreSQL Server
  3. GridWorker(s)
  4. Tomcat

 

After completing the restart, and verifying that the services are running, run your desired API call.