Error while syncing metric details from gateway to portal

book

Article ID: 7960

calendar_today

Updated On:

Products

CA API Developer Portal CA API Gateway

Issue/Introduction

when ./portal.sh is run to sync the metric details it fails with below error

 

DEBUG PortalMetricsSyncUtilityMain - Error syncing hourly data:Transaction rolled back.
com.l7tech.portal.metrics.SyncException: Transaction rolled back.
at com.l7tech.portal.metrics.MySQLSyncUtility.syncHourlyData(Unknown Source)
at com.l7tech.portal.metrics.PortalMetricsSyncUtilityMain.a(Unknown Source)
at com.l7tech.portal.metrics.PortalMetricsSyncUtilityMain.a(Unknown Source)
at com.l7tech.portal.metrics.PortalMetricsSyncUtilityMain.main(Unknown Source)
Caused by: java.sql.SQLException: Illegal operation on empty result set.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.ResultSetImpl.checkRowPos(ResultSetImpl.java:843)
at com.mysql.jdbc.ResultSetImpl.getStringInternal(ResultSetImpl.java:5649)
at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5569)
at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5609)
at com.l7tech.portal.metrics.AbstractPortalMetricsUtility.queryClusterHostname(Unknown Source)

Cause

This is because cluster hostname is missing from cluster wide properties

Environment

Release: L7APIP99000-3.1-API Developer Portal-Perpetual
Component:

Resolution

1. Login to policy manager as Admin.

2. Go to Cluster wide properties.

3. Add cluster.hostname and your cluster hostname against it.