Error while syncing metric details from gateway to portal

Document ID : KB000007960
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

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

Resolution:

1. Login to policy manager as Admin.

2. Go to Cluster wide properties.

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