The Job Status Data Insight fails to load and displays an unexpected token error ․ This issue occurs after modifying the server keystore or certificate ․
ERROR MESSAGE: "Unexpected token '<', "<!DOCTYPE "․․․ is not valid JSON" "com․termalabs․common․serviceutils․ApiException: GET PROPERTY ERROR: MESSAGE = Server or service is not available" "Certificate for <[hostname]> doesn't match any of the subject alternative names"
SYMPTOMS:
Unable to view results for reports
Scheduled reports stop sending updates
Reports appear to refresh for several minutes before showing the error
Collector service and microservices fail to start
CONTEXT: Occurs after applying a new keystore or certificate to the environment
IMPACT: Users are unable to view or run Data Insights and scheduled reports stop updating
AAI 24.x
New keystore file was missing the correct hostname for the server.
Collector service logs showed issues with the collector service being in a disabled state:
WARN [AutosysTask] Unexpected error while getting server parameter will retry
WARN [CollectorSpringConfiguration] com.termalabs.collector.service.CollectorService@71ba349f Unable to retrieve service enabled, setting to disabled
INFO [CollectorSpringConfiguration] com.termalabs.collector.service.CollectorService@71ba349f Unable to get service enabled recheck interval
Checked the sever.log after a restart and can see the error below:
Caused by: com.termalabs.common.serviceutils.ApiException: GET PROPERTY ERROR: MESSAGE = Server or service is not available
I/O error on GET request for "https://<hostname>:<port>/aai/api/properties/serverParam/collectorService.dbMaintenance.purgeInterval": Certificate for <hostname> doesn't match any of the subject alternative names
This error indicates the hostnames listed in the AAI keystore file do not match the expected fully qualified hostname that java is detecting.
To resolve this, work with your certificate authority to include all possible hostnames for the server in the Subject Name or Subject Alternative Name fields of the certificate and then restart the AAI service.