Dashboard error "Unexpected token < in JSON at position 0"

Hi

I am having errors seeing the dashboard in kibana, I am getting several frames with the error "unexpected token <in JSON at position 0"

Then I refresh the page and they don't appear anymore so I think it's not a query or a display error

We have Kibana 7.6.1.

Do you know how I can solve it?

It seems like the request to the server is failing for some reason - are you using a proxy of some kind in front of Kibana?

Could you open the network tab in the dev tools and try to get the error by refreshing a few times? If that works could you copy/paste the request and the response which are causing the problem (they should have a status code >= 400)?

Hi

We use apache proxy

the error appears and this is what is sent in the request and in the response.

status code 502

Request URL:

https://bs2.openpartner.cl/kibana/s/gildemeister/elasticsearch/gdm_journal_0.4/_search?rest_total_hits_as_int=true&ignore_unavailable=true&ignore_throttled=true&preference=1585326865524&timeout=30000ms

Response

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Bad Gateway</title>
</head><body>
<h1>Bad Gateway</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
</p>
<hr>
<address>Apache/2.4.41 (Ubuntu) Server at bs2.openpartner.cl Port 443</address>
</body></html>


Can you share your proxy configuration? Looks like something is misconfigured in there.

Of course, we have in the proxy

<Location /kibana>
                ProxyPass         http://localhost:5601 
                ProxyPassReverse  http://localhost:5601
        </Location>

and kibana.yml server.basePath: "/kibana"

I had same probleme and i just solved it now, in my case the error came from my proxy where i had :

ProxyPass               /elastic_search   http://127.0.0.1:9200
ProxyPassReverse        /elastic_search   http://127.0.0.1:9200

and just by removing it, it works !

Delete elastic_search in my proxy but it still doesn't work

Can you turn on verbose logging on the proxy server and check what exactly the problem is? Also, the complete configuration would be helpful.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.