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

**URL:** <https://discuss.elastic.co/t/dashboard-error-unexpected-token-in-json-at-position-0/225258>\
**Category:** Kibana\
**Created:** [March 26, 2020, 5:43pm UTC](https://discuss.elastic.co/t/dashboard-error-unexpected-token-in-json-at-position-0/225258 "2020-03-26T17:43:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Katherinne\_Quintero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/katherinne_quintero/32/42348_2.png) [@Katherinne\_Quintero](https://discuss.elastic.co/u/Katherinne_Quintero)\
**Post date:** [March 26, 2020, 5:43pm UTC](https://discuss.elastic.co/t/dashboard-error-unexpected-token-in-json-at-position-0/225258/1 "2020-03-26T17:43:54Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/4/647562fd0ab9c005a178a58fe49fc19310d80db1.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/c/ac07b7ee7734aef02c3e31bf070ddfdd63ebd445.png)

We have Kibana 7.6.1.

Do you know how I can solve it?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [March 27, 2020, 1:48pm UTC](https://discuss.elastic.co/t/dashboard-error-unexpected-token-in-json-at-position-0/225258/2 "2020-03-27T13:48:14Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![Katherinne\_Quintero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/katherinne_quintero/32/42348_2.png) [@Katherinne\_Quintero](https://discuss.elastic.co/u/Katherinne_Quintero)\
**Post date:** [March 27, 2020, 7:08pm UTC](https://discuss.elastic.co/t/dashboard-error-unexpected-token-in-json-at-position-0/225258/3 "2020-03-27T19:08:42Z")

</div>

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:

```auto
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

```auto
<!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>

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/8/e820f4e3f912ceaba1db71421b6bbe5572968e89.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/1/21eaa187d6e83a93a1f3d1a9daa4c956b68d3a9e.png)

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [March 27, 2020, 9:27pm UTC](https://discuss.elastic.co/t/dashboard-error-unexpected-token-in-json-at-position-0/225258/4 "2020-03-27T21:27:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Katherinne\_Quintero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/katherinne_quintero/32/42348_2.png) [@Katherinne\_Quintero](https://discuss.elastic.co/u/Katherinne_Quintero)\
**Post date:** [March 30, 2020, 5:21pm UTC](https://discuss.elastic.co/t/dashboard-error-unexpected-token-in-json-at-position-0/225258/5 "2020-03-30T17:21:20Z")

</div>

Of course, we have in the proxy

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

```

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

---

<div class="post-metadata">

**Author:** ![yanis\_bled](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yanis_bled/32/65328_2.png) [@yanis\_bled](https://discuss.elastic.co/u/yanis_bled)\
**Post date:** [March 30, 2020, 5:28pm UTC](https://discuss.elastic.co/t/dashboard-error-unexpected-token-in-json-at-position-0/225258/6 "2020-03-30T17:28:26Z")

</div>

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

```auto
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 !

---

<div class="post-metadata">

**Author:** ![Katherinne\_Quintero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/katherinne_quintero/32/42348_2.png) [@Katherinne\_Quintero](https://discuss.elastic.co/u/Katherinne_Quintero)\
**Post date:** [March 30, 2020, 9:51pm UTC](https://discuss.elastic.co/t/dashboard-error-unexpected-token-in-json-at-position-0/225258/7 "2020-03-30T21:51:42Z")

</div>

Delete elastic\_search in my proxy but it still doesn't work

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [March 31, 2020, 8:09am UTC](https://discuss.elastic.co/t/dashboard-error-unexpected-token-in-json-at-position-0/225258/8 "2020-03-31T08:09:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 28, 2020, 8:09am UTC](https://discuss.elastic.co/t/dashboard-error-unexpected-token-in-json-at-position-0/225258/9 "2020-04-28T08:09:09Z")

</div>

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