After doing some research, It seems to me that it is not possible to 
connect to a node configured as *node.local: true* using TransportClient.

... which leads me to the question:
What is the recommended way to setup a single node instance and to connect 
to it via Java API?

Regards,

Abid


Am Donnerstag, 29. Januar 2015 09:05:15 UTC+1 schrieb Abid Hussain:
>
> Hi all,
>
> I'm running a standalone node (by using *node.local: true* in 
> elasticsearch.yml) and want to connect to this node via TransportClient 
> which fails.
>
> Connecting to the node via Sense succeeds.
>
> I didn't change the cluster.name property in elasticsearch.yml.
>
> My Code is:
> Client client = new TransportClient().addTransportAddress(new 
> InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));
>
> Result is:
> *Exception in thread "main" 
> org.elasticsearch.client.transport.NoNodeAvailableException: None of the 
> configured nodes are available: []*
>
> Using
> Settings settings = ImmutableSettings.settingsBuilder().put("node.local", 
> "true").build();
> Client client = new TransportClient().addTransportAddress(new 
> InetSocketTransportAddress("xxx.xxx.xxx.xxx", 9300));
> doesn't help (results in same Exception).
>
> Any ideas what I can do? Is it possible at all to use TransportClient for 
> setting up a connection to a standalone node?
>
> Regards,
>
> Abid
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/e249b162-3a85-40f6-bc86-65d7a4e3809b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to