Scroll Failure [Solved]


(The Dude) #1

ES 1.7

When trying to scroll, I get the following:

{"error":"ElasticsearchIllegalArgumentException[Failed to decode scrollId]; nested: IOException[Bad Base64 input character decimal 123 in array position 0]; ","status":400}

Is there any simple way to work around this?


Upgrade 1.0.3 to 6.3.1
(Alexander Reelsen) #2

Hey,

can you provide a full reproducible example so one can follow the steps that you took? Looks as if you maybe did not copy the full scrollId or your HTTP client somehow encoded it differently, but without a reproduction everything is just an assumption.

--Alex


(The Dude) #3
curl -XGET 'localhost:9200/2016-06-16/_search?scroll=1m' -d '
{
  "sort": [
  "_doc"
  ]
}
'

Followed by:

curl -XGET  'localhost:9200/_search/scroll'  -d'{
  "scroll" : "1m",
  "scroll_id" : "cXVlcnlBbmRGZXRjaDsxOzI5NjczMDotanF4VWl2TlFmYUg5TFl5QlNUVHRnOzA7"
}
'

Results in:

{"error":"ElasticsearchIllegalArgumentException[Failed to decode scrollId]; nested: IOException[Bad Base64 input character decimal 123 in array position 0]; ","status":400}


(The Dude) #4

It appears that this does work:

curl -XGET  'localhost:9200/_search/scroll?scroll=1m' \
  -d 'cXVlcnlBbmRGZXRjaDsxOzI5NzIwMDotanF4VWl2TlFmYUg5TFl5QlNUVHRnOzA7'

Thanks for your time.


(JavaES) #5

HI Nathan ,

I am facing the similar issue , musing elastic search 1.7

GET /_search/scroll
{
"scroll": "1m",
"scroll_id":"cXVlcnlUaGVuRmV0Y2g7NTsyNzQ6SWFtYU9oNUxUaXVYYndlTGt6a2FndzsyNzM6SWFtYU9oNUxUaXVYYndlTGt6a2FndzsyNzE6SWFtYU9oNUxUaXVYYndlTGt6a2FndzsyNzU6SWFtYU9oNUxUaXVYYndlTGt6a2FndzsyNzI6SWFtYU9oNUxUaXVYYndlTGt6a2FndzswOw"
}

Error:
{
"error": "ElasticsearchIllegalArgumentException[Failed to decode scrollId]; nested: IOException[Bad Base64 input character decimal 123 in array position 0]; ",
"status": 400
}

Could You please let me how you solved the issue


(The Dude) #6

Well as I posted before:

curl -XGET 'localhost:9200/_search/scroll?scroll=1m'
-d 'cXVlcnlBbmRGZXRjaDsxOzI5NzIwMDotanF4VWl2TlFmYUg5TFl5QlNUVHRnOzA7'

So the get's data is the scroll id and the scroll "1m" value is part of
the url which is different from what the more current api expects which
puts both values in the get's data as json. This is what worked in my
case so hopefully it works for you as well.

Regards,
Nathan


(Nik Everett) #7

The docs for 1.7 don't mention the json body way of scrolling. I expect it wasn't implemented until later.


(system) #8