# Connection refused on new RHEL7 installation

**URL:** <https://discuss.elastic.co/t/connection-refused-on-new-rhel7-installation/120535>\
**Category:** Elasticsearch\
**Created:** [February 19, 2018, 11:52pm UTC](https://discuss.elastic.co/t/connection-refused-on-new-rhel7-installation/120535 "2018-02-19T23:52:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pclaudiowsi](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pclaudiowsi](https://discuss.elastic.co/u/pclaudiowsi)\
**Post date:** [February 19, 2018, 11:52pm UTC](https://discuss.elastic.co/t/connection-refused-on-new-rhel7-installation/120535/1 "2018-02-19T23:52:39Z")

</div>

Hi, I'm new to ELK and just installed elasticsearch on RHEL7 with default configs. I can run curl successfully to [http://127.0.0.1:9200](http://127.0.0.1:9200) or [http://localhost:9200](http://localhost:9200), but not with [http://host1:9200](http://host1:9200):  
$ curl [http://host1](http://host1) --verbose

- About to connect() to host1 port 9200 (#0)
- Trying nn.nn.nn.nn...
- Connection refused
- Failed connect to host1:9200; Connection refused
- Closing connection 0  
curl: (7) Failed connect to host1:9200; Connection refused

Here's how the log looks like:  
[2018-02-19T15:29:08,589][INFO][o.e.n.Node] [] initializing ...  
[2018-02-19T15:29:08,682][INFO][o.e.e.NodeEnvironment] [lGXEuBD] using [1] data paths, mounts [[/app (/dev/mapper/vg\_root-lv\_app)]], net usable\_space [44.7gb], net total\_space [49gb], spins? [possibly], types [ext4]  
[2018-02-19T15:29:08,682][INFO][o.e.e.NodeEnvironment] [lGXEuBD] heap size [1.9gb], compressed ordinary object pointers [true]  
[2018-02-19T15:29:08,683][INFO][o.e.n.Node] node name [lGXEuBD] derived from node ID [lGXEuBDvStyhHnM2dumb9A]; set [node.name] to override  
[2018-02-19T15:29:08,684][INFO][o.e.n.Node] version[5.6.7], pid[42651], build[4669214/2018-01-25T21:14:50.776Z], OS[Linux/3.10.0-693.17.1.el7.x86\_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0\_144/25.144-b01]  
[2018-02-19T15:29:08,684][INFO][o.e.n.Node] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/app/elk-stack/elasticsearch/elasticsearch-5.6.7]  
[2018-02-19T15:29:09,603][INFO][o.e.p.PluginsService] [lGXEuBD] loaded module [aggs-matrix-stats]  
[2018-02-19T15:29:09,603][INFO][o.e.p.PluginsService] [lGXEuBD] loaded module [ingest-common]  
[2018-02-19T15:29:09,603][INFO][o.e.p.PluginsService] [lGXEuBD] loaded module [lang-expression]  
[2018-02-19T15:29:09,603][INFO][o.e.p.PluginsService] [lGXEuBD] loaded module [lang-groovy]  
[2018-02-19T15:29:09,603][INFO][o.e.p.PluginsService] [lGXEuBD] loaded module [lang-mustache]  
[2018-02-19T15:29:09,603][INFO][o.e.p.PluginsService] [lGXEuBD] loaded module [lang-painless]  
[2018-02-19T15:29:09,603][INFO][o.e.p.PluginsService] [lGXEuBD] loaded module [parent-join]  
[2018-02-19T15:29:09,604][INFO][o.e.p.PluginsService] [lGXEuBD] loaded module [percolator]  
[2018-02-19T15:29:09,604][INFO][o.e.p.PluginsService] [lGXEuBD] loaded module [reindex]  
[2018-02-19T15:29:09,604][INFO][o.e.p.PluginsService] [lGXEuBD] loaded module [transport-netty3]  
[2018-02-19T15:29:09,604][INFO][o.e.p.PluginsService] [lGXEuBD] loaded module [transport-netty4]  
[2018-02-19T15:29:09,605][INFO][o.e.p.PluginsService] [lGXEuBD] no plugins loaded  
[2018-02-19T15:29:11,058][INFO][o.e.d.DiscoveryModule] [lGXEuBD] using discovery type [zen]  
[2018-02-19T15:29:11,615][INFO][o.e.n.Node] initialized  
[2018-02-19T15:29:11,615][INFO][o.e.n.Node] [lGXEuBD] starting ...  
[2018-02-19T15:29:11,846][INFO][o.e.t.TransportService] [lGXEuBD] publish\_address {127.0.0.1:9300}, bound\_addresses {127.0.0.1:9300}  
[2018-02-19T15:29:11,859][WARN][o.e.b.BootstrapChecks] [lGXEuBD] max virtual memory areas vm.max\_map\_count [65530] is too low, increase to at least [262144]  
[2018-02-19T15:29:14,934][INFO][o.e.c.s.ClusterService] [lGXEuBD] new\_master {lGXEuBD}{lGXEuBDvStyhHnM2dumb9A}{qj8ixIPzTvW-EHmcyALW0A}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)  
[2018-02-19T15:29:14,986][INFO][o.e.g.GatewayService] [lGXEuBD] recovered [0] indices into cluster\_state  
[2018-02-19T15:29:14,988][INFO][o.e.h.n.Netty4HttpServerTransport] [lGXEuBD] publish\_address {127.0.0.1:9200}, bound\_addresses {127.0.0.1:9200}  
[2018-02-19T15:29:14,988][INFO][o.e.n.Node] [lGXEuBD] started

There is no firewall on the server.

Any suggestions on what else to look at?

Thanks!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 19, 2018, 11:54pm UTC](https://discuss.elastic.co/t/connection-refused-on-new-rhel7-installation/120535/2 "2018-02-19T23:54:18Z")

</div>

> [@pclaudiowsi](#):
>
> [2018-02-19T15:29:14,988][INFO][o.e.h.n.Netty4HttpServerTransport] [lGXEuBD] publish\_address {127.0.0.1:9200}, bound\_addresses {127.0.0.1:9200}

Look at the `network.host` config variable.

---

<div class="post-metadata">

**Author:** ![pclaudiowsi](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pclaudiowsi](https://discuss.elastic.co/u/pclaudiowsi)\
**Post date:** [February 20, 2018, 12:05am UTC](https://discuss.elastic.co/t/connection-refused-on-new-rhel7-installation/120535/3 "2018-02-20T00:05:20Z")

</div>

Thanks for the quick response...  
I did try adding network.host and still got the error bootstrap checks failed:  
[2018-02-19T16:00:47,659][INFO][o.e.n.Node] [lGXEuBD] starting ...  
[2018-02-19T16:00:47,874][INFO][o.e.t.TransportService] [lGXEuBD] publish\_address {192.168.41.6:9300}, bound\_addresses {192.168.41.6:9300}  
[2018-02-19T16:00:47,889][INFO][o.e.b.BootstrapChecks] [lGXEuBD] bound or publishing to a non-loopback address, enforcing bootstrap checks  
ERROR: [1] bootstrap checks failed  
[1]: max virtual memory areas vm.max\_map\_count [65530] is too low, increase to at least [262144]  
[2018-02-19T16:00:47,896][INFO][o.e.n.Node] [lGXEuBD] stopping ...  
[2018-02-19T16:00:47,936][INFO][o.e.n.Node] [lGXEuBD] stopped  
[2018-02-19T16:00:47,936][INFO][o.e.n.Node] [lGXEuBD] closing ...  
[2018-02-19T16:00:47,948][INFO][o.e.n.Node] [lGXEuBD] closed

Thanks!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 20, 2018, 12:57am UTC](https://discuss.elastic.co/t/connection-refused-on-new-rhel7-installation/120535/4 "2018-02-20T00:57:58Z")

</div>

Yep. You should also read [https://www.elastic.co/guide/en/elasticsearch/reference/6.2/setup.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/setup.html)

---

<div class="post-metadata">

**Author:** ![pclaudiowsi](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@pclaudiowsi](https://discuss.elastic.co/u/pclaudiowsi)\
**Post date:** [February 21, 2018, 11:40pm UTC](https://discuss.elastic.co/t/connection-refused-on-new-rhel7-installation/120535/5 "2018-02-21T23:40:07Z")

</div>

Thank you!

We are now able to connect to elasticsearch after explicitly setting the following params:  
transport.host  
transport.tcp.port  
network.host

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 23, 2018, 1:09am UTC](https://discuss.elastic.co/t/connection-refused-on-new-rhel7-installation/120535/6 "2018-02-23T01:09:31Z")

</div>

You only need to set `network.host` the rest will inherit that.

---

<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:** [March 23, 2018, 1:09am UTC](https://discuss.elastic.co/t/connection-refused-on-new-rhel7-installation/120535/7 "2018-03-23T01:09:52Z")

</div>

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