Troubleshooting ThingWorx Analytics Server
In the troubleshooting commands described below, the default installation directory is assumed to be the following:
C:\Program Files\ThingWorxAnalytics\Thingworx_Analytics_Server
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.
To Stop, Restart, Check Status, or List Components from the Command Line
1. On the Windows computer where your ThingWorx Analytics is installed, open the Windows PowerShell, or a Command Prompt, in Administrator mode.
2. Navigate to the installation bin directory:
C:\Program Files\ThingWorxAnalytics\Thingworx_Analytics_Server\bin
3. Use the twas.ps1 utility to run any of the following commands on the ThingWorx Analytics Server:
Stop the server: .\twas.ps1 stop
Restart the server: .\twas.ps1 restart
Check the status of the underlying components: .\twas.ps1 status
List the underlying components service: .\twas.ps1 list
To Restart, Start, or Stop the Server from the Start Menu
1. From the Windows Start menu, navigate to ThingWorx Analytics Server. Several shortcuts are displayed, including the following:
Restart – stops a running server and restarts it
Start – starts a server that is not running
Stop – stops a running server
2. Right click the desired shortcut option and select Run As Administrator to restart, start, or stop the entire server.
To Start, Restart, or Check the Status of a Service from Local Services
1. Navigate to the local services on your computer. The path to these services will vary based on your version of Windows. (Example: Administrative Tools > Services)
2. In the list of services, locate the desired twas service and select it. The following options are available:
Start a service that is not running: Click the Start option displayed on the left.
Stop a running service and restart it: Click the Restart option displayed on the left.
Check the status of a service: See the value of the Status column for a specific twas service
To Check Component Logs
Most component logs are available at the following path:
C:\Program Files\ThingWorxAnalytics\Thingworx_Analytics_Server\data\logs
Log information about ZooKeeper is available with a different file extension from the following path:
C:\Program Files\ThingWorxAnalytics\Thingworx_Analytics_Server\zookeeper\zookeeper.out
For more detailed information about component log files and about logging levels, see Component Log Files
Enable 8dot3 Short File Names in the Installation Directory
By default, Windows 8.3 file name creation is enabled on each system drive. 8dot3 file naming generates short aliases for longer file names that contain spaces. For example, a short alias for “Program Files” is created as “Progra~1.” If, for some reason, short file names have been disabled on the directory where you install Analytics Server, errors can occur. In some cases errors are reported in the install log. In other cases, the installation appears successful but errors are reported for individual services.
To determine if errors are caused by missing 8dot3 short file names, follow these steps to verify whether or not 8dot3 file name creation is enabled:
1. Open a command line prompt.
2. Navigate to the Analytics Server installation directory.
3. Execute the following command: dir /x
If 8dot3 file name creation is enabled, the resulting output should list both long and short file names.
If the above procedure shows that 8dot3 file naming is disabled, use the fsutil command to generate the necessary short file names. For information about specific errors related to 8dot3 file naming, and possible resolutions, see article CS300197 entitled, Windows Installer Error - "Error running cmd /c powershell...".
For additional information about 8dot3 file naming, see the Microsoft website article: Fsutil 8dot3name.
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.
Find a Windows Short Path File Name
Because Windows uses a short-path format for storing files, file paths sometimes change unexpectedly. In particular, when you are deleting and recreating TLS keystores or truststores, the short file paths can become out of sync. To determine the current short file path for a file:
1. Open a command prompt window.
2. Navigate to the parent directory of the file in question.
3. Run the following command:
for %A in (“<file name>”) do echo %~sA
4. Remember to change the file path in any properties file that references the file.
Was this helpful?