Serialization exception while trying to connect to a running node

Hi,
I am trying to connect to EC2 using transport connection. However, I
am getting a transportserializationexception. The same configuration
works fine when trying to connect to ES server running outside Amazon.

Would greatly appreciate any input.

Java code :

Settings settings = ImmutableSettings.settingsBuilder()
.put(CLUSTER_NAME_KEY, clusterName)
.put("client.transport.sniff", false).build();
Client transportClient = new TransportClient(settings)
.addTransportAddress(new InetSocketTransportAddress(
networkHost, transportPort));

While debugging, it seems the exception occured NodeService thrown
while trying to add listNodes to nodes collection.

I am using ec2 discovery

Exception:

2011-11-22 10:21:31,989 WARN [org.elasticsearch.client.transport] -
<[Aardwolf] failed to get node info for [#transport#-1]
[inet[ec2-000-00-000-000.compute-1.amazonaws.com/10.211.25.50:9300]]>
org.elasticsearch.transport.RemoteTransportException: Failed to
deserialize response of type
[org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse]
Caused by:
org.elasticsearch.transport.TransportSerializationException: Failed to
deserialize response of type
[org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse]
at
org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:
126)
at
org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:
103)
at
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:
80)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:
564)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline
$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:
783)
at
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:
302)
at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:
317)
at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:
299)
at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:
214)
at
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:
80)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:
564)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:
559)
at
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:
274)
at
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:
261)
at
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:
349)
at
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:
280)
at
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:
200)
at
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:
108)
at
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker
$1.run(DeadLockProofWorker.java:44)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1110)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException: null value
at
org.elasticsearch.common.base.Preconditions.checkNotNull(Preconditions.java:
204)
at
org.elasticsearch.common.collect.ImmutableMap.entryOf(ImmutableMap.java:
139)
at org.elasticsearch.common.collect.ImmutableMap
$Builder.put(ImmutableMap.java:178)
at
org.elasticsearch.action.admin.cluster.node.info.NodeInfo.readFrom(NodeInfo.java:
190)
at
org.elasticsearch.action.admin.cluster.node.info.NodeInfo.readNodeInfo(NodeInfo.java:
181)
at
org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse.readFrom(NodesInfoResponse.java:
45)
at
org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:
124)
... 21 more

Are you using the same version client to connect to the server?

On Tue, Nov 22, 2011 at 12:30 PM, achaayan felixmd@gmail.com wrote:

Hi,
I am trying to connect to EC2 using transport connection. However, I
am getting a transportserializationexception. The same configuration
works fine when trying to connect to ES server running outside Amazon.

Would greatly appreciate any input.

Java code :

Settings settings = ImmutableSettings.settingsBuilder()
.put(CLUSTER_NAME_KEY, clusterName)
.put("client.transport.sniff",
false).build();
Client transportClient = new
TransportClient(settings)
.addTransportAddress(new
InetSocketTransportAddress(
networkHost,
transportPort));

While debugging, it seems the exception occured NodeService thrown
while trying to add listNodes to nodes collection.

I am using ec2 discovery

Exception:

2011-11-22 10:21:31,989 WARN [org.elasticsearch.client.transport] -
<[Aardwolf] failed to get node info for [#transport#-1]
[inet[ec2-000-00-000-000.compute-1.amazonaws.com/10.211.25.50:9300]]>
org.elasticsearch.transport.RemoteTransportException: Failed to
deserialize response of type
[org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse]
Caused by:
org.elasticsearch.transport.TransportSerializationException: Failed to
deserialize response of type
[org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse]
at

org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:
126)
at

org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:
103)
at

org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:
80)
at

org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:
564)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline
$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:
783)
at

org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:
302)
at

org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:
317)
at

org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:
299)
at

org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:
214)
at

org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:
80)
at

org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:
564)
at

org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:
559)
at

org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:
274)
at

org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:
261)
at

org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:
349)
at

org.elasticsearch.common.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:
280)
at

org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:
200)
at

org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:
108)
at
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker
$1.run(DeadLockProofWorker.java:44)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1110)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException: null value
at

org.elasticsearch.common.base.Preconditions.checkNotNull(Preconditions.java:
204)
at
org.elasticsearch.common.collect.ImmutableMap.entryOf(ImmutableMap.java:
139)
at org.elasticsearch.common.collect.ImmutableMap
$Builder.put(ImmutableMap.java:178)
at

org.elasticsearch.action.admin.cluster.node.info.NodeInfo.readFrom(NodeInfo.java:
190)
at

org.elasticsearch.action.admin.cluster.node.info.NodeInfo.readNodeInfo(NodeInfo.java:
181)
at

org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse.readFrom(NodesInfoResponse.java:
45)
at

org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:
124)
... 21 more

That was a life saver, Shay - Thanks.

The root cause was the version mismatch between client jars and
server.

On Nov 22, 5:14 pm, Shay Banon kim...@gmail.com wrote:

Are you using the same version client to connect to the server?

On Tue, Nov 22, 2011 at 12:30 PM, achaayan feli...@gmail.com wrote:

Hi,
I am trying to connect to EC2 using transport connection. However, I
am getting a transportserializationexception. The same configuration
works fine when trying to connect to ES server running outside Amazon.

Would greatly appreciate any input.

Java code :

Settings settings = ImmutableSettings.settingsBuilder()
.put(CLUSTER_NAME_KEY, clusterName)
.put("client.transport.sniff",
false).build();
Client transportClient = new
TransportClient(settings)
.addTransportAddress(new
InetSocketTransportAddress(
networkHost,
transportPort));

While debugging, it seems the exception occured NodeService thrown
while trying to add listNodes to nodes collection.

I am using ec2 discovery

Exception:

2011-11-22 10:21:31,989 WARN [org.elasticsearch.client.transport] -
<[Aardwolf] failed to get node info for [#transport#-1]
[inet[ec2-000-00-000-000.compute-1.amazonaws.com/10.211.25.50:9300]]>
org.elasticsearch.transport.RemoteTransportException: Failed to
deserialize response of type
[org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse]
Caused by:
org.elasticsearch.transport.TransportSerializationException: Failed to
deserialize response of type
[org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse]
at

org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(Mess ageChannelHandler.java:
126)
at

org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(Mes sageChannelHandler.java:
103)
at

org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleU pstream(SimpleChannelUpstreamHandler.java:
80)
at

org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream( DefaultChannelPipeline.java:
564)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline
$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:
783)
at

org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channel s.java:
302)
at

org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFi reMessageReceived(FrameDecoder.java:
317)
at

org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode( FrameDecoder.java:
299)
at

org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageRece ived(FrameDecoder.java:
214)
at

org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleU pstream(SimpleChannelUpstreamHandler.java:
80)
at

org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream( DefaultChannelPipeline.java:
564)
at

org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream( DefaultChannelPipeline.java:
559)
at

org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channel s.java:
274)
at

org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channel s.java:
261)
at

org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker. java:
349)
at

org.elasticsearch.common.netty.channel.socket.nio.NioWorker.processSelected Keys(NioWorker.java:
280)
at

org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.j ava:
200)
at

org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenami ngRunnable.java:
108)
at
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker
$1.run(DeadLockProofWorker.java:44)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1110)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException: null value
at

org.elasticsearch.common.base.Preconditions.checkNotNull(Preconditions.java :
204)
at
org.elasticsearch.common.collect.ImmutableMap.entryOf(ImmutableMap.java:
139)
at org.elasticsearch.common.collect.ImmutableMap
$Builder.put(ImmutableMap.java:178)
at

org.elasticsearch.action.admin.cluster.node.info.NodeInfo.readFrom(NodeInfo .java:
190)
at

org.elasticsearch.action.admin.cluster.node.info.NodeInfo.readNodeInfo(Node Info.java:
181)
at

org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse.readFrom (NodesInfoResponse.java:
45)
at

org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(Mess ageChannelHandler.java:
124)
... 21 more