Troubleshoot when unable to load the Insight dashboards as Data is not ingested in table.
Issue: Unable to Load the Dashboards after new Installation
Trouble loading the Insight dashboards as Data is not ingested.
Error Description:
EventId: 0Logging ExceptionException:
System.Exception: [SqlServer] Query UID: 061312be-8480-4623-bf38-4d68223ae655, Query execution throws an Exception: [SqlServer] Query UID: 061312be-8480-4623-bf38-4d68223ae655 Query '
SELECT
TenantKey, ObjectName, ObjectType, TableName, BackfillLowestProcessedId, NeedUpdateLookerSchema
FROM [read].JsonTableMapping
WHERE NeedUpdateLookerSchema = 1 AND ObjectType = 1' execution throws an Exception:
---> InsightsPortal.Exceptions.DataAccessorExecutionException: [SqlServer] Query UID: 061312be-8480-4623-bf38-4d68223ae655 Query '
SELECT
TenantKey, ObjectName, ObjectType, TableName, BackfillLowestProcessedId, NeedUpdateLookerSchema
FROM [read].JsonTableMapping
WHERE NeedUpdateLookerSchema = 1 AND ObjectType = 1' execution throws an Exception:
---> Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'read.JsonTableMapping'.
at Microsoft.Data.SqlClient.SqlCommand.<>c.b__208_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at InsightsPortal.DataAccess.AbstractDataAccessor.<>c__DisplayClass8_0.<b__3>d.MoveNext() in D:\a\1\s\InsightsInstaller\Insights\Cloud\Portal\src\InsightsPortal\DataAccess\AbstractDataAccessor.cs:line 56
--- End of stack trace from previous location ---
at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func`3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Func`5 onRetryAsync, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext)
at Polly.AsyncPolicy.ExecuteAsync[TResult](Func`3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext)
at InsightsPortal.DataAccess.AbstractDataAccessor.ExecuteWithRetryAsync(IDbConnection conn, ExecutionType executionType, String queryText, Int32 queryTimeoutSeconds, String queryUID, List`1 parameters) in D:\a\1\s\InsightsInstaller\Insights\Cloud\Portal\src\InsightsPortal\DataAccess\AbstractDataAccessor.cs:line 83
ClientConnectionId:eb58781f-b8ab-4205-8b10-f8030feff893
Error Number:208,State:1,Class:16
--- End of inner exception stack trace ---
at InsightsPortal.DataAccess.AbstractDataAccessor.ExecuteWithRetryAsync(IDbConnection conn, ExecutionType executionType, String queryText, Int32 queryTimeoutSeconds, String queryUID, List`1 parameters) in D:\a\1\s\InsightsInstaller\Insights\Cloud\Portal\src\InsightsPortal\DataAccess\AbstractDataAccessor.cs:line 83
at InsightsPortal.DataAccess.AbstractDataAccessor.ExecuteQueryAsync(QueryCommand queryCommand) in D:\a\1\s\InsightsInstaller\Insights\Cloud\Portal\src\InsightsPortal\DataAccess\AbstractDataAccessor.cs:line 174
--- End of inner exception stack trace ---
Resolution: Ideally, error Invalid object name 'read.JsonTableMapping'. usually means the DB is not setup.
- Orchestrator Prep need to be there
- Insights should be enabled on Orchestrator prior to installation. However, if the Insights DB has been created, then nothing will prevent the Insights installer from moving forward
- The Insights DB will be empty after the Insights Install if the feature is not enabled on Insights
- However, if a login occurs, the Insights DB will be populated with user info tables
- This will cause issues down the road. The first time someone logins to Insights, it creates tables in the Insights DB which will prevent the feature from being activated.
- If this occurs, the Insights DB can be deleted and then recreated by the Orchestrator installer.
- (The feature can also be manually enabled)
- After this an IISReset must be ran on the Insights server (If the DB was deleted and recreated)
- (The feature can also be manually enabled)
- When the feature is enabled a key is added to Orchestrator will makes Orchestrator do all the process needed by Insights
- This includes pushing data to the Insights DB
- It also is what makes the feature available for enabling.
- This includes pushing data to the Insights DB
Verify the connection string on the Orchestrator and Insight server in below mentioned files.
- Orchestrator server
UiPath.Orchestrator.dll.config located in C:\Program Files (x86)\UiPath\Orchestrator
- Insight server
appsettings.json file from Insight installation directory
If the issue still persists, share the HAR, Event Viewer Logs from the Insight server and raise a Support case.