Failed to deserialize response from handler

I am using scala+java application and running it on jdk 11 and calling Elasticsearch api for searching text.
Recently upgraded from elasticsearch 5.5 to 7.17 and while search text getting below error.

ERROR play.http.DefaultHttpErrorHandler -
! @7ojlf7lhb - Internal server error, for (POST) [/catalog/search/token?query=test&limit=10&consistencydate=%7B%7D&modifydate=%7B%7D] ->

play.api.UnexpectedException: Unexpected exception[SearchServerException: Invalid filters provided, error: Failed to deserialize response from handler [org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler/org.elasticsearch.action.ActionListenerResponseHandler@6b34c1/org.elasticsearch.client.transport.TransportClientNodesService$RetryListener@192cba31]]
    at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:340)
    at play.api.http.HttpErrorHandlerExceptions.throwableToUsefulException(HttpErrorHandler.scala)
    at play.http.DefaultHttpErrorHandler.throwableToUsefulException(DefaultHttpErrorHandler.java:227)
    at play.http.DefaultHttpErrorHandler.onServerError(DefaultHttpErrorHandler.java:182)
    at play.core.j.JavaHttpErrorHandlerAdapter.$anonfun$onServerError$1(JavaHttpErrorHandlerAdapter.scala:23)
    at play.core.j.JavaHelpers.$anonfun$invokeWithContext$1(JavaHelpers.scala:287)
    at play.core.j.JavaHelpers.withContext(JavaHelpers.scala:299)
Caused by: java.lang.IllegalArgumentException: Unknown NamedWriteable category [org.elasticsearch.persistent.PersistentTaskParams]
	at org.elasticsearch.common.io.stream.NamedWriteableRegistry.getReader(NamedWriteableRegistry.java:106)
	at org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:36)
	at org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:28)
	at org.elasticsearch.persistent.PersistentTasksCustomMetadata$PersistentTask.<init>(PersistentTasksCustomMetadata.java:360)
	at org.elasticsearch.common.io.stream.StreamInput.readMap(StreamInput.java:654)
	at org.elasticsearch.common.io.stream.StreamInput.readMap(StreamInput.java:638)
	at org.elasticsearch.persistent.PersistentTasksCustomMetadata.<init>(PersistentTasksCustomMetadata.java:544)
	at org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:37)
	at org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:28)
	at org.elasticsearch.cluster.metadata.Metadata.readFrom(Metadata.java:1189)
	at org.elasticsearch.cluster.ClusterState.readFrom(ClusterState.java:760)
	at org.elasticsearch.action.admin.cluster.state.ClusterStateResponse.lambda$new$0(ClusterStateResponse.java:37)
	at org.elasticsearch.common.io.stream.StreamInput.readOptionalWriteable(StreamInput.java:1035)
	at org.elasticsearch.action.admin.cluster.state.ClusterStateResponse.<init>(ClusterStateResponse.java:37)
	at org.elasticsearch.action.ActionListenerResponseHandler.read(ActionListenerResponseHandler.java:58)
	at org.elasticsearch.action.ActionListenerResponseHandler.read(ActionListenerResponseHandler.java:25)
	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.read(TransportService.java:1462)
	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.read(TransportService.java:1449)
	at org.elasticsearch.transport.InboundHandler.handleResponse(InboundHandler.java:311)
	... 30 common frames omitted

Same call from application was working with elasticsearch 5.5.
Elasticsearch is running fine and direct curl command to search text is working fine.
Can anyone provide any solution or pointers why I am getting this.

elasticsearch 5.5 is EOL and no longer supported. Please upgrade ASAP.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

So far what I figure out is, application is calling elasticsearch for cluster state and failing with HTTP GET.

ClusterState clusterState = getClient().admin().cluster().state(new ClusterStateRequest()).actionGet().getState();

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