Scroll Failure [Solved]

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?

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

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}

It appears that this does work:

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

Thanks for your time.

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

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

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

1 Like