ThingWorx Analytics Installation > ThingWorx Analytics Linux Installation > Troubleshooting > Troubleshooting ThingWorx Analytics Server
  
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. Use the twas.sh utility to run any of the following commands on the ThingWorx Analytics Server:
Stop the server: /opt/ThingWorxAnalytics/ThingWorxAnalyticsServer/bin/twas.sh stop
Restarts the server: /opt/ThingWorxAnalytics/ThingWorxAnalyticsServer/bin/twas.sh restart
Check the status of the underlying components: /opt/ThingWorxAnalytics/ThingWorxAnalyticsServer/bin/twas.sh status
List the underlying components service: /opt/ThingWorxAnalytics/ThingWorxAnalyticsServer/bin/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 Edge Agent service name = twas-edge-ms):
systemctl restart twas-edge-ms
To Update the ThingWorx AppKey
1. Log into ThingWorx Composer, as an Administrator, and create a new AppKey. For more information, see the Application Keys section of the ThingWorx Foundation Help Center.
* 
The Application Key you provide to ThingWorx Analytics must be a key created by a user with Administrator privileges.
2. Open a terminal window as the root user.
3. Add the new AppKey to the system-environment-variables.properties file as follows:
In your installation directory, open the properties file at the following path:
/opt/ThingWorxAnalytics/ThingWorxAnalyticsServer/config/system-environment-variables.properties
In the open file, update the thingworx.application.key property with the new AppKey and save the file.
4. Restart the ThingWorx Analytics Server:
/opt/ThingWorxAnalytics/ThingWorxAnalyticsServer/bin/twas.sh restart
It might take several seconds for the Things in ThingWorx Foundation to refresh and reconnect.
To Check Component Logs
All component logs, except for the Edge Agent, are available at the following path:
/opt/ThingWorxAnalytics/ThingWorxAnalyticsServer/data/logs
To view log information about the Edge Agent, open a terminal window as the root user and enter the following command:
journalctl --unit twas-edge-ms | less
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