Org.elasticsearch.client.transport.NoNodeAvailableException: No node available --- while using Java API for Indexing into Linux Server from my Local System

Hi., to all.

 I am trying to Index Some Documents into our Server System(running 

Linux) from my Local System(running in Windows 7).
I am using Winscp for file transformation between my Local System and
Srever System. And Putty for Communicating(for running commands to index
documents) with Server System.

In Putty(Running from my Local System and connected with Server), I have
tried the following.,
curl xxx.xxx.xxx.251:9200
{
"ok" : true,
"status" : 200,
"name" : "e257-1",
"version" : {
"number" : "0.20.5",
"snapshot_build" : false
},
"tagline" : "You Know, for Search"
}
--- That means Elasticsearch is working fine.
And
curl -XPOST http://xxx.xxx.xxx.251:9200/test/testing/01 -d
'{"name":"adward"}'
{"ok":true,"_index":"test","_type":"testing","_id":"01","_version":1}
----That means I am able to Indexing using CURL Command from Putty.

But.,
When I am using Elaasticsearch-java-api., The Sample Code is Given below
...............................................................................................................
Settings settings =
ImmutableSettings.settingsBuilder().put("cluster.name",
"elasticsearch257").build();
Client client = new TransportClient(settings).addTransportAddress(new
InetSocketTransportAddress("xxx.xxx.xxx.251", 9300));

IndexResponse response = client.prepareIndex("twitter", "tweet", 

"1").setSource(
jsonBuilder().startObject().field("user",
"kimchy").field("message", "trying out Elastic Search").endObject()
).execute().actionGet();

client.close();

................................................................................................................................
And I have Created one Runnable Jar file and place it in My Server System
File System using WINSCP and
I have Run that jar file, using Putty(from my Local System){connected to my
Server system}, using following command.,

java -cp sampleIndex.jar test.index.SampleIndex
// where sampleIndex.jar is runnable jar exported from SampleIndex.java
file and test.index is package name

Then -- I am getting the following Exception
org.elasticsearch.transport.NodeDisconnectedException:
[][inet[/192.168.2.251:9300]][cluster/nodes/info] disconnected
Exception in thread "main"
org.elasticsearch.client.transport.NoNodeAvailableException: No node
available

Can Any One Tell me, What I Have Done Wrong With My Code/Procedure?

Please Any One Tell me(share code to connect with server from my local
system),
How to Index Documents(push data) into My Server System(running under Linux
with IP address say., xxx.xxx.xxx.251) from My Local System(running in
windows 7 with ip address xxx.xxx.xxx.182) using Java API.

Thanks to you all.
Regards
Rafi

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.