Curl: (7) couldn't connect to host


(Robert Simpson) #25

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

---------------------------------- 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


(Christian Dahlqvist) #26

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


(rich collier) #27

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.


(David Pilato) #28

Also please follow the instructions we gave: Curl: (7) couldn't connect to host


(Robert Simpson) #29

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

---------------------------------- 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


(David Pilato) #30

Please format your code, logs or configuration files using </> icon as explained in this guide 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:

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.


(rich collier) #31

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. It should be obvious.


(Robert Simpson) #32

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

---------------------------------- 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


(rich collier) #33

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:

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.


(David Pilato) #34

Again uploading your elasticsearch.yml file to gist.github.com is a great solution IMO.


(Robert Simpson) #35

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

Rob


(David Pilato) #36

As you wish. Secret is fine.


(Robert Simpson) #37

I want make sure you get it.

Rob


(Robert Simpson) #38

(David Pilato) #39

You edited things before posting it.

For example this line is wrong:

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

Those ones as well:

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

(Robert Simpson) #40

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

Rob


(Christian Dahlqvist) #41

The main problem seems to be that you have a line break in one of your comments:

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

This means that the second line starts with Configuration, which is not valid config and is not preceded by a #. If you remove the newline between SSL X-Pack and Configuration so they end up on a single line I think you should be fine. Note that you have this happen in two places.


(rich collier) #42

Which is what I said back here 5 days ago: Curl: (7) couldn't connect to host

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.


(Robert Simpson) #43

ok, thanks. I will modify.

Rob


(system) closed #44

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