# Curl: (7) couldn't connect to host

**URL:** <https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709>\
**Category:** Elasticsearch\
**Created:** [January 2, 2019, 8:05pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709 "2019-01-02T20:05:27Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![simpsonr](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@simpsonr](https://discuss.elastic.co/u/simpsonr)\
**Post date:** [January 3, 2019, 5:22pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/21 "2019-01-03T17:22:36Z")

</div>

copy that...thanks...

---

<div class="post-metadata">

**Author:** ![simpsonr](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@simpsonr](https://discuss.elastic.co/u/simpsonr)\
**Post date:** [January 3, 2019, 7:54pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/22 "2019-01-03T19:54:39Z")

</div>

Hi Rich,

I wouldn't be able to provide yaml file info on a security standpoint.. I can provide you with the errors presented.

rob

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [January 3, 2019, 8:28pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/23 "2019-01-03T20:28:39Z")

</div>

There really isn't anything private in the .yml file with the exception of IP addresses, potentially. You could simply replace anything you think was private with "XXXXXXX".

Our suspicion is that you modified the `elasticsearch.yml` file and left it in a state in which there are now syntax errors. For example,

```auto
in 'reader', line 120, column 1:
Configuration------------------- ...
^

```

There should be no line in the file that begins with `Configuration-------` (like your 120th line of your file). All lines that have section headers have the `#` character at the beginning of the line so that the rest of the line is commented out.

In fact, if you look at my `elasticsearch.yml` file that I run for the node running on my local macbook, nearly every single line (except for the last one) is commented out because I'm just taking the default values of almost every setting:

```
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.1
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes: 
#
# For more information, consult the zen discovery module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
xpack.security.enabled: false
```

---

<div class="post-metadata">

**Author:** ![simpsonr](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@simpsonr](https://discuss.elastic.co/u/simpsonr)\
**Post date:** [January 3, 2019, 9:04pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/24 "2019-01-03T21:04:51Z")

</div>

Ok, I'll do that.

Rob

---

<div class="post-metadata">

**Author:** ![simpsonr](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@simpsonr](https://discuss.elastic.co/u/simpsonr)\
**Post date:** [January 4, 2019, 3:34pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/25 "2019-01-04T15:34:38Z")

</div>

Rich,

Here you go:

# ======================== Elasticsearch Configuration =========================

# 

# NOTE: Elasticsearch comes with reasonable defaults for most settings.

# Before you set out to tweak and tune the configuration, make sure you

# understand what are you trying to accomplish and the consequences.

# 

# The primary way of configuring a node is via this file. This template lists

# the most important settings you may want to configure for a production cluster.

# 

# Please consult the documentation for further information on configuration options:

# [https://www.elastic.co/guide/en/elasticsearch/reference/index.html](https://www.elastic.co/guide/en/elasticsearch/reference/index.html)

# 

# ---------------------------------- Cluster -----------------------------------

# 

# Use a descriptive name for your cluster:

# 

cluster.name: xxx

# 

# ------------------------------------ Node ------------------------------------

# 

# Use a descriptive name for the node:

# 

node.name: xxx

# 

# Add custom attributes to the node:

# 

#node.attr.rack: xx

# 

# ----------------------------------- Paths ------------------------------------

# 

# Path to directory where to store the data (separate multiple locations by comma):

# 

path.data: /DataDisk/data

# 

# Path to log files:

# 

path.logs: /DataDisk/logs

# 

# ----------------------------------- Memory -----------------------------------

# 

# Lock the memory on startup:

# 

bootstrap.memory\_lock: false  
#---------------------------------------------------------------------Other bootstrap checks

#---------------------------------------------------------------------  
#bootstrap.system\_call\_filters: false  
#--------------------------------------------------------------------

# Make sure that the heap size is set to about half the memory available

# on the system and that the owner of the process is allowed to use this

# limit.

# 

# Elasticsearch performs poorly when the system is swapping the memory.

# 

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

# 

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

# 

network.host: xxxxx

# 

# Set a custom port for HTTP:

# 

http.port: xxx

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when new node is started:

# The default list of hosts is ["xxxx", "[::1]"]

# 

discovery.zen.ping.unicast.hosts: xxxxx"]

# 

# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):

# information, consult the zen discovery module documentation.

# 

discovery.zen.minimum\_master\_nodes: 2

# ---------------------------------- Gateway -----------------------------------

# 

# Block initial recovery after a full cluster restart until N nodes are started:

# 

#gateway.recover\_after\_nodes: 3

# 

# For more information, consult the gateway module documentation.

# 

# ---------------------------------- Various -----------------------------------

# 

# Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true  
#Selection of Master Node  
node.master: true  
node.data: false  
node.ingest: false  
#No ingest node available for monitoring data  
x-pack.monitoring.exporters.my\_local:  
type: local  
use\_ingest: false  
#---------------------------------------------------------------------------------  
#---------------------------------------Audit-------------------------------------  
xpack.security.audit.enabled: true  
xpack.security.audit.index.settings:  
index:  
number\_of\_shards: 1  
number\_of\_replicas: 1  
xpack.security.audit.outputs: [index, logfile]  
xpack.security.audit.index.rollover: daily  
xpack.security.audit.logfile.events.include: [anonymous\_access\_denied,  
authentication\_failed, access\_granted, access\_denied]

# ----------------------------------------------------------- SSL X-Pack

Configuration---------------------------------------------------------------  
xpack.ssl.keystore.path: /etc/elasticsearch/x-  
pack/certs/xxxx  
xpack.ssl.keystore.password: password

# xpack.ssl.keystore.key\_password: password

xpack.ssl.truststore.path: /etc/elasticsearch/x-  
pack/certs/xxxx  
xpack.ssl.truststore.password: password  
xpack.ssl.verification\_mode: none  
xpack..security.transport.ssl.enabled: true  
xpack.security.http.ssl.enabled: true

# --------------------------------------------------------------- SSL X-Pack

Configuration -----------------------------------------------------------------

# Anonymous access for Kibana

#xpack.security.authc:

# anonymous:

# username: \_es\_anonymous\_user

# roles: Anonymous\_RO

# authz\_exception: false

#xpack.security.authc:

# anonymous:

# username: \_es\_anonymous\_user

# username: xxxxxx

# roles: kibana\_user\_For\_ES\_Anonymous, AllIndexReadOnly

# roles: AllIndexReadOnly, MaccessRole

# authz\_exception: false

# authz\_exception: true

#xpack.security.authc:

# realms:

# native1:

# type: native

# order: 0

# enabled: true

# active\_directory:

# type: active\_directory

# order: 1

# enabled: true

# domain\_name:xxxxxxxx

# url: xxxxxxxxx

# unmapped\_groups\_as\_roles: true

# ssl:

# certificate\_authorities: [ "/etc/elasticsearch/x-

pack/ca/xxxxxx" ]

When you get a chance, take a look at this:

Rob

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 4, 2019, 3:41pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/26 "2019-01-04T15:41:41Z")

</div>

> [@simpsonr](#):
>
> Configuration---------------------------------------------------------------

You seem to have comment lines that are not commented out with a `#` at the start.

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [January 4, 2019, 3:44pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/27 "2019-01-04T15:44:47Z")

</div>

Hi Rob - just compare your file with the one I posted. Only lines that have directives, such as:

`setting_name:value`

should be on lines without `#` at the beginning. Every other line that has plain text descriptions or section headings need to be properly commented out with `#` at the beginning of the line.

---

<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:** [January 4, 2019, 3:46pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/28 "2019-01-04T15:46:17Z")

</div>

Also please follow the instructions we gave: [Curl: (7) couldn't connect to host](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/20)

---

<div class="post-metadata">

**Author:** ![simpsonr](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@simpsonr](https://discuss.elastic.co/u/simpsonr)\
**Post date:** [January 4, 2019, 4:12pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/29 "2019-01-04T16:12:05Z")

</div>

Rich,

I had zoomed out on the file. Back to normal. See below:

# ======================== Elasticsearch Configuration =========================

# 

# NOTE: Elasticsearch comes with reasonable defaults for most settings.

# Before you set out to tweak and tune the configuration, make sure you

# understand what are you trying to accomplish and the consequences.

# 

# The primary way of configuring a node is via this file. This template lists

# the most important settings you may want to configure for a production cluster.

# 

# Please consult the documentation for further information on configuration options:

# [https://www.elastic.co/guide/en/elasticsearch/reference/index.html](https://www.elastic.co/guide/en/elasticsearch/reference/index.html)

# 

# ---------------------------------- Cluster -----------------------------------

# 

# Use a descriptive name for your cluster:

# 

cluster.name: xxx

# 

# ------------------------------------ Node ------------------------------------

# 

# Use a descriptive name for the node:

# 

node.name: xxx

# 

# Add custom attributes to the node:

# 

#node.attr.rack: xx

# 

# ----------------------------------- Paths ------------------------------------

# 

# Path to directory where to store the data (separate multiple locations by comma):

# 

path.data: /DataDisk/data

# 

# Path to log files:

# 

path.logs: /DataDisk/logs

# 

# ----------------------------------- Memory -----------------------------------

# 

# Lock the memory on startup:

# 

bootstrap.memory\_lock: false  
#---------------------------------------------------------------------Other bootstrap checks

#---------------------------------------------------------------------  
#bootstrap.system\_call\_filters: false  
#--------------------------------------------------------------------

# Make sure that the heap size is set to about half the memory available

# on the system and that the owner of the process is allowed to use this

# limit.

# 

# Elasticsearch performs poorly when the system is swapping the memory.

# 

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

# 

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

# 

network.host: xxxxx

# 

# Set a custom port for HTTP:

# 

http.port: xxx

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when new node is started:

# The default list of hosts is ["xxxx", "[::1]"]

# 

discovery.zen.ping.unicast.hosts: xxxxx"]

# 

# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):

# information, consult the zen discovery module documentation.

# 

discovery.zen.minimum\_master\_nodes: 2

# ---------------------------------- Gateway -----------------------------------

# 

# Block initial recovery after a full cluster restart until N nodes are started:

# 

#gateway.recover\_after\_nodes: 3

# 

# For more information, consult the gateway module documentation.

# 

# ---------------------------------- Various -----------------------------------

# 

# Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true  
#Selection of Master Node  
node.master: true  
node.data: false  
node.ingest: false  
#No ingest node available for monitoring data  
x-pack.monitoring.exporters.my\_local:  
type: local  
use\_ingest: false  
#---------------------------------------------------------------------------------  
#---------------------------------------Audit-------------------------------------  
xpack.security.audit.enabled: true  
xpack.security.audit.index.settings:  
index:  
number\_of\_shards: 1  
number\_of\_replicas: 1  
xpack.security.audit.outputs: [index, logfile]  
xpack.security.audit.index.rollover: daily  
xpack.security.audit.logfile.events.include: [anonymous\_access\_denied,  
authentication\_failed, access\_granted, access\_denied]

# ----------------------------------------------------------- SSL X-Pack

Configuration---------------------------------------------------------------  
xpack.ssl.keystore.path: /etc/elasticsearch/x-  
pack/certs/xxxx  
xpack.ssl.keystore.password: password

# xpack.ssl.keystore.key\_password: password

xpack.ssl.truststore.path: /etc/elasticsearch/x-  
pack/certs/xxxx  
xpack.ssl.truststore.password: password  
xpack.ssl.verification\_mode: none  
xpack..security.transport.ssl.enabled: true  
xpack.security.http.ssl.enabled: true

# --------------------------------------------------------------- SSL X-Pack

Configuration -----------------------------------------------------------------

# Anonymous access for Kibana

#xpack.security.authc:

# anonymous:

# username: \_es\_anonymous\_user

# roles: Anonymous\_RO

# authz\_exception: false

#xpack.security.authc:

# anonymous:

# username: \_es\_anonymous\_user

# username: xxxxxx

# roles: kibana\_user\_For\_ES\_Anonymous, AllIndexReadOnly

# roles: AllIndexReadOnly, MaccessRole

# authz\_exception: false

# authz\_exception: true

#xpack.security.authc:

# realms:

# native1:

# type: native

# order: 0

# enabled: true

# active\_directory:

# type: active\_directory

# order: 1

# enabled: true

# domain\_name:xxxxxxxx

# url: xxxxxxxxx

# unmapped\_groups\_as\_roles: true

# ssl:

# certificate\_authorities: [ "/etc/elasticsearch/x-

pack/ca/xxxxxx" ]

Can you let me know what I need to comment and not comment?

Thanks,

Rob

---

<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:** [January 4, 2019, 5:00pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/30 "2019-01-04T17:00:11Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.  
_ **Please update your post**._

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [January 5, 2019, 2:28pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/31 "2019-01-05T14:28:29Z")

</div>

> [@simpsonr](#):
>
> Can you let me know what I need to comment and not comment?

Comment out:

1. Every line that does not have a `setting:value` pair on that line
2. Any line where that particular `setting:value` pair is not desired to be set

Again Rob, please look at the example `elasticsearch.yml` file [I posted earlier](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/23). It should be obvious.

---

<div class="post-metadata">

**Author:** ![simpsonr](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@simpsonr](https://discuss.elastic.co/u/simpsonr)\
**Post date:** [January 7, 2019, 8:45pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/32 "2019-01-07T20:45:48Z")

</div>

Rich,

Here you go:

# ======================== Elasticsearch Configuration =========================

# 

# NOTE: Elasticsearch comes with reasonable defaults for most settings.

# Before you set out to tweak and tune the configuration, make sure you

# understand what are you trying to accomplish and the consequences.

# 

# The primary way of configuring a node is via this file. This template lists

# the most important settings you may want to configure for a production cluster.

# 

# Please consult the documentation for further information on configuration options:

# [https://www.elastic.co/guide/en/elasticsearch/reference/index.html](https://www.elastic.co/guide/en/elasticsearch/reference/index.html)

# 

# ---------------------------------- Cluster -----------------------------------

# 

# Use a descriptive name for your cluster:

# 

cluster.name: xxx

# 

# ------------------------------------ Node ------------------------------------

# 

# Use a descriptive name for the node:

# 

node.name: xxx

# 

# Add custom attributes to the node:

# 

#node.attr.rack: xx

# 

# ----------------------------------- Paths ------------------------------------

# 

# Path to directory where to store the data (separate multiple locations by comma):

# 

path.data: /DataDisk/data

# 

# Path to log files:

# 

path.logs: /DataDisk/logs

# 

# ----------------------------------- Memory -----------------------------------

# 

# Lock the memory on startup:

# 

bootstrap.memory\_lock: false  
#---------------------------------------------------------------------Other bootstrap checks

#---------------------------------------------------------------------  
#bootstrap.system\_call\_filters: false  
#--------------------------------------------------------------------

# Make sure that the heap size is set to about half the memory available

# on the system and that the owner of the process is allowed to use this

# limit.

# 

# Elasticsearch performs poorly when the system is swapping the memory.

# 

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

# 

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

# 

network.host: xxxxx

# 

# Set a custom port for HTTP:

# 

http.port: xxx

# 

# For more information, consult the network module documentation.

# 

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when new node is started:

# The default list of hosts is ["xxxx", "[::1]"]

# 

discovery.zen.ping.unicast.hosts: xxxxx"]

# 

# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):

# information, consult the zen discovery module documentation.

# 

discovery.zen.minimum\_master\_nodes: 2

# ---------------------------------- Gateway -----------------------------------

# 

# Block initial recovery after a full cluster restart until N nodes are started:

# 

#gateway.recover\_after\_nodes: 3

# 

# For more information, consult the gateway module documentation.

# 

# ---------------------------------- Various -----------------------------------

# 

# Require explicit names when deleting indices:

# 

#action.destructive\_requires\_name: true  
#Selection of Master Node  
node.master: true  
node.data: false  
node.ingest: false  
#No ingest node available for monitoring data  
x-pack.monitoring.exporters.my\_local:  
type: local  
use\_ingest: false  
#---------------------------------------------------------------------------------  
#---------------------------------------Audit-------------------------------------  
xpack.security.audit.enabled: true  
xpack.security.audit.index.settings:  
index:  
number\_of\_shards: 1  
number\_of\_replicas: 1  
xpack.security.audit.outputs: [index, logfile]  
xpack.security.audit.index.rollover: daily  
xpack.security.audit.logfile.events.include: [anonymous\_access\_denied,  
authentication\_failed, access\_granted, access\_denied]

# ----------------------------------------------------------- SSL X-Pack

Configuration---------------------------------------------------------------  
xpack.ssl.keystore.path: /etc/elasticsearch/x-  
pack/certs/xxxx  
xpack.ssl.keystore.password: password

# xpack.ssl.keystore.key\_password: password

xpack.ssl.truststore.path: /etc/elasticsearch/x-  
pack/certs/xxxx  
xpack.ssl.truststore.password: password  
xpack.ssl.verification\_mode: none  
xpack..security.transport.ssl.enabled: true  
xpack.security.http.ssl.enabled: true

# --------------------------------------------------------------- SSL X-Pack

Configuration -----------------------------------------------------------------

# Anonymous access for Kibana

#xpack.security.authc:

# anonymous:

# username: \_es\_anonymous\_user

# roles: Anonymous\_RO

# authz\_exception: false

#xpack.security.authc:

# anonymous:

# username: \_es\_anonymous\_user

# username: xxxxxx

# roles: kibana\_user\_For\_ES\_Anonymous, AllIndexReadOnly

# roles: AllIndexReadOnly, MaccessRole

# authz\_exception: false

# authz\_exception: true

#xpack.security.authc:

# realms:

# native1:

# type: native

# order: 0

# enabled: true

# active\_directory:

# type: active\_directory

# order: 1

# enabled: true

# domain\_name:xxxxxxxx

# url: xxxxxxxxx

# unmapped\_groups\_as\_roles: true

# ssl:

# certificate\_authorities: [ "/etc/elasticsearch/x-

pack/ca/xxxxxx" ]

Let me know.

Thanks,

Robert

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [January 7, 2019, 9:06pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/33 "2019-01-07T21:06:57Z")

</div>

Robert, at first blush this looks no different and it looks as if you haven't followed our advice with respect to how the file is to be formatted and how it should be posted here so that it is readable. It is hard to tell if there's a fundamental miscommunication or if there's something technologically getting in our way. As I've said, you need to have `#` on every line except those in which you are overriding the default setting of a particular configuration parameter. Therefore, an example `elasticsearch.yml` file looks something like this in an actual text editor:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/c/dc21875e0191a70d6ae67622b2e72cb607034b24.png)

In this example, only two settings that are visible on the screen are being set: `cluster.name` and `node.name`.

The way that you have posted yours makes it look like your file is 98% incorrect - but again, I cannot know for certain simply because of the way you posted it with the bad formatting.

I think it is impractical for me (or any of us) to fix your file, line by line. Instead, follow our guidance on what the file needs to look like based on our information. If fixing your current file seems daunting, perhaps the easier thing for you would be to start over with a fresh installation (which will give you a new, untouched `elasticsearch.yml` file) and then you can carefully add in your desired changes.

---

<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:** [January 7, 2019, 10:03pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/34 "2019-01-07T22:03:05Z")

</div>

[Again](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/18?u=dadoonet) uploading your elasticsearch.yml file to [gist.github.com](http://gist.github.com) is a great solution IMO.

---

<div class="post-metadata">

**Author:** ![simpsonr](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@simpsonr](https://discuss.elastic.co/u/simpsonr)\
**Post date:** [January 8, 2019, 2:40pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/35 "2019-01-08T14:40:51Z")

</div>

OK, it's done. Do I create a secret gist or public gist?

Rob

---

<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:** [January 8, 2019, 3:01pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/36 "2019-01-08T15:01:22Z")

</div>

As you wish. Secret is fine.

---

<div class="post-metadata">

**Author:** ![simpsonr](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@simpsonr](https://discuss.elastic.co/u/simpsonr)\
**Post date:** [January 8, 2019, 3:03pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/37 "2019-01-08T15:03:23Z")

</div>

I want make sure you get it.

Rob

---

<div class="post-metadata">

**Author:** ![simpsonr](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@simpsonr](https://discuss.elastic.co/u/simpsonr)\
**Post date:** [January 8, 2019, 3:11pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/38 "2019-01-08T15:11:15Z")

</div>

> <https://gist.github.com/simpsonrl/1f2c3d115f00bfef8d4626c3ed3ca241>

---

<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:** [January 8, 2019, 4:01pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/39 "2019-01-08T16:01:13Z")

</div>

You edited things before posting it.

For example this line is wrong:

```
discovery.zen.ping.unicast.hosts: xxxxx"]

```

Those ones as well:

```auto
# certificate_authorities: [ "/etc/elasticsearch/x-
pack/ca/xxxxxx" ]

```

---

<div class="post-metadata">

**Author:** ![simpsonr](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@simpsonr](https://discuss.elastic.co/u/simpsonr)\
**Post date:** [January 8, 2019, 4:05pm UTC](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709/40 "2019-01-08T16:05:06Z")

</div>

Understood. That data had to be blanked out. Project info.

Rob

[Previous page](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709.md?page=1)

[Next page](https://discuss.elastic.co/t/curl-7-couldnt-connect-to-host/162709.md?page=3)
