# Issue after upgrading to 7.5.2 - SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse (\<anonymous\>) at server.route.handler

**URL:** <https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623>\
**Category:** Kibana\
**Created:** [January 27, 2020, 9:02am UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623 "2020-01-27T09:02:47Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![saif3r](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@saif3r](https://discuss.elastic.co/u/saif3r)\
**Post date:** [January 27, 2020, 9:02am UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/1 "2020-01-27T09:02:47Z")

</div>

Hello,

Today we have performed an upgrate to Kiana 7.5.2 (ES at 7.5) and we have noticed an issue with one of our indices which was working fine. It seems like this particular index pattern is returning an error. Other seems to be working fine.

```
{ 
   "type":"error",
   "@timestamp":"2020-01-27T08:58:44Z",
   "tags":[ 

   ],
   "pid":23965,
   "level":"error",
   "error":{ 
      "message":"Unexpected token u in JSON at position 0",
      "name":"SyntaxError",
      "stack":"SyntaxError: Unexpected token u in JSON at position 0\n at JSON.parse (<anonymous>)\n at server.route.handler (/usr/share/kibana/src/legacy/core_plugins/elasticsearch/lib/create_proxy.js:85:21)\n at process._tickCallback (internal/process/next_tick.js:68:7)"
   },
   "url":{ 
      "protocol":null,
      "slashes":null,
      "auth":null,
      "host":null,
      "port":null,
      "hostname":null,
      "hash":null,
      "search":"?rest_total_hits_as_int=true&ignore_unavailable=true&ignore_throttled=true&preference=1580115513256&timeout=30000ms",
      "query":{ 
         "rest_total_hits_as_int":"true",
         "ignore_unavailable":"true",
         "ignore_throttled":"true",
         "preference":"1580115513256",
         "timeout":"30000ms"
      },
      "pathname":"/elasticsearch/production*/_search",
      "path":"/elasticsearch/production*/_search?rest_total_hits_as_int=true&ignore_unavailable=true&ignore_throttled=true&preference=1580115513256&timeout=30000ms",
      "href":"/elasticsearch/production*/_search?rest_total_hits_as_int=true&ignore_unavailable=true&ignore_throttled=true&preference=1580115513256&timeout=30000ms"
   },
   "message":"Unexpected token u in JSON at position 0"
}
```

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [January 28, 2020, 2:52pm UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/2 "2020-01-28T14:52:30Z")

</div>

Hello,

When does this error occur? Also, are there any errors in the Kibana or ES logs?

---

<div class="post-metadata">

**Author:** ![yoshugo](https://avatars.discourse-cdn.com/v4/letter/y/dec6dc/32.png) [@yoshugo](https://discuss.elastic.co/u/yoshugo)\
**Post date:** [January 28, 2020, 3:36pm UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/3 "2020-01-28T15:36:28Z")

</div>

happens also to me (exact error), when i try to create index pattern.  
"pid": 9,  
"level": "error",  
"error": {  
"message": "Unexpected token u in JSON at position 0",  
"name": "SyntaxError",  
"stack": "SyntaxError: Unexpected token u in JSON at position 0\n at JSON.parse ()\n at server.route.handler (/usr/share/kibana/src/legacy/core\_plugins/elasticsearch/lib/create\_proxy.js:85:21)\n at process.\_tickCallback (internal/process/next\_tick.js:68:7)"  
},  
"url": {  
"protocol": null,  
"slashes": null,  
"auth": null,  
"host": null,  
"port": null,  
"hostname": null,  
"hash": null,  
"search": "?ignore\_unavailable=true",  
"query": {  
"ignore\_unavailable": "true"  
},  
"pathname": "/elasticsearch/_/\_search",  
"path": "/elasticsearch/_/\_search?ignore\_unavailable=true",  
"href": "/elasticsearch/\*/\_search?ignore\_unavailable=true"  
},  
"message": "Unexpected token u in JSON at position 0"

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [January 29, 2020, 9:53am UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/4 "2020-01-29T09:53:23Z")

</div>

If you do a GET /\_cat/indices in the Dev Tools console, does it work?

---

<div class="post-metadata">

**Author:** ![yoshugo](https://avatars.discourse-cdn.com/v4/letter/y/dec6dc/32.png) [@yoshugo](https://discuss.elastic.co/u/yoshugo)\
**Post date:** [January 30, 2020, 6:47am UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/5 "2020-01-30T06:47:09Z")

</div>

turns out it is timeout problem in the kibana/elastic. when i changed the timeout, the errors dissapeared.

---

<div class="post-metadata">

**Author:** ![saif3r](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@saif3r](https://discuss.elastic.co/u/saif3r)\
**Post date:** [January 30, 2020, 8:48am UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/6 "2020-01-30T08:48:30Z")

</div>

Seems like my issue is tied to elasticsearch error enclosed below. It appears that i have to alter one of my visualizations and reduce the number of buckets.

> Caused by: org.elasticsearch.search.aggregations.MultiBucketConsumerService$TooManyBucketsException: Trying to create too many buckets. Must be less than or equal to: [10000] but was [10001]. This limit can be set by changing the [search.max\_buckets] cluster level setting.

When I decrease the size of first bucket to 9999, i got the below error. This time there is nothing in Kibana/Elastic log, only this error in Kibana's UI.

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

---

<div class="post-metadata">

**Author:** ![saif3r](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@saif3r](https://discuss.elastic.co/u/saif3r)\
**Post date:** [February 25, 2020, 11:45am UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/7 "2020-02-25T11:45:46Z")

</div>

Hello,

Any idea how to fix it? It appears that my visualization remains blank with above errors that pops up. As a result I see the error message in Kibana log from first post in this topic. I tried to alter the max bucket settings for both elasticsearch cluster setting and in kibana advanced settings but no luck so far.

---

<div class="post-metadata">

**Author:** ![Stephy\_Jacob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephy_jacob/32/45032_2.png) [@Stephy\_Jacob](https://discuss.elastic.co/u/Stephy_Jacob)\
**Post date:** [March 18, 2020, 11:58am UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/8 "2020-03-18T11:58:34Z")

</div>

Even I am facing the same issue. Have you got a fix to this problem yet?

---

<div class="post-metadata">

**Author:** ![saif3r](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@saif3r](https://discuss.elastic.co/u/saif3r)\
**Post date:** [March 18, 2020, 2:00pm UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/9 "2020-03-18T14:00:30Z")

</div>

No, this errors still pops up from time to time. Can't find out why though.

---

<div class="post-metadata">

**Author:** ![winlamp](https://avatars.discourse-cdn.com/v4/letter/w/cdc98d/32.png) [@winlamp](https://discuss.elastic.co/u/winlamp)\
**Post date:** [March 18, 2020, 4:34pm UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/10 "2020-03-18T16:34:59Z")

</div>

HI,

same issue happens here as well.

Please fix! Or advise a work arround.

thx,!

---

<div class="post-metadata">

**Author:** ![dsv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dsv/32/47173_2.png) [@dsv](https://discuss.elastic.co/u/dsv)\
**Post date:** [March 27, 2020, 10:20am UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/11 "2020-03-27T10:20:54Z")

</div>

I am also facing the same issue.

---

<div class="post-metadata">

**Author:** ![Andrew\_Bierbaum](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_bierbaum/32/65764_2.png) [@Andrew\_Bierbaum](https://discuss.elastic.co/u/Andrew_Bierbaum)\
**Post date:** [April 6, 2020, 6:54pm UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/12 "2020-04-06T18:54:25Z")

</div>

Also, seeing the same error after an upgrade from 7.5.1 to 7.6.1.

It doesn't seem consistent, and comes and goes.

---

<div class="post-metadata">

**Author:** ![dsv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dsv/32/47173_2.png) [@dsv](https://discuss.elastic.co/u/dsv)\
**Post date:** [April 6, 2020, 7:58pm UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/13 "2020-04-06T19:58:07Z")

</div>

Look for the timeout workaround in kibana. It worked for me.

---

<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:** [May 4, 2020, 7:58pm UTC](https://discuss.elastic.co/t/issue-after-upgrading-to-7-5-2-syntaxerror-unexpected-token-u-in-json-at-position-0-at-json-parse-anonymous-at-server-route-handler/216623/14 "2020-05-04T19:58:07Z")

</div>

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