# Providing transport addresses through yml file

**URL:** https://discuss.elastic.co/t/providing-transport-addresses-through-yml-file/8068
**Category:** Elasticsearch
**Created:** [June 13, 2012, 3:56am UTC](https://discuss.elastic.co/t/providing-transport-addresses-through-yml-file/8068 "2012-06-13T03:56:30Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Ashish\_Nigam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashish_nigam/32/2804_2.png) [@Ashish\_Nigam](https://discuss.elastic.co/u/Ashish_Nigam)
#### Post date: [June 13, 2012, 2:48pm UTC](https://discuss.elastic.co/t/providing-transport-addresses-through-yml-file/8068/3 "2012-06-13T14:48:19Z")

</div>

Isn't transport.host is used to bind to or publish a certain IP address of a node?  
If yes, then it cannot be used to specify remote host that will used to connect to for discovery.  
But I did try both of the following settings, and neither of it works -

transport.host: 192.168.1.8  
http\_host: 192.168.1.8

I get same NoNodeNameAvailable exception.

On Jun 13, 2012, at 2:46 AM, Sebastian Wendel wrote:

> Hi Ashish,
> 
> maybe that what you're looking for:
> 
> transport.host: _eth1:ipv4_
> 
> Greetings,  
> Sebastian
> 
> 2012/6/13 Ashish Nigam [ashish@skyhighnetworks.com](mailto:ashish@skyhighnetworks.com)  
> Hi,  
> I know we can create TransportClient with something like - new TransportClient(settings).addTransportAddress(new InetSocketTransportAddress(host, port));  
> But here, I have to explicitly provide host and port info in my code.
> 
> I tried to get the instance of Transport Client solely through configuration properties in yml file. But it does not seem to work. I am getting "NoNodeAvailableException".  
> Here's content of my yml file -
> 
> cluster.name: elasticsearch-test  
> node.name: test-client  
> node.master: false  
> node.data: false  
> node.client: true  
> http.enabled: false  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: "192.168.1.8:9300"
> 
> And here's what I am doing to get instance of TransportClient
> 
> Builder builder = ImmutableSettings.settingsBuilder().loadFromClasspath("elasticsearch\_test.yml");  
> TransportClient baseClient = new TransportClient(builder.build());
> 
> Call to baseClient.transportAddresses() returns null list object.
> 
> Is there any way to completely instantiate TransportClient without any explicit java code changes to add transport addresses?
> 
> Thanks  
> Ashish

---

_[View the full topic](https://discuss.elastic.co/t/providing-transport-addresses-through-yml-file/8068)._
