# Troubleshooting

> This page provides an overview of common errors and mistakes that can occur during Insights installation, and potential methods to avoid or remedy them.

This page provides an overview of common errors and mistakes that can occur during Insights installation, and potential methods to avoid or remedy them.

To improve the response time and efficency of the support team, make sure to find out how to capture logs if needed to debug by in [Capturing logs](https://docs.uipath.com/insights/standalone/2023.10/user-guide/log-collector "The Log Collector tool is a script that collects Looker logs that are located in multiple places. The script generates a zip file with most logs needed to debug the looker portion of insights by the support team.") page.

:::important
Be sure that you have followed the [Insights Installation](https://docs.uipath.com/insights/standalone/2023.10/user-guide/insights-installation#installation) instructions closely.
:::

## Configuring Log Rules

If logs aren't flowing in the intended pattern (ie all logs, or only last logs or error logs), make sure your configuration is correct.

## Certificate Errors

* If using **self-signed certificates**, you must use the FQDN for your server (i.e. `insights.corp.uipath.com` not `insights`).
* The Orchestrator certificate must be placed in the **Local Machine Trusted Root** store on the Insights machine.
* If you are encountering errors when trying to change your Insights certificate, make sure to follow the instructions provided in [Updating Your Insights Certificate](https://docs.uipath.com/insights/standalone/2023.10/user-guide/modifying-insights-configurations#updating-the-portal-certificate-in-iis).
* The Insights certificate must be placed in the **Local Machine Trusted Root** store on the Orchestrator machine.
  :::note
  If you are generating a self-signed certificate for Insights manually, please make sure it is marked as **exportable** with the private key and imported into the Personal store.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/insights/insights-screenshot-of-the-certificate-import-wizard-157500-dc25b496-a1112ed8.webp)
  :::

## Changing the Insights Language

Selecting the Insights language is done from the Orchestrator tenant settings. All users in that tenant share the same language.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/insights/insights-screenshot-of-the-language-field-in-uipath-orchestrator-157676-ccd2373d-364c3b45.webp)

## TLS Errors

### The specified domain does not exist or cannot be contacted
* The Orchestrator certificate must be placed in the **Local Machine Trusted Root** store on the Insights machine.
* The Insights certificate must be placed in the **Local Machine Trusted Root** store on the Orchestrator machine.
* Ensure Orchestrator and Insights have the same `TLS` setting.

## Connection Issues

* Check the port that you specified in the installation, to make sure it is enabled in the machine and in Windows Firewall.

## Portal Showing 500 Error After Installation

The Portal may show a 500 because of a few reasons:

1. Something went wrong with IIS.
2. There may be an issue with the Insights application such as incorrect configuration or issues with the database connection.

To verify IIS issues,

After installing Insights, if you go to IIS Manager > UiPath Insights website > `Logging`, you may get the following error:

```
There was an error while performing this operation.
Details:
Filename: \\?\C:\...your installation path
```

This error may occur if the IIS Hosting Bundle was not installed correctly.

To fix this issue, take the following steps:

1. Go to **Add or remove programs**, search for **Microsoft .NET Core**, and click **Modify**.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/insights/insights-screenshot-of-the-modify-button-highlighted-157480-c3a43b10-aa3da736.webp)
2. Click **Repair** in the newly open window.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/insights/insights-screenshot-of-the-repair-button-highlighted-159962-e231a6a4-4c8b6906.webp)

To check for issues with the Insights application, please go to `C:\ProgramData\UiPath Insights\` to check the Insights logs. If you cannot locate the issue, please contact UiPath support.

:::note
If this does not solve the issue, we recommend uninstalling and then reinstalling the IIS Hosting Bundle.
:::

## World Wide Web Publishing Service (W3SVC) Does Not Start

During installation you can encounter IIS issues. If the W3SVC service fails to start, you can run the following command.

```
net start w3svc
```

## Database Migration Fails During Installation

The Orchestrator installation might fail during the Insights Database migration if it has to index a large set of data. If the installation fails and you get the following error log `System.Exception: Migration failed` then, you should use the following scripts to manually index the `RobotLogs` and `Queueitems`.

### RobotLogs Index

```
IF NOT EXISTS(SELECT * FROM sys.indexes WHERE Name = 'IX_TenantId_ProcessName' and OBJECT_NAME(object_id) = 'RobotLogs')
    CREATE NONCLUSTERED INDEX [IX_TenantId_ProcessName] ON [dbo].[RobotLogs]
    (
        [TenantId] ASC,
        [ProcessName] ASC
    )
```

### QueueItemEvents Index

```
if not exists (select * from sysindexes where id=object_id('dbo.QueueItemEvents') and name='TenantId_ProceStatus_QI_INDEX')
  CREATE NONCLUSTERED INDEX [TenantId_ProceStatus_QI_INDEX] ON dbo.QueueItemEvents (TenantId, ProcessingStatus) INCLUDE (QueueItemId);
```

### JobEvents Index

```
IF NOT EXISTS(SELECT * FROM sys.indexes WHERE Name = 'IX_JobEvents_JobId_TenantId' and OBJECT_NAME(object_id) = 'JobEvents')
CREATE NONCLUSTERED INDEX [IX_JobEvents_JobId_TenantId] ON [dbo].[JobEvents]
(
    [JobId] ASC,
    [TenantId] ASC
)
```

## Uninstall Issues

### Application Pool Not Removed

When you uninstall Insights, you can encounter the following error `The port 443 (or 543) is being used by another web application or program.` This can be caused by IIS or an Insight uninstall issue.

![docs image](https://dev-assets.cms.uipath.com/assets/images/insights/insights-screenshot-of-the-port-543-error-message-159035-9cd537a8-91e72697.webp)

To solve this issue, open IIS and remove `UiPath Insights` from Sites.

![docs image](https://dev-assets.cms.uipath.com/assets/images/insights/insights-screenshot-of-the-remove-button-highlighted-157175-29490593-9496a875.webp)

Then remove `UiPath Insights` and `Provisioning` from Application Pools.

![docs image](https://dev-assets.cms.uipath.com/assets/images/insights/insights-screenshot-of-the-remove-button-highlighted-158377-6d8b6241-dbec665c.webp)

### Uninstall Error Caused by Worker Process

When you uninstall Insights, you can encounter the following error `The following applications should be closed before continuing the install: IIS Worker Process (Process Id: 6492 and Process Id: 8808)` This can be caused by w3wp.exe worker process that is still running.

![docs image](https://dev-assets.cms.uipath.com/assets/images/insights/insights-screenshot-of-the-unistalling-error-156960-a29f65ec-3b4b9d94.webp)

To solve this issue, open the console or PowerShell and run the following command and then click **Retry** in the error dialog to continue Insights uninstall.

```
net stop was /y
net start w3svc
```

If the above command is unsuccessful, you may need to restart the machine and rerun it.

## Miscellaneous Issues

1. On first use of the product, if a dashboard is showing incomplete data, it may be because of a cache. Try going to "Dashboard actions" and then select "Clear cache and refresh".
2. [Update the Looker Settings on the Insights Linux Machine](https://docs.uipath.com/insights/standalone/2023.10/user-guide/modifying-insights-configurations#updating-looker-certificate-on-the-insights-linux-machine).

## Accessing Logs

If you performed the Insights installation, take the following steps to find the logs generated by the installer:

* Navigate to the `%temp%` or `%temp%/<sessionID>` folder, where the `<sessionID>` is the integer of the session you are in. Example: `%temp%` or `%temp%/2`. The name of the log file is `MSI*****.log`, where the asterisks represent random letters.
* You can find the Looker Installation logs in the `%programdata%` folder.

If you have upgraded to the latest version, the Looker installation logs are still located in the `C:\Users\UserName_insights` folder.
* You can find the Insights Portal logs and Provision logs in Windows Event Viewer. Use the Filter Current Log option to filter by Event source.

  ![docs image](https://dev-assets.cms.uipath.com/assets/images/insights/insights-screenshot-of-the-uipath-insights-insightsportal-and-uipath-insights-provisioning-options-highlighted-157115-89df423e-4d101241.webp)

## Insufficient Memory Error

### Issue

When setting up Looker by either running `looker-initialization.sh` on a Linux machine or by remotely running `Deploy-Looker.ps1` from a Windows machine, the setup runs a system check to ensure the environment meets the requirements. During this system check, the following error can occur:

`The looker server requires at least 16G Memory.`

### Possible Cause

Due to conversion from binary to decimal that may differ between cloud providers, this error can occur even if you have 16 GB memory.

### Solution

Depending on the situation, there are two ways in which you can bypass the system check:

* If you are using `looker-initialization.sh`, use the `-b` flag.
* If you are using `Deploy-Looker.ps1` , you can pass the `-BypassSystemCheck` parameter.

## Upgrade Issues

### Dataset Migration Fails During Upgrade

During upgrade, the length of the `ProcessingExceptionDetails` column in the `dbo.QueueItem` and the `HostMachineName` column in the `dbo.JobEvents` table is altered. If you have a large dataset, this can cause a timeout during upgrade. To avoid this, use the following script to manually index the items:

```
IF COL_LENGTH('[dbo].[QueueItems]', 'ProcessingExceptionDetails') IS NOT NULL 
AND 'Nvarchar' IN (
    SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'QUEUEITEMS' 
        AND TABLE_SCHEMA = 'DBO' 
        AND COLUMN_NAME = 'PROCESSINGEXCEPTIONDETAILS'
)
BEGIN
    ALTER TABLE [dbo].[QueueItems]
    ALTER COLUMN ProcessingExceptionDetails NVARCHAR(MAX)
END

IF COL_LENGTH('[dbo].[JobEvents]', 'HostMachineName') IS NOT NULL 
AND 'Nvarchar' IN (
    SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'JOBEVENTS' 
        AND TABLE_SCHEMA = 'DBO' 
        AND COLUMN_NAME = 'HOSTMACHINENAME'
)
BEGIN
    ALTER TABLE [dbo].[JobEvents]
    ALTER COLUMN HostMachineName NVARCHAR(MAX)
END
```
