Troubleshooting ThingWorx Analytics Server
The Linux version of ThingWorx Analytics installs and configures its components as Linux systemd services.
After the installation, several basic utility scripts and commands are available to troubleshoot the application, when necessary.
In the troubleshooting commands described below, the default installation directory is assumed to be the following:
/opt/ThingWorxAnalytics/ThingWorxAnalyticsServer
If your installation directory is different, for example because you’ve upgraded from a previous release, adjust the commands accordingly. For more information, see Upgrade from an Earlier Version.
* 
Administration of the ThingWorx Analytics Server requires installation user access (in root mode).
To Stop, Restart, Check Status, or List Components
1. Open a terminal window as the root user.
2. Navigate to the installation bin directory:
/opt/ThingWorxAnalytics/ThingWorxAnalyticsServer/bin
3. Use the twas.sh utility to run any of the following commands on the ThingWorx Analytics Server:
Stop the server: ./twas.sh stop
Restart the server: ./twas.sh restart
Check the status of the underlying components: ./twas.sh status
List the underlying components service: ./twas.sh list
To Restart a Single Service
1. Open a terminal window as the root user.
2. To find the name of the service you want to restart, enter the following list command:
/opt/ThingWorxAnalytics/ThingWorxAnalyticsServer/bin/twas.sh list
3. Enter the following command to restart a specific service (for example, the service name of the ThingWorx Adapter is twas-twx-adapter):
systemctl restart twas-twx-adapter
To Check Component Logs
Most component logs are available at the following path:
/opt/ThingWorxAnalytics/ThingWorxAnalyticsServer/data/logs
Log information about ZooKeeper is available with a different file extension from the following path:
/opt/ThingWorxAnalytics/ThingWorxAnalyticsServer/zookeeper/zookeeper.out
For more detailed information about component log files and about logging levels, see Component Log Files
To Resolve Executable Permissions
If the installer file does not have the necessary executable permissions, a Permission Denied error will appear when you try to run it. To manually resolve this permissions issue, follow the steps below.
1. Open a terminal window as the root user.
2. Navigate to the location where you saved the extracted files when you downloaded the installer media.
3. Run the following command to provide executable permission to the ThingWorxAnalytics-<n.n.n>-linux-x64-installer.run installer file:
chmod 777 ThingWorxAnalytics-<n.n.n>-linux-x64-installer.run
To Resolve a ZooKeeper TLS Connection
If the Keystore or Truststore file paths are entered incorrectly during Analytics Server installation, the installation will appear to complete successfully but the server will not function properly. When you try to connect to your Analytics Server from the Settings page in Analytics Builder, or when you try to run any jobs, these actions will not run successfully. To diagnose and resolve the issue:
1. Navigate to the component log files for Analytics Server. These log files are located in the ThingWorxAnalyticsServer/data/logs folder of your installation directory.
2. Open one of the following files:
async.log
worker.log
3. Look for a ZooKeeper stack trace error that contains the tag SSLContextException.
4. If this error is present, check for the correct Keystore or Truststore file path.
5. Rerun the Analytics Server installer to repair the installation.
Was this helpful?