# ElasticSearch 7.2 not able to connect from localhost

**URL:** https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933
**Category:** Elasticsearch
**Created:** [July 11, 2019, 8:07am UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933 "2019-07-11T08:07:28Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![sukarn001](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukarn001/32/49865_2.png) [@sukarn001](https://discuss.elastic.co/u/sukarn001)
#### Post date: [July 11, 2019, 8:07am UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933/1 "2019-07-11T08:07:28Z")

</div>

Hello,

I have recently installed elasticsearch 7.2 on my Ubuntu 18.04. Initially elasticsearch service was not starting due to some Java issue, Once I installed java and set JAVA\_HOME, service started working fine and is showing Active running. However, when I run curl localhost:9200, it gives me error connection refused. I have checked elasticsearch.yml file and made entry in **network.host: [_host_,_site_]**. Still no good. Please assist.

---

<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: [July 11, 2019, 8:21am UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933/2 "2019-07-11T08:21:30Z")

</div>

Please share your logs, formatted according to the forum rules, thanks.

---

<div class="post-metadata">

### Author: ![sukarn001](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukarn001/32/49865_2.png) [@sukarn001](https://discuss.elastic.co/u/sukarn001)
#### Post date: [July 12, 2019, 2:45am UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933/3 "2019-07-12T02:45:47Z")

</div>

Hi,

Now its seems elasticsearch is working, when i changed host setting to 127.0.0.1, I am able to see curl results. But still when i change it to **[_local_,site\_]**. it stops working. I have already check firewall etc.

---

<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: [July 12, 2019, 6:18am UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933/4 "2019-07-12T06:18:23Z")

</div>

Please share your logs, formatted according to the forum rules, thanks.

---

<div class="post-metadata">

### Author: ![sukarn001](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukarn001/32/49865_2.png) [@sukarn001](https://discuss.elastic.co/u/sukarn001)
#### Post date: [July 15, 2019, 5:17am UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933/5 "2019-07-15T05:17:34Z")

</div>

[2019-07-15T10:38:35,456][INFO][o.e.p.PluginsService] [node-1] loaded module [analysis-common]  
[2019-07-15T10:38:35,456][INFO][o.e.p.PluginsService] [node-1] loaded module [data-frame]  
[2019-07-15T10:38:35,456][INFO][o.e.p.PluginsService] [node-1] loaded module [ingest-common]  
[2019-07-15T10:38:35,457][INFO][o.e.p.PluginsService] [node-1] loaded module [ingest-geoip]  
[2019-07-15T10:38:35,457][INFO][o.e.p.PluginsService] [node-1] loaded module [ingest-user-agent]  
[2019-07-15T10:38:35,457][INFO][o.e.p.PluginsService] [node-1] loaded module [lang-expression]  
[2019-07-15T10:38:35,458][INFO][o.e.p.PluginsService] [node-1] loaded module [lang-mustache]  
[2019-07-15T10:38:35,458][INFO][o.e.p.PluginsService] [node-1] loaded module [lang-painless]  
[2019-07-15T10:38:35,459][INFO][o.e.p.PluginsService] [node-1] loaded module [mapper-extras]  
[2019-07-15T10:38:35,461][INFO][o.e.p.PluginsService] [node-1] loaded module [parent-join]  
[2019-07-15T10:38:35,462][INFO][o.e.p.PluginsService] [node-1] loaded module [percolator]  
[2019-07-15T10:38:35,462][INFO][o.e.p.PluginsService] [node-1] loaded module [rank-eval]  
[2019-07-15T10:38:35,463][INFO][o.e.p.PluginsService] [node-1] loaded module [reindex]  
[2019-07-15T10:38:35,463][INFO][o.e.p.PluginsService] [node-1] loaded module [repository-url]  
[2019-07-15T10:38:35,465][INFO][o.e.p.PluginsService] [node-1] loaded module [transport-netty4]  
[2019-07-15T10:38:35,465][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-ccr]  
[2019-07-15T10:38:35,465][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-core]  
[2019-07-15T10:38:35,466][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-deprecation]  
[2019-07-15T10:38:35,466][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-graph]  
[2019-07-15T10:38:35,466][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-ilm]  
[2019-07-15T10:38:35,467][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-logstash]  
[2019-07-15T10:38:35,469][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-ml]  
[2019-07-15T10:38:35,469][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-monitoring]  
[2019-07-15T10:38:35,471][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-rollup]  
[2019-07-15T10:38:35,471][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-security]  
[2019-07-15T10:38:35,472][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-sql]  
[2019-07-15T10:38:35,472][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-watcher]  
[2019-07-15T10:38:35,477][INFO][o.e.p.PluginsService] [node-1] no plugins loaded  
[2019-07-15T10:38:44,089][INFO][o.e.x.s.a.s.FileRolesStore] [node-1] parsed [0] roles from file [/etc/elasticsearch/roles.yml]  
[2019-07-15T10:38:45,257][INFO][o.e.x.m.p.l.CppLogMessageHandler] [node-1] [controller/13802] [Main.cc@110] controller (64 bit): Version 7.2.0 (Build 65aefcbfce449b) Copyright (c) 2019 Elasticsearch BV  
[2019-07-15T10:38:46,095][DEBUG][o.e.a.ActionModule] [node-1] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security  
[2019-07-15T10:38:46,720][INFO][o.e.d.DiscoveryModule] [node-1] using discovery type [zen] and seed hosts providers [settings]  
[2019-07-15T10:38:48,305][INFO][o.e.n.Node] [node-1] initialized  
[2019-07-15T10:38:48,305][INFO][o.e.n.Node] [node-1] starting ...  
[2019-07-15T10:38:48,565][INFO][o.e.t.TransportService] [node-1] publish\_address {127.0.0.1:9300}, bound\_addresses {[::1]:9300}, {127.0.0.1:9300}  
[2019-07-15T10:38:48,720][WARN][o.e.b.BootstrapChecks] [node-1] 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  
[2019-07-15T10:38:48,730][INFO][o.e.c.c.Coordinator] [node-1] cluster UUID [eO0dQ5G0Td-B8AQct9AJWg]  
[2019-07-15T10:38:48,748][INFO][o.e.c.c.ClusterBootstrapService] [node-1] no discovery configuration found, will perform best-effort cluster bootstrapping after [3s] unless existing master is discovered  
[2019-07-15T10:38:49,042][INFO][o.e.c.s.MasterService] [node-1] elected-as-master ([1] nodes joined)[{node-1}{HvkF3-INRoaauJbnlAEYiA}{ubyC\_8A5TWKCZXSlXUUkSw}{127.0.0.1}{127.0.0.1:9300}{ml.machine\_memory=8364986368, xpack.installed=true, ml.max\_open\_jobs=20} elect leader, _BECOME\_MASTER\_TASK_, _FINISH\_ELECTION_], term: 7, version: 31, reason: master node changed {previous , current [{node-1}{HvkF3-INRoaauJbnlAEYiA}{ubyC\_8A5TWKCZXSlXUUkSw}{127.0.0.1}{127.0.0.1:9300}{ml.machine\_memory=8364986368, xpack.installed=true, ml.max\_open\_jobs=20}]}  
[2019-07-15T10:38:49,220][INFO][o.e.c.s.ClusterApplierService] [node-1] master node changed {previous , current [{node-1}{HvkF3-INRoaauJbnlAEYiA}{ubyC\_8A5TWKCZXSlXUUkSw}{127.0.0.1}{127.0.0.1:9300}{ml.machine\_memory=8364986368, xpack.installed=true, ml.max\_open\_jobs=20}]}, term: 7, version: 31, reason: Publication{term=7, version=31}  
[2019-07-15T10:38:49,298][INFO][o.e.h.AbstractHttpServerTransport] [node-1] publish\_address {127.0.0.1:9200}, bound\_addresses {[::1]:9200}, {127.0.0.1:9200}  
[2019-07-15T10:38:49,310][INFO][o.e.n.Node] [node-1] started  
[2019-07-15T10:38:49,795][INFO][o.e.l.LicenseService] [node-1] license [0f286432-2dde-42e7-ab6d-50094da27b45] mode [basic] - valid  
[2019-07-15T10:38:49,819][INFO][o.e.g.GatewayService] [node-1] recovered [0] indices into cluster\_state

---

<div class="post-metadata">

### Author: ![sukarn001](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukarn001/32/49865_2.png) [@sukarn001](https://discuss.elastic.co/u/sukarn001)
#### Post date: [July 15, 2019, 5:19am UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933/6 "2019-07-15T05:19:03Z")

</div>

These are the logs after I commented out **network.host** option in elasticsearch.yml. Now i can access it locally not remotely.

---

<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: [July 15, 2019, 6:35am UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933/7 "2019-07-15T06:35:28Z")

</div>

We need the logs when it fails.

Please [read this](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) about how to format.

---

<div class="post-metadata">

### Author: ![sukarn001](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukarn001/32/49865_2.png) [@sukarn001](https://discuss.elastic.co/u/sukarn001)
#### Post date: [July 15, 2019, 7:50am UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933/9 "2019-07-15T07:50:38Z")

</div>

```
[2019-07-15T13:13:57,783][INFO][o.e.e.NodeEnvironment] [node-1] heap size [1.9gb], compressed ordinary object pointers [true]
[2019-07-15T13:13:57,791][INFO][o.e.n.Node] [node-1] node name [node-1], node ID [HvkF3-INRoaauJbnlAEYiA], cluster name [My-Elastic]
[2019-07-15T13:13:57,791][INFO][o.e.n.Node] [node-1] version[7.2.0], pid[2434], build[default/deb/508c38a/2019-06-20T15:54:18.811730Z], OS[Linux/4.18.0-25-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/12.0.1/12.0.1+12]
[2019-07-15T13:13:57,797][INFO][o.e.n.Node] [node-1] JVM home [/usr/share/elasticsearch/jdk]
[2019-07-15T13:13:57,797][INFO][o.e.n.Node] [node-1] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -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, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch-11749557243626456332, -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, -Djava.locale.providers=COMPAT, -Dio.netty.allocator.type=pooled, -XX:MaxDirectMemorySize=1073741824, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=deb, -Des.bundled_jdk=true]
[2019-07-15T13:14:01,529][INFO][o.e.p.PluginsService] [node-1] loaded module [aggs-matrix-stats]
[2019-07-15T13:14:01,530][INFO][o.e.p.PluginsService] [node-1] loaded module [analysis-common]
[2019-07-15T13:14:01,530][INFO][o.e.p.PluginsService] [node-1] loaded module [data-frame]
[2019-07-15T13:14:01,531][INFO][o.e.p.PluginsService] [node-1] loaded module [ingest-common]
[2019-07-15T13:14:01,531][INFO][o.e.p.PluginsService] [node-1] loaded module [ingest-geoip]
[2019-07-15T13:14:01,532][INFO][o.e.p.PluginsService] [node-1] loaded module [ingest-user-agent]
[2019-07-15T13:14:01,532][INFO][o.e.p.PluginsService] [node-1] loaded module [lang-expression]
[2019-07-15T13:14:01,533][INFO][o.e.p.PluginsService] [node-1] loaded module [lang-mustache]
[2019-07-15T13:14:01,533][INFO][o.e.p.PluginsService] [node-1] loaded module [lang-painless]
[2019-07-15T13:14:01,534][INFO][o.e.p.PluginsService] [node-1] loaded module [mapper-extras]
[2019-07-15T13:14:01,534][INFO][o.e.p.PluginsService] [node-1] loaded module [parent-join]
[2019-07-15T13:14:01,535][INFO][o.e.p.PluginsService] [node-1] loaded module [percolator]
[2019-07-15T13:14:01,535][INFO][o.e.p.PluginsService] [node-1] loaded module [rank-eval]
[2019-07-15T13:14:01,536][INFO][o.e.p.PluginsService] [node-1] loaded module [reindex]
[2019-07-15T13:14:01,536][INFO][o.e.p.PluginsService] [node-1] loaded module [repository-url]
[2019-07-15T13:14:01,536][INFO][o.e.p.PluginsService] [node-1] loaded module [transport-netty4]
[2019-07-15T13:14:01,540][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-ccr]
[2019-07-15T13:14:01,541][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-core]
[2019-07-15T13:14:01,541][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-deprecation]
[2019-07-15T13:14:01,541][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-graph]
[2019-07-15T13:14:01,542][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-ilm]
[2019-07-15T13:14:01,542][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-logstash]
[2019-07-15T13:14:01,542][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-ml]
[2019-07-15T13:14:01,543][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-monitoring]
[2019-07-15T13:14:01,544][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-rollup]
[2019-07-15T13:14:01,544][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-security]
[2019-07-15T13:14:01,545][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-sql]
[2019-07-15T13:14:01,545][INFO][o.e.p.PluginsService] [node-1] loaded module [x-pack-watcher]
[2019-07-15T13:14:01,545][INFO][o.e.p.PluginsService] [node-1] no plugins loaded
[2019-07-15T13:14:10,116][INFO][o.e.x.s.a.s.FileRolesStore] [node-1] parsed [0] roles from file [/etc/elasticsearch/roles.yml]
[2019-07-15T13:14:11,743][INFO][o.e.x.m.p.l.CppLogMessageHandler] [node-1] [controller/2530] [Main.cc@110] controller (64 bit): Version 7.2.0 (Build 65aefcbfce449b) Copyright (c) 2019 Elasticsearch BV
[2019-07-15T13:14:12,665][DEBUG][o.e.a.ActionModule] [node-1] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-07-15T13:14:13,407][INFO][o.e.d.DiscoveryModule] [node-1] using discovery type [zen] and seed hosts providers [settings]
[2019-07-15T13:14:15,064][INFO][o.e.n.Node] [node-1] initialized
[2019-07-15T13:14:15,065][INFO][o.e.n.Node] [node-1] starting ...
[2019-07-15T13:14:15,349][INFO][o.e.t.TransportService] [node-1] publish_address {172.18.64.29:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}, {172.18.64.29:9300}
[2019-07-15T13:14:15,362][INFO][o.e.b.BootstrapChecks] [node-1] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2019-07-15T13:14:15,483][ERROR][o.e.b.Bootstrap] [node-1] node validation exception
[1] bootstrap checks failed
[1]: 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
[2019-07-15T13:14:15,490][INFO][o.e.n.Node] [node-1] stopping ...
[2019-07-15T13:14:15,520][INFO][o.e.n.Node] [node-1] stopped
[2019-07-15T13:14:15,520][INFO][o.e.n.Node] [node-1] closing ...
[2019-07-15T13:14:15,543][INFO][o.e.n.Node] [node-1] closed
[2019-07-15T13:14:15,549][INFO][o.e.x.m.p.NativeController] [node-1] Native controller process has stopped - no new native processes can be started
```

---

<div class="post-metadata">

### Author: ![sukarn001](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukarn001/32/49865_2.png) [@sukarn001](https://discuss.elastic.co/u/sukarn001)
#### Post date: [July 15, 2019, 7:52am UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933/10 "2019-07-15T07:52:50Z")

</div>

These are the logs. current setting is ![34](https://us1.discourse-cdn.com/elastic/original/3X/3/0/30535c7acc387f7a3d2146c01bc23db92a5d9b5c.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: [July 15, 2019, 9:52am UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933/11 "2019-07-15T09:52:00Z")

</div>

Please read [https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html)

---

<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: [August 12, 2019, 9:52am UTC](https://discuss.elastic.co/t/elasticsearch-7-2-not-able-to-connect-from-localhost/189933/12 "2019-08-12T09:52:07Z")

</div>

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