org.elasticsearch.transport.TransportSerializationException: Failed to deserialize exception response from stream when one node is still starting

Hello,

I'm trying to setup two elasticsearch nodes in Amazon they are in the same
region.
My configuiration is:
discovery.type: ec2
cloud.aws.access_key:
cloud.aws.secret_key:
discovery.ec2.ping_timeout: 5m
cloud.aws.region: eu-west-1
discovery.ec2.host_type: private_ip
discovery.ec2.tag.communication: es_test

They find each other and connect OK.

Then I stated testing failover. Here are my settings:

elasticsearch.hosts=host1,host2
elasticsearch.indexName=index1
elasticsearch.indexType=dv
elasticsearch.cluster=AMZ_TEST

and I start the transport client in my application:

private @Value("${elasticsearch.hosts}") String esHosts;
private @Value("${elasticsearch.cluster}") String clusterName;
private TransportClient client;

public Client initClient() {
    Settings settings = ImmutableSettings.settingsBuilder()
            .put("cluster.name", clusterName).build();

    client = new TransportClient(settings);

        for (String hostname : esHosts.split(",")) {
            client.addTransportAddress(new 

InetSocketTransportAddress(hostname, 9300));
}

    return client;
}

It all works fine and if I stop one node everything works.
The problem is when I start the node again. I get this exception when I try
to do any query:

Exception in thread "main"
org.elasticsearch.transport.TransportSerializationException: Failed to
deserialize exception response from stream

A few seconds after the two nodes find each other everything is ok.
Is there anything I should do not to have this downtime.

Thank you

--

Hi,

Are you able to share your logs around the Exception? Just so we can see
what's going on leading up to it.

On Friday, November 16, 2012 11:45:03 PM UTC+13, Barbara Ferreira wrote:

Hello,

I'm trying to setup two elasticsearch nodes in Amazon they are in the same
region.
My configuiration is:
discovery.type: ec2
cloud.aws.access_key:
cloud.aws.secret_key:
discovery.ec2.ping_timeout: 5m
cloud.aws.region: eu-west-1
discovery.ec2.host_type: private_ip
discovery.ec2.tag.communication: es_test

They find each other and connect OK.

Then I stated testing failover. Here are my settings:

elasticsearch.hosts=host1,host2
elasticsearch.indexName=index1
elasticsearch.indexType=dv
elasticsearch.cluster=AMZ_TEST

and I start the transport client in my application:

private @Value("${elasticsearch.hosts}") String esHosts;
private @Value("${elasticsearch.cluster}") String clusterName;
private TransportClient client;

public Client initClient() {
    Settings settings = ImmutableSettings.settingsBuilder()
            .put("cluster.name", clusterName).build();

    client = new TransportClient(settings);

        for (String hostname : esHosts.split(",")) {
            client.addTransportAddress(new 

InetSocketTransportAddress(hostname, 9300));
}

    return client;
}

It all works fine and if I stop one node everything works.
The problem is when I start the node again. I get this exception when I
try to do any query:

Exception in thread "main"
org.elasticsearch.transport.TransportSerializationException: Failed to
deserialize exception response from stream

A few seconds after the two nodes find each other everything is ok.
Is there anything I should do not to have this downtime.

Thank you

--

Hi,

this error usually occurs if you have different JVM versions between server
and client, or, if a plugin throws a custom exception at server side which
is not present at the client, so it fails to decode the exception.

Jörg

--

Hi Jorg,

Can you please tell how to solve it?

Thanks