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

[BUG] jakarta.json.stream.JsonParsingException: Jackson exception: Numeric value (2579696239) out of range of int (-2147483648 - 2147483647) #875

Closed
oksanay opened this issue Feb 22, 2024 · 3 comments · Fixed by #877
Labels
bug Something isn't working untriaged

Comments

@oksanay
Copy link
Contributor

oksanay commented Feb 22, 2024

What is the bug?

The same problem as it was described in the issue #299 and #184

How can one reproduce the bug?

OpenSearchIndicesClient#stats() throwing JsonParsingException Numeric value (2579696239) out of range of int (-2147483648 - 2147483647)

What is the expected behavior?

Please change dataType of query_cache.memory_size_in_bytes to be a long, instead of an int

What is your host/environment?

aws/ OpenSearch. java client v 2.8.4

Stack trace:

Exception in thread "main" jakarta.json.stream.JsonParsingException: Jackson exception: Numeric value (2579696239) out of range of int (-2147483648 - 2147483647)
at [Source: (GZIPInputStream); line: 1, column: 4073]
at org.opensearch.client.json.jackson.JacksonJsonpParser.convertException(JacksonJsonpParser.java:101)
at org.opensearch.client.json.jackson.JacksonJsonpParser.getInt(JacksonJsonpParser.java:172)
at org.opensearch.client.json.JsonpDeserializerBase$2.deserialize(JsonpDeserializerBase.java:126)
at org.opensearch.client.json.JsonpDeserializerBase$2.deserialize(JsonpDeserializerBase.java:120)
at org.opensearch.client.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:87)
at org.opensearch.client.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:81)
at org.opensearch.client.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:185)
at org.opensearch.client.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:146)
at org.opensearch.client.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:87)
at org.opensearch.client.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:91)
at org.opensearch.client.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:55)
at org.opensearch.client.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:81)
at org.opensearch.client.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:185)
at org.opensearch.client.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:146)
at org.opensearch.client.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:87)
at org.opensearch.client.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:91)
at org.opensearch.client.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:55)
at org.opensearch.client.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:81)
at org.opensearch.client.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:185)
at org.opensearch.client.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:146)
at org.opensearch.client.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:87)
at org.opensearch.client.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:91)
at org.opensearch.client.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:55)
at org.opensearch.client.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:81)
at org.opensearch.client.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:185)
at org.opensearch.client.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:146)
at org.opensearch.client.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:87)
at org.opensearch.client.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:91)
at org.opensearch.client.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:55)
at org.opensearch.client.transport.aws.AwsSdk2Transport.parseResponse(AwsSdk2Transport.java:518)
at org.opensearch.client.transport.aws.AwsSdk2Transport.executeSync(AwsSdk2Transport.java:396)
at org.opensearch.client.transport.aws.AwsSdk2Transport.performRequest(AwsSdk2Transport.java:193)
at org.opensearch.client.opensearch.indices.OpenSearchIndicesClient.stats(OpenSearchIndicesClient.java:1706)
at [our class where we get this exception]
Caused by: com.fasterxml.jackson.core.exc.InputCoercionException: Numeric value (2579696239) out of range of int (-2147483648 - 2147483647)
at [Source: (GZIPInputStream); line: 1, column: 4073]
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportInputCoercion(ParserMinimalBase.java:638)
at com.fasterxml.jackson.core.base.ParserMinimalBase.reportOverflowInt(ParserMinimalBase.java:607)
at com.fasterxml.jackson.core.base.ParserBase.convertNumberToInt(ParserBase.java:1036)
at com.fasterxml.jackson.core.base.ParserBase._parseIntValue(ParserBase.java:960)
at com.fasterxml.jackson.core.base.ParserBase.getIntValue(ParserBase.java:766)
at org.opensearch.client.json.jackson.JacksonJsonpParser.getInt(JacksonJsonpParser.java:170)
... 32 more

Do you have any additional context?

The bug was reported before version 2.5.x and marked as fixed, but we are using version 2.8.4 and still having the same issue.
Somehow we need the fix asap, since we cannot use ElasticSearch RestHighLevelClient anymore, it has security vulnerabilities.
Please note: There is the same issue in opensearch-rest client which is deprecated

@oksanay oksanay added bug Something isn't working untriaged labels Feb 22, 2024
@VachaShah
Copy link
Collaborator

Thanks @oksanay for reporting this! Looks like some other indices stats still have some int variables which might overflow.

@oksanay oksanay changed the title [B[BUG] jakarta.json.stream.JsonParsingException: Jackson exception: Numeric value (2579696239) out of range of int (-2147483648 - 2147483647) [BUG] jakarta.json.stream.JsonParsingException: Jackson exception: Numeric value (2579696239) out of range of int (-2147483648 - 2147483647) Feb 23, 2024
@oksanay
Copy link
Contributor Author

oksanay commented Feb 23, 2024

@VachaShah I see you fixed the issue, but it is not going to be released, right? How do we get the fix?

@VachaShah
Copy link
Collaborator

@oksanay The change is now available to consume in the 2.10.0-SNAPSHOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants