# Service starts but connections refused on public IP and localhost

**URL:** <https://discuss.elastic.co/t/service-starts-but-connections-refused-on-public-ip-and-localhost/128851>\
**Category:** Elasticsearch\
**Created:** [April 20, 2018, 10:20am UTC](https://discuss.elastic.co/t/service-starts-but-connections-refused-on-public-ip-and-localhost/128851 "2018-04-20T10:20:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ant/32/33267_2.png) [@Ant](https://discuss.elastic.co/u/Ant)\
**Post date:** [April 20, 2018, 10:20am UTC](https://discuss.elastic.co/t/service-starts-but-connections-refused-on-public-ip-and-localhost/128851/1 "2018-04-20T10:20:25Z")

</div>

OK the story so far:

upgraded dev box from 5.6.6 to 6.2.4 for more info see

> [@Upgrade from 5.6.6 to 6.2.4, elastic failed to start](https://discuss.elastic.co/t/upgrade-from-5-6-6-to-6-2-4-elastic-failed-to-start/128741):
>
> Continuing the discussion from [Elasticsearch Service won't start after full cluster upgrade from 5.4 to 6.0](https://discuss.elastic.co/t/elasticsearch-service-wont-start-after-full-cluster-upgrade-from-5-4-to-6-0/108048/7): I'm mid upgrade from 5.6.6. to 6.2.4 and haivng an issue getting elastic to start, if I look in /usr/lib/systemd/system/elasticsearch.service I also see the line with -Edefault.path.conf=${CONF\_DIR} I have added path.config and path.log to the elasticsearch.yml file opened /etc/sysconfig/elasticsearch and added ES\_PATH\_CONF=/etc/elasticsearch but when I try to start it I'm getting ●…

FYI this is a 1 node cluster, prod is 3 nodes but I need to get dev done first.

I've now got the elastic service to start, if I use the `elasticserach.yml.rpmnew` as my `elasticserach.yml` which only contains `path.data: /var/lib/elasticsearch`, `path.logs: /var/log/elasticsearch` then I can fire curl -XGET -u user:password '[http://localhost:9200/\_cat/indices?v](http://localhost:9200/_cat/indices?v)' I get back a list of all the indexs that were there before the upgrade.

when I add `network.host: 192.168.100.22` I get no responce on either localhost or the boxes IP.

if anyone has any suggestions then I'd be very greatful for them.

---

<div class="post-metadata">

**Author:** ![Ant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ant/32/33267_2.png) [@Ant](https://discuss.elastic.co/u/Ant)\
**Post date:** [April 20, 2018, 11:03am UTC](https://discuss.elastic.co/t/service-starts-but-connections-refused-on-public-ip-and-localhost/128851/2 "2018-04-20T11:03:33Z")

</div>

in the logs I've found

```auto
[2018-04-20T11:59:06,347][INFO][o.e.t.TransportService] [HOC_bIV] publish_address { 192.168.100.22:9300}, bound_addresses { 192.168.100.22:9300}
[2018-04-20T11:59:06,414][INFO][o.e.b.BootstrapChecks] [HOC_bIV] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2018-04-20T11:59:06,447][ERROR][o.e.b.Bootstrap] [HOC_bIV] node validation exception
[1] bootstrap checks failed
[1]: max number of threads [2048] for user [elasticsearch] is too low, increase to at least [4096]
[2018-04-20T11:59:06,453][INFO][o.e.n.Node] [HOC_bIV] stopping ...
[2018-04-20T11:59:06,541][INFO][o.e.n.Node] [HOC_bIV] stopped
[2018-04-20T11:59:06,541][INFO][o.e.n.Node] [HOC_bIV] closing ...
[2018-04-20T11:59:06,562][INFO][o.e.n.Node] [HOC_bIV] closed

```

so looked up how to increase this and found [https://www.elastic.co/guide/en/elasticsearch/reference/5.2/\_maximum\_number\_of\_threads\_check.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/_maximum_number_of_threads_check.html)

edited /etc/security/limits.conf to include

```auto
elasticsearch - nproc 4096
root - nproc 4096

```

but I still get the same error

---

<div class="post-metadata">

**Author:** ![Ant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ant/32/33267_2.png) [@Ant](https://discuss.elastic.co/u/Ant)\
**Post date:** [April 20, 2018, 12:36pm UTC](https://discuss.elastic.co/t/service-starts-but-connections-refused-on-public-ip-and-localhost/128851/3 "2018-04-20T12:36:08Z")

</div>

resolved it

in /usr/lib/systemd/system/elasticsearch.service the NPROC limit was set to 2048 so regardless of what I did in limits.conf it wouldn't change, I had to edit it in that to get it to load.

---

<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:** [May 18, 2018, 12:36pm UTC](https://discuss.elastic.co/t/service-starts-but-connections-refused-on-public-ip-and-localhost/128851/4 "2018-05-18T12:36:09Z")

</div>

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