search cancel

Analytics dashboard cannot be retrieved. API key is not valid.

book

Article ID: 201972

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Analytics dashboards cannot be retrieved.

InternationalizedServiceException{mlsMessage='Error while generating chart.: API key 'ddc199c8-ca6c-4efa-bb9d-f1cd5ee9bc7a' is not valid'} com.automic.analytics.ui.utils.InternationalizedServiceException: Error while generating chart.: API key 'ddc199c8-ca6c-4efa-bb9d-f1cd5ee9bc7a' is not valid
    at com.automic.analytics.ui.utils.ServiceUtils.throwException(ServiceUtils.java:11)
    at com.automic.analytics.ui.dashboard.widget.service.ChartService.generateChart(ChartService.java:57)
    at com.automic.analytics.ui.dashboard.widget.common.ChartWidgetLoader.load(ChartWidgetLoader.java:26)
    at com.automic.analytics.ui.dashboard.widget.common.ChartWidgetLoader.load(ChartWidgetLoader.java:17)
    at com.uc4.ecc.framework.core.async.BaseRequestCoordinator$1$1.call(BaseRequestCoordinator.java:231)
    at com.uc4.ecc.framework.core.pool.ContextAwareExecutorService$CallableImplementation.call(ContextAwareExecutorService.java:72)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: {"code":"IA-0002","error":"API key 'ddc199c8-ca6c-4efa-bb9d-f1cd5ee9bc7a' is not valid"}
    at com.automic.analytics.ui.utils.ServiceUtils.throwException(ServiceUtils.java:16)
    at com.automic.analytics.ui.utils.http.ApacheHttpGateway.sendPostRequest(ApacheHttpGateway.java:115)
    at com.automic.analytics.ui.dashboard.widget.service.ChartService.generateChart(ChartService.java:50)
    ... 8 more
Caused by: java.lang.RuntimeException: {"code":"IA-0002","error":"API key 'ddc199c8-ca6c-4efa-bb9d-f1cd5ee9bc7a' is not valid"}
    at com.automic.analytics.ui.utils.ServiceUtils.throwException(ServiceUtils.java:21)
    at com.automic.analytics.ui.utils.http.ApacheHttpGateway.getHttpResponseString(ApacheHttpGateway.java:153)
    at com.automic.analytics.ui.utils.http.ApacheHttpGateway.sendPostRequest(ApacheHttpGateway.java:113)
    ... 9 more

Cause

Configuration.

Environment

Release : 2.n

Component : ANALYTICS ON PREMISE

Resolution

Get the API key from the Analytics database.

select key from api_key;

Add this key to the file plugin.properties, which can be found in the webui-pluign-analytics folder (AWI installation), i.e. C:\Automic\External.Resources\apache-tomcat-9.0.19\webapps\awi\config\webui-plugin-analytics.

# API key used for all requests to the backend
backend.api_key=API_Key