# None of the configured nodes are available: \[{#transport#-1}{...}{127.0.0.1}{127.0.0.1:9300}\]

**URL:** https://discuss.elastic.co/t/none-of-the-configured-nodes-are-available-transport-1-127-0-0-1-127-0-0-1-9300/65431
**Category:** Elasticsearch
**Created:** [November 9, 2016, 3:03am UTC](https://discuss.elastic.co/t/none-of-the-configured-nodes-are-available-transport-1-127-0-0-1-127-0-0-1-9300/65431 "2016-11-09T03:03:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kevinZ](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kevinz/32/13242_2.png) [@kevinZ](https://discuss.elastic.co/u/kevinZ)
#### Post date: [November 9, 2016, 3:03am UTC](https://discuss.elastic.co/t/none-of-the-configured-nodes-are-available-transport-1-127-0-0-1-127-0-0-1-9300/65431/1 "2016-11-09T03:03:06Z")

</div>

I use `ElasticSearch` v5.0 in java application and create index. But the 9300 port can't work.

```auto
Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{wT9q99-KSTObzOpHJGj5bA}{127.0.0.1}{127.0.0.1:9300}]]

```

![](https://us1.discourse-cdn.com/elastic/original/2X/9/98265f6c1417514b1bcd8819833b5abd9a66f4a0.png)  
This is java code:

```auto
public static void main(String[] args) {
        Settings settings = Settings.builder()
                .put("client.transport.sniff", true)
                .put("cluster.name", "clusterTest")
                .build();
        client = new PreBuiltTransportClient(settings)
                .addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress("127.0.0.1", 9300)));
        List<String> jsonList = DataFactory.getInitJsonData();
        String indexname = "esIndex";
        String type = "esType";

        ElasticApp app = new ElasticApp();
        app.createIndex(indexname, type, jsonList);
    }

    private void createIndex(String indexname, String type, List<String> jsonList){
        try {
            IndexRequestBuilder requestBuilder = client.prepareIndex(indexname, type, "1").setCreate(true);

            for (int i=0;i<jsonList.size();i++){
                requestBuilder.setSource(XContentFactory.jsonBuilder()
                        .startObject()
                        .field(jsonList.get(i))
                        .endObject()

                ).execute().actionGet();
            }
            System.out.print("Create Index Success");
        } catch (IOException e) {
            e.printStackTrace();
            System.out.print("Fdiled");
        }
    }

```

---

<div class="post-metadata">

### Author: ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)
#### Post date: [November 9, 2016, 9:49am UTC](https://discuss.elastic.co/t/none-of-the-configured-nodes-are-available-transport-1-127-0-0-1-127-0-0-1-9300/65431/2 "2016-11-09T09:49:12Z")

</div>

There are two ports used by Elasticsearch. The port 9200 provides access through http (e.g. your browser). The port 9300 is used for accessing Elasticsearch through the internal transport protocol, which is used by the Java transport client.

Can you check whether the `cluster.name` you've used in your java example corresponds to the cluster name you've used in your Elasticsearch cluster configuration (`elasticsearch.yml`)?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 7, 2016, 9:49am UTC](https://discuss.elastic.co/t/none-of-the-configured-nodes-are-available-transport-1-127-0-0-1-127-0-0-1-9300/65431/3 "2016-12-07T09:49:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
