Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nicer exception when no scroll ID is provided #9469

Closed
p-run opened this issue Jan 28, 2015 · 7 comments
Closed

Nicer exception when no scroll ID is provided #9469

p-run opened this issue Jan 28, 2015 · 7 comments
Labels
>enhancement good first issue low hanging fruit help wanted adoptme :Search/Search Search-related issues that do not fall into other categories

Comments

@p-run
Copy link

p-run commented Jan 28, 2015

I am trying to use elasticdump (https://www.npmjs.com/package/elasticdump) to dump/restore elasticsearch data. One elasticdump invocation yields the following:

% elasticdump --input=http://localhost:9200/ --output=\$ 
Wed, 28 Jan 2015 18:07:28 GMT | {"error":"ElasticsearchIllegalArgumentException[Malformed scrollId []]","status":400}
[
]

What is a scrollId and why is it malformed? Google is of no help in understanding this error message.

This exception seems like a low-level one. It should be caught by higher level code and converted to a more meaningful error message, like, say, "index was not specified".

@clintongormley
Copy link

Hi @p-run

A scroll ID is used to track the progress of the scroll request on each shard. The scroll ID changes on every request, and the new ID needs to be passed to the next scroll request.

If you have many shards, then the scroll ID can be very long. In fact it can be too long to pass in the URL or query string. For this reason, we also support passing the scroll ID in the body.

I'm guessing that elasticdump is passing the ID in the query string, which is being truncated, and results in a malformed ID. I suggest you open an issue against that project.

@p-run
Copy link
Author

p-run commented Jan 29, 2015

This exception seems to occur when I am trying to dump an empty elasticsearch instance, leading me to think that an excessively long scrollid due to huge shard count is probably not the cause.

In fact, looking at the code in https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/search/type/TransportSearchHelper.java and the error message again, the scrollid is empty, and this can be checked for and helpfully reported.

@clintongormley
Copy link

Ah right - so there is no scroll ID because there are no indices. Yes, I suppose we could provide a nicer message there.

@clintongormley clintongormley added good first issue low hanging fruit >enhancement :Search/Search Search-related issues that do not fall into other categories help wanted adoptme labels Jan 29, 2015
@clintongormley clintongormley changed the title "Malformed scrollId" exception Nicer exception when no scroll ID is provided Jan 29, 2015
@clintongormley
Copy link

Fixed by #10178

@clintongormley
Copy link

That PR wasn't merged. Reopening

@clintongormley clintongormley reopened this Apr 4, 2015
@clintongormley clintongormley added :Scroll and removed :Search/Search Search-related issues that do not fall into other categories labels Dec 4, 2015
@gfyoung
Copy link
Contributor

gfyoung commented Sep 30, 2016

Is this an issue anymore? From the related code here, the issue seems non-existent IINM.

@clintongormley
Copy link

Closed by #10813 - thanks for spotting @gfyoung

@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Scroll labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement good first issue low hanging fruit help wanted adoptme :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

No branches or pull requests

3 participants