Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoking rest/metrics API on Ikasan dashboard returning Jibberish response #1099

Open
selvra opened this issue Apr 25, 2022 · 0 comments
Open

Comments

@selvra
Copy link

selvra commented Apr 25, 2022

Upon invoking rest/metrics API with URL below from application and from Ikasan dashboard swagger returns Jibberish response
http://:/rest/metrics/1648141111466/1648141171466

Error when called from application
2022-04-25 11:42:22,052 INFO com.mizuho.esb.mhi.esb.metrics.component.service.MetricsRestServiceImpl [DefaultMessageListenerContainer-3] Looking up Metrics data from dashboard:http://server:port/rest/metrics/1648141111466/1648141171466 2022-04-25 11:42:22,628 ERROR com.mizuho.esb.mhi.esb.metrics.component.service.MetricsRestServiceImpl [DefaultMessageListenerContainer-3] Issue getting metrics for url [http://server:port/rest/metrics/1648141111466/1648141171466] with response [{Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: (String)"<!doctype html><html lang="en"><head><script type="text/javascript">window.Vaadin = window.Vaadin || {}; window.Vaadin.theme = window.Vaadin.theme || {};window.Vaadin.theme.flowBootstrap = true;</script><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><base href="."><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Ikasan - Login</title><style type="text/css">body {height:100vh;width:100%;margin:0;}"[truncated 13133 chars]; line: 1, column: 2]}]

Error when called from Swagger
image

Error log from Ikasan dashboard]
`2022-04-25 11:47:55.935 [http-nio-10.110.231.54-10000-exec-8] WARN o.i.rest.dashboard.JwtRequestFilter - [Authorization] header does not begin with Bearer String on url [/rest/metrics/1648141111466/1648141171466]
2022-04-25 11:47:55.970 [http-nio-10.110.231.54-10000-exec-8] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: Error resolving solr flow invocation metric by query [moduleName:(* ) AND flowName:(* ) AND type:metric AND timestamp:[1648141111466 TO 1648141171466]] from the ikasan solr index!] with root cause
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://server:8983/solr: Expected mime type application/octet-stream but got text/html.

<title>Error 401 require authentication</title>

HTTP ERROR 401 require authentication

URI:/solr/ikasan/select
STATUS:401
MESSAGE:require authentication
SERVLET:default
at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:635) ~[solr-solrj-8.11.1.jar!/:8.11.1 0b002b11819df70783e83ef36b42ed1223c14b50 - janhoy - 2021-12-14 13:50:57]
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:266) ~[solr-solrj-8.11.1.jar!/:8.11.1 0b002b11819df70783e83ef36b42ed1223c14b50 - janhoy - 2021-12-14 13:50:57]
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:248) ~[solr-solrj-8.11.1.jar!/:8.11.1 0b002b11819df70783e83ef36b42ed1223c14b50 - janhoy - 2021-12-14 13:50:57]
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:214) ~[solr-solrj-8.11.1.jar!/:8.11.1 0b002b11819df70783e83ef36b42ed1223c14b50 - janhoy - 2021-12-14 13:50:57]`

Full error stack trade -
Ikasan_metrics_call_error_stackTrace.txt

NOTE:
This started to happen after RHEP patching and I had to start Ikasan dashboard manually and I suspect calling http://server:port/rest/metrics/1648141111466/1648141171466 subsequently trying to login to SOLR to http://server:8983/solr and then fails with authentication issue

Steps to reproduce

  1. Restart Ikasan dashboard
  2. Login to Ikasan dashboard as yourself
  3. http://server;port/swagger-ui.html#/metrics-controller/getMetricsUsingGET_2
    key in starttime as 0, endtime as 1651065981000
  4. You'll see you get a jibberish response
  5. WORKAROUND: If you harvest metrics data from a module and then try calling Metrics rest API returns empty data or correct data.

WORKAROUND: If you harvest metrics data from a module and then try calling Metrics rest API returns empty data or correct data.

@selvra selvra changed the title Invoking rest/metrics API on Ikasan dashboard returning Jibberish response occasionally - Invoking rest/metrics API on Ikasan dashboard returning Jibberish response Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant