# Connecting to Elasticsearch 5.6 externally

**URL:** <https://discuss.elastic.co/t/connecting-to-elasticsearch-5-6-externally/142393>\
**Category:** Elasticsearch\
**Created:** [July 31, 2018, 2:51pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-5-6-externally/142393 "2018-07-31T14:51:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ifiredupufiredup](https://avatars.discourse-cdn.com/v4/letter/i/7993a0/32.png) [@ifiredupufiredup](https://discuss.elastic.co/u/ifiredupufiredup)\
**Post date:** [July 31, 2018, 2:51pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-5-6-externally/142393/1 "2018-07-31T14:51:44Z")

</div>

I'm having trouble setting up Elasticsearch 5.6.10 using the [Installation example with tar](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/_installation.html) from [elastic.co](http://elastic.co). This is running on an Amazon EC2 instance running the Amazon Linux 1 OS.

I am able to test connecting externally (using `curl xxx.xx.xx.xxx:9200/?pretty` to my instance running Elasticsearch 1.4.4 straight out of the box, but the same is not working for 5.6.10.

I know there are major changes between the 1.x and 5.x versions, such as having to edit the `network.host` value in `elasticsearch.yml` (since 5.x by default will only loop back to local), but I have had no luck changing the value to `_global_`, `xxx.xx.xx.xxx`, and `0.0.0.0`. Are there other settings that need to be configured after initial install before running the service to be able to connect to the service externally? If so, pointing me in the right direction to some documentation is all I need!

---

<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 31, 2018, 4:38pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-5-6-externally/142393/2 "2018-07-31T16:38:16Z")

</div>

> [@ifiredupufiredup](#):
>
> but I have had no luck changing the value to `_global_` , `xxx.xx.xx.xxx` , and `0.0.0.0` .

Please share your logs if you need help. But yes that's the way to go.

In case it helps, please read [Bootstrap Checks | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html)

---

<div class="post-metadata">

**Author:** ![ifiredupufiredup](https://avatars.discourse-cdn.com/v4/letter/i/7993a0/32.png) [@ifiredupufiredup](https://discuss.elastic.co/u/ifiredupufiredup)\
**Post date:** [July 31, 2018, 7:03pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-5-6-externally/142393/3 "2018-07-31T19:03:37Z")

</div>

I realized the reason I did not have access to logs (and the BootstrapChecks, etc.), is because I've been working with a different install of Elasticsearch 5.6.10 so that I can run it as a service.

I now actually installed via the **Installation example with tar** like I said earlier and I can see that the BootstrapChecks are enabled (after I change the value of `network.host`) and I am running into two errors which are shutting down ES.

```
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max number of threads [1851] for user [ec2-user] is too low, increase to
at least [2048]

```

I (eventually) want this working using `systemd`, so I want to follow this [Systemd configuration](https://www.elastic.co/guide/en/elasticsearch/reference/master/setting-system-settings.html#systemd) but I am not exactly sure what the correct syntax is to set `nofile` to `65536` and `nproc` to `4096`.

**Update:**

For `nofile` from **Systemd configuration** :

> [Service]  
> LimitMEMLOCK=infinity

For `nproc` from [Number of threads](https://www.elastic.co/guide/en/elasticsearch/reference/master/max-number-of-threads.html#max-number-of-threads):

> The package distributions when run as services under systemd will configure the number of threads for the Elasticsearch process automatically. No additional configuration is required.

So it looks like all I need to do is set `LimitMEMLOCK` and my service installation of ES should be good to go, but I am still unable to connect from an external server, even with having tested different values for `network.host`.

Rather than further trying to get the service to work, I also made the changes to `/etc/security/limits.conf` as follows (so that I can get the **Installation example with tar** to work), but ES is still shutting down due to the same errors (formatting is off here, ignore different spacing between lines):

```
root - nofile 65536
ec2-user - nofile 65536
root - nproc 4096
ec2-user - nproc 4096

```

What else can I troubleshoot to get either version of my installation to work?

---

<div class="post-metadata">

**Author:** ![ifiredupufiredup](https://avatars.discourse-cdn.com/v4/letter/i/7993a0/32.png) [@ifiredupufiredup](https://discuss.elastic.co/u/ifiredupufiredup)\
**Post date:** [July 31, 2018, 8:33pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-5-6-externally/142393/4 "2018-07-31T20:33:15Z")

</div>

Got it working. User needed to be `elasticsearch` here:

```
elasticsearch - nofile 65536
elasticsearch - nofile 65536
```

---

<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 28, 2018, 8:33pm UTC](https://discuss.elastic.co/t/connecting-to-elasticsearch-5-6-externally/142393/5 "2018-08-28T20:33:17Z")

</div>

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