# After changing port number in Elasticsearch.yml file its get Failed to start Elasticsearch

**URL:** <https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115>\
**Category:** Elasticsearch\
**Created:** [April 8, 2020, 11:42am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115 "2020-04-08T11:42:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![MdRashid](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@MdRashid](https://discuss.elastic.co/u/MdRashid)\
**Post date:** [April 8, 2020, 11:42am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/1 "2020-04-08T11:42:53Z")

</div>

Elasticsearch v7.5.2 (I'm using it)  
Changing Port from 9200 to 9300

See below images you will get understand why i am facing this issue for the past 3 days

i want to give port number of 9300 instead of 9200 in elasticsearch.yml file. After changing the port number i restart the service of elasticsearch after that its get failed to start and when i give http.port on 9200 it work fine but not on 9300.

what is transport.tcp.port: 9300, i added in elasticsearch.yml file its correct or wrong to please see all images in attached.

please do help me urgently

 ![3](https://us1.discourse-cdn.com/elastic/original/3X/4/6/46c9a4856c94904e79f02fee48df463b7266c41a.png) ![4 log files](https://us1.discourse-cdn.com/elastic/original/3X/b/2/b21368da16f5f0cf1a73d2eb309f290351b2595b.png) ![2](https://us1.discourse-cdn.com/elastic/original/3X/6/9/694affd58b0de57aba36fa15273fefc37ef8aaf7.png) ![1](https://us1.discourse-cdn.com/elastic/original/3X/4/6/4651c9b4997e4b6b8c4dea6b6bd1e3e465814a49.png) ![5](https://us1.discourse-cdn.com/elastic/original/3X/c/0/c0462952edc72bda4cdb673d733755eec7ae3e91.png)

---

<div class="post-metadata">

**Author:** ![Yang\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_wang/32/48857_2.png) [@Yang\_Wang](https://discuss.elastic.co/u/Yang_Wang)\
**Post date:** [April 8, 2020, 1:11pm UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/2 "2020-04-08T13:11:27Z")

</div>

Port 9300 is the default port used by the transport layer, i.e. communication between elalsticsearch nodes if you have a multi-mode cluster.

Since you set `http.port: 9300`, you need set `transport.port` to something else. Otherwise you'll get port conflict.

`transport.tcp.port` is for old version of Elasticsearch. Since you have v7.5.2, it should not concern you.

In one of your screenshot, there is an error message says "Received handshake message from unsupported version: [5.0.0] minimal compatible version is: [6.8.0]". You will need to make sure there is no other "old" elasticsearch instance running and trying to join the cluster.

---

<div class="post-metadata">

**Author:** ![MdRashid](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@MdRashid](https://discuss.elastic.co/u/MdRashid)\
**Post date:** [April 8, 2020, 6:04pm UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/3 "2020-04-08T18:04:08Z")

</div>

ok Thanks

i will remove old version of elasticsearch but i want to add 9300 port

I added but its get failed to start. Can you give me steps how i can change

---

<div class="post-metadata">

**Author:** ![Yang\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_wang/32/48857_2.png) [@Yang\_Wang](https://discuss.elastic.co/u/Yang_Wang)\
**Post date:** [April 9, 2020, 1:58am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/4 "2020-04-09T01:58:11Z")

</div>

Explicity set `transport.port` to something else in the configuration yml file, e.g.:

```auto
http.port: 9300
transport.port: 9400

```

---

<div class="post-metadata">

**Author:** ![MdRashid](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@MdRashid](https://discuss.elastic.co/u/MdRashid)\
**Post date:** [April 9, 2020, 8:39am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/5 "2020-04-09T08:39:36Z")

</div>

Thanks its Work for me

---

<div class="post-metadata">

**Author:** ![MdRashid](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@MdRashid](https://discuss.elastic.co/u/MdRashid)\
**Post date:** [April 14, 2020, 6:33am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/6 "2020-04-14T06:33:40Z")

</div>

i want to how to remove the old version of elasticsearch because i search in google try it but i dont know whether old version has been remove or not .

if you give me some commands i will try it

---

<div class="post-metadata">

**Author:** ![MdRashid](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@MdRashid](https://discuss.elastic.co/u/MdRashid)\
**Post date:** [April 14, 2020, 9:01am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/7 "2020-04-14T09:01:48Z")

</div>

please help me below error with images

`failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: `

![Screenshot from 2020-04-14 12-39-07](https://us1.discourse-cdn.com/elastic/original/3X/4/b/4bd19a742bcf21cdebea981bf5869eedce3756ed.png)

 ![Screenshot from 2020-04-14 14-23-09](https://us1.discourse-cdn.com/elastic/original/3X/d/9/d9ad14987350735cfb7407f60f7d2ff452685835.png) ![Screenshot from 2020-04-14 12-40-28](https://us1.discourse-cdn.com/elastic/original/3X/0/f/0f6c04f880c5fb69fd3b17328e6a4fd23d74a363.png)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 14, 2020, 9:15am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/8 "2020-04-14T09:15:05Z")

</div>

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with `</>` icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 14, 2020, 10:17am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/11 "2020-04-14T10:17:30Z")

</div>

There is no evidence of anything related to elasticsearch in this stacktrace.  
Why do you think it's an issue with elasticsearch?

---

<div class="post-metadata">

**Author:** ![MdRashid](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@MdRashid](https://discuss.elastic.co/u/MdRashid)\
**Post date:** [April 14, 2020, 10:19am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/12 "2020-04-14T10:19:25Z")

</div>

ok  
please have a look at below issue

Im using ubuntu 18.04

`failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available:`

this is my application.properties

````auto
ELASTICSEARCH_HOST=localhost
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${ELASTICSEARCH_HOST}:9300
#spring.data.elasticsearch.local=false
#spring.data.elasticsearch.properties.transport.tcp.connect_timeout=60s
#spring.data.elasticsearch.properties.*=
spring.data.elasticsearch.repositories.enabled=true
#spring.data.elasticsearch.properties.host = server
#spring.data.elasticsearch.properties.elasticsearch.port = 9300```
````

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 14, 2020, 1:20pm UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/13 "2020-04-14T13:20:13Z")

</div>

is elasticsearch running locally?

If not, could you share the full logs of elasticsearch?

---

<div class="post-metadata">

**Author:** ![MdRashid](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@MdRashid](https://discuss.elastic.co/u/MdRashid)\
**Post date:** [April 14, 2020, 1:29pm UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/14 "2020-04-14T13:29:35Z")

</div>

Yes its running locally  
and also please do share me how to remove old version of elasticsearch i search from google and try but i dont know whether it has remove or not

here is the full logs

````auto
[2020-04-14T08:54:55,209][INFO][o.e.e.NodeEnvironment] [DevOps] heap size [990.7mb], compressed ordinary object pointers [true]
[2020-04-14T08:54:55,308][INFO][o.e.n.Node] [DevOps] node name [DevOps], node ID [ImFqlsTCR1qRzqi8RHIIvA], cluster name [elasticsearch]
[2020-04-14T08:54:55,309][INFO][o.e.n.Node] [DevOps] version[7.5.2], pid[2755], build[default/deb/8bec50e1e0ad29dad5653712cf3bb580cd1afcdf/2020-01-15T12:11:52.313576Z], OS[Linux/5.3.0-40-generic/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/13.0.1/13.0.1+9]
[2020-04-14T08:54:55,310][INFO][o.e.n.Node] [DevOps] JVM home [/usr/share/elasticsearch/jdk]
[2020-04-14T08:54:55,310][INFO][o.e.n.Node] [DevOps] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=COMPAT, -Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/tmp/elasticsearch-2306537318249287079, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -XX:MaxDirectMemorySize=536870912, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=deb, -Des.bundled_jdk=true]
[2020-04-14T08:55:01,821][INFO][o.e.p.PluginsService] [DevOps] loaded module [aggs-matrix-stats]
[2020-04-14T08:55:01,822][INFO][o.e.p.PluginsService] [DevOps] loaded module [analysis-common]
[2020-04-14T08:55:01,822][INFO][o.e.p.PluginsService] [DevOps] loaded module [flattened]
[2020-04-14T08:55:01,822][INFO][o.e.p.PluginsService] [DevOps] loaded module [frozen-indices]
[2020-04-14T08:55:01,823][INFO][o.e.p.PluginsService] [DevOps] loaded module [ingest-common]
[2020-04-14T08:55:01,823][INFO][o.e.p.PluginsService] [DevOps] loaded module [ingest-geoip]
[2020-04-14T08:55:01,823][INFO][o.e.p.PluginsService] [DevOps] loaded module [ingest-user-agent]
[2020-04-14T08:55:01,824][INFO][o.e.p.PluginsService] [DevOps] loaded module [lang-expression]
[2020-04-14T08:55:01,824][INFO][o.e.p.PluginsService] [DevOps] loaded module [lang-mustache]
[2020-04-14T08:55:01,824][INFO][o.e.p.PluginsService] [DevOps] loaded module [lang-painless]
[2020-04-14T08:55:01,825][INFO][o.e.p.PluginsService] [DevOps] loaded module [mapper-extras]
[2020-04-14T08:55:01,825][INFO][o.e.p.PluginsService] [DevOps] loaded module [parent-join]
[2020-04-14T08:55:01,825][INFO][o.e.p.PluginsService] [DevOps] loaded module [percolator]
[2020-04-14T08:55:01,825][INFO][o.e.p.PluginsService] [DevOps] loaded module [rank-eval]
[2020-04-14T08:55:01,828][INFO][o.e.p.PluginsService] [DevOps] loaded module [reindex]
[2020-04-14T08:55:01,828][INFO][o.e.p.PluginsService] [DevOps] loaded module [repository-url]
[2020-04-14T08:55:01,829][INFO][o.e.p.PluginsService] [DevOps] loaded module [search-business-rules]
[2020-04-14T08:55:01,829][INFO][o.e.p.PluginsService] [DevOps] loaded module [spatial]
[2020-04-14T08:55:01,829][INFO][o.e.p.PluginsService] [DevOps] loaded module [systemd]
[2020-04-14T08:55:01,830][INFO][o.e.p.PluginsService] [DevOps] loaded module [transform]
[2020-04-14T08:55:01,830][INFO][o.e.p.PluginsService] [DevOps] loaded module [transport-netty4]
[2020-04-14T08:55:01,830][INFO][o.e.p.PluginsService] [DevOps] loaded module [vectors]
[2020-04-14T08:55:01,831][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-analytics]
[2020-04-14T08:55:01,831][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-ccr]
[2020-04-14T08:55:01,831][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-core]
[2020-04-14T08:55:01,831][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-deprecation]
[2020-04-14T08:55:01,832][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-enrich]
[2020-04-14T08:55:01,832][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-graph]
[2020-04-14T08:55:01,832][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-ilm]
[2020-04-14T08:55:01,832][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-logstash]
[2020-04-14T08:55:01,833][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-ml]
[2020-04-14T08:55:01,833][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-monitoring]
[2020-04-14T08:55:01,833][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-rollup]
[2020-04-14T08:55:01,834][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-security]
[2020-04-14T08:55:01,834][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-sql]
[2020-04-14T08:55:01,834][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-voting-only-node]
[2020-04-14T08:55:01,835][INFO][o.e.p.PluginsService] [DevOps] loaded module [x-pack-watcher]
[2020-04-14T08:55:01,835][INFO][o.e.p.PluginsService] [DevOps] no plugins loaded
[2020-04-14T08:55:09,710][INFO][o.e.x.s.a.s.FileRolesStore] [DevOps] parsed [0] roles from file [/etc/elasticsearch/roles.yml]
[2020-04-14T08:55:11,106][INFO][o.e.x.m.p.l.CppLogMessageHandler] [DevOps] [controller/3542] [Main.cc@110] controller (64 bit): Version 7.5.2 (Build 68f6981dfb8e2d) Copyright (c) 2020 Elasticsearch BV
[2020-04-14T08:55:12,621][DEBUG][o.e.a.ActionModule] [DevOps] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2020-04-14T08:55:12,979][INFO][o.e.d.DiscoveryModule] [DevOps] using discovery type [zen] and seed hosts providers [settings]
[2020-04-14T08:55:15,321][INFO][o.e.n.Node] [DevOps] initialized
[2020-04-14T08:55:15,321][INFO][o.e.n.Node] [DevOps] starting ...
[2020-04-14T08:55:15,914][INFO][o.e.t.TransportService] [DevOps] publish_address {127.0.0.1:9400}, bound_addresses {127.0.0.1:9400}
[2020-04-14T08:55:17,533][WARN][o.e.b.BootstrapChecks] [DevOps] the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
[2020-04-14T08:55:17,548][INFO][o.e.c.c.Coordinator] [DevOps] cluster UUID [i90L8f9rSNidimSWzXH9wQ]
[2020-04-14T08:55:17,642][INFO][o.e.c.c.ClusterBootstrapService] [DevOps] no discovery configuration found, will perform best-effort cluster bootstrapping after [3s] unless existing master is discovered
[2020-04-14T08:55:18,174][INFO][o.e.c.s.MasterService] [DevOps] elected-as-master ([1] nodes joined)[{DevOps}{ImFqlsTCR1qRzqi8RHIIvA}{EctUl7DcSTW4t9abIag5lA}{127.0.0.1}{127.0.0.1:9400}{dilm}{ml.machine_memory=16251056128, xpack.installed=true, ml.max_open_jobs=20} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 152, version: 886, delta: master node changed {previous [], current [{DevOps}{ImFqlsTCR1qRzqi8RHIIvA}{EctUl7DcSTW4t9abIag5lA}{127.0.0.1}{127.0.0.1:9400}{dilm}{ml.machine_memory=16251056128, xpack.installed=true, ml.max_open_jobs=20}]}
[2020-04-14T08:55:20,513][INFO][o.e.c.s.ClusterApplierService] [DevOps] master node changed {previous [], current [{DevOps}{ImFqlsTCR1qRzqi8RHIIvA}{EctUl7DcSTW4t9abIag5lA}{127.0.0.1}{127.0.0.1:9400}{dilm}{ml.machine_memory=16251056128, xpack.installed=true, ml.max_open_jobs=20}]}, term: 152, version: 886, reason: Publication{term=152, version=886}
[2020-04-14T08:55:20,711][INFO][o.e.h.AbstractHttpServerTransport] [DevOps] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
[2020-04-14T08:55:20,711][INFO][o.e.n.Node] [DevOps] started
[2020-04-14T08:55:22,671][INFO][o.e.l.LicenseService] [DevOps] license [fa4b1c77-76d7-4837-affb-07aa84995b74] mode [basic] - valid
[2020-04-14T08:55:22,673][INFO][o.e.x.s.s.SecurityStatusChangeListener] [DevOps] Active license is now [BASIC]; Security is disabled
[2020-04-14T08:55:22,714][INFO][o.e.g.GatewayService] [DevOps] recovered [3] indices into cluster_state
[2020-04-14T08:55:34,677][INFO][o.e.c.r.a.AllocationService] [DevOps] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[.apm-agent-configuration][0]]]).
[2020-04-14T16:39:14,642][INFO][o.e.m.j.JvmGcMonitorService] [DevOps] [gc][23476] overhead, spent [354ms] collecting in the last [1s]```
````

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 14, 2020, 3:57pm UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/15 "2020-04-14T15:57:37Z")

</div>

Sounds like you changed the transport port to 9400.  
So you might have to change this

```
spring.data.elasticsearch.cluster-nodes=${ELASTICSEARCH_HOST}:9300

```

to

```
spring.data.elasticsearch.cluster-nodes=${ELASTICSEARCH_HOST}:9400
```

---

<div class="post-metadata">

**Author:** ![MdRashid](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@MdRashid](https://discuss.elastic.co/u/MdRashid)\
**Post date:** [April 15, 2020, 4:09am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/16 "2020-04-15T04:09:34Z")

</div>

but still i'm getting error after changing port number

failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{w6EBzOANTCOj7GCaIM6xIw}{localhost}{127.0.0.1:9300}]

and do u have any idea on below issue

```auto
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "spring_session_attributes_pk"

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 15, 2020, 4:50am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/17 "2020-04-15T04:50:11Z")

</div>

Where did you change the port number. Logs are still saying `127.0.0.1:9300`.

> [@MdRashid](#):
>
> and do u have any idea on below issue
> 
> ```auto
> Caused by: org.postgresql.util.PSQLException: ERROR
> 
> ```

It's not related to elasticsearch.

---

<div class="post-metadata">

**Author:** ![MdRashid](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@MdRashid](https://discuss.elastic.co/u/MdRashid)\
**Post date:** [April 15, 2020, 5:46am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/18 "2020-04-15T05:46:12Z")

</div>

Here is the elasticsearch.yml configuration file

i have set this in network

# ---------------------------------- Network -----------------------------------

# 

# Set the bind address to a specific IP (IPv4 or IPv6):

# 

network.host: 127.0.0.1

# 

# Set a custom port for HTTP:

# 

http.port: 9300  
transport.port: 9400

# 

# For more information, consult the network module documentation.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 15, 2020, 9:30am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/19 "2020-04-15T09:30:49Z")

</div>

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with `</>` icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

> [@MdRashid](#):
>
> i change in elasticsearch.yml file

So you did not apply my advice? Please read again [After changing port number in Elasticsearch.yml file its get Failed to start Elasticsearch - #15 by dadoonet](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/15)

---

<div class="post-metadata">

**Author:** ![MdRashid](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@MdRashid](https://discuss.elastic.co/u/MdRashid)\
**Post date:** [April 15, 2020, 12:36pm UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/20 "2020-04-15T12:36:10Z")

</div>

> [@MdRashid](#):
>
> Here is the elasticsearch.yml configuration file
> 
> i have set this in network
> 
> # ---------------------------------- Network -----------------------------------
> 
> # Set the bind address to a specific IP (IPv4 or IPv6):
> 
> network.host: 127.0.0.1
> 
> # Set a custom port for HTTP:
> 
> http.port: 9300  
> transport.port: 9400

I have applied but its again showing error  
failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException:  
None of the configured nodes are available: [{#transport#-1}{w6EBzOANTCOj7GCaIM6xIw}{localhost}{127.0.0.1:9400}]

In my application its showing like below  
None of the configured nodes are available: [{#transport#-1}{6NuBrVa2STeE0-C20vg23A}{localhost}{127.0.0.1:9400}]

---

<div class="post-metadata">

**Author:** ![MdRashid](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@MdRashid](https://discuss.elastic.co/u/MdRashid)\
**Post date:** [April 16, 2020, 7:05am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/21 "2020-04-16T07:05:34Z")

</div>

@dadoonet @Yang_Wang

still i am getting below error  
`failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{w6EBzOANTCOj7GCaIM6xIw}{localhost}{127.0.0.1:9400}] `

```auto
see below my elasticsearch.yml file
http.port: 9300
transport.port: 9400

```

---

<div class="post-metadata">

**Author:** ![Yang\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_wang/32/48857_2.png) [@Yang\_Wang](https://discuss.elastic.co/u/Yang_Wang)\
**Post date:** [April 16, 2020, 8:09am UTC](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115/22 "2020-04-16T08:09:13Z")

</div>

Please first make sure elasticsearch by itself starts up fine and works normally. The simplest way to ensure it is to start elasticsearch and then just issue a few curl commands to make sure it respond properly.

If above works, you can then be sure the problem is in your Spring application or network. A simple Tip is to make sure elasticsearch and your application are not running in separate docker containers because `localhost` means different things in containers.

If you still keep getting errors from your Spring application, you might wanna take the question to Spring Data Elasticsearch since they are the experts on this particular topic.

[Next page](https://discuss.elastic.co/t/after-changing-port-number-in-elasticsearch-yml-file-its-get-failed-to-start-elasticsearch/227115.md?page=2)
