Couldn't configure Elastic Retry or update the kibana.yml file manually

even after editing manually same problem is persisiting.

@Aditya_Bollam
Please Share your elasticsearch.yml and kibana.yml ... In Text not screenshot.

# ======================== 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: elasticsearch
#
# 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: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- 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 -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: 192.168.1.87
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 18-07-2023 01:08:21
# Enable security features
xpack.security.enabled: true

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["elasticsearch"]

# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0

# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
#transport.host: 0.0.0.0

#----------------------- END SECURITY AUTO CONFIGURATION -------------------------
# The Kibana server's name. This is used for display purposes.
#server.name: "your-hostname"

# =================== System: Kibana Server (Optional) ===================
# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
# These settings enable SSL for outgoing requests from the Kibana server to the browser.
#server.ssl.enabled: false
#server.ssl.certificate: /path/to/your/server.crt
#server.ssl.key: /path/to/your/server.key

# =================== System: Elasticsearch ===================
# The URLs of the Elasticsearch instances to use for all your queries.
#elasticsearch.hosts: ["http://localhost:9200"]

# If your Elasticsearch is protected with basic authentication, these settings provide
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
#elasticsearch.username: "kibana_system"
#elasticsearch.password: "password"

# Kibana can also authenticate to Elasticsearch via "service account tokens".
# Service account tokens are Bearer style tokens that replace the traditional username/password based configuration.
# Use this token instead of a username/password.
# elasticsearch.serviceAccountToken: "my_token"

# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of
# the elasticsearch.requestTimeout setting.
#elasticsearch.pingTimeout: 1500

# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value
# must be a positive integer.
#elasticsearch.requestTimeout: 30000

# The maximum number of sockets that can be used for communications with elasticsearch.
# Defaults to `Infinity`.
#elasticsearch.maxSockets: 1024

# Specifies whether Kibana should use compression for communications with elasticsearch
# Defaults to `false`.
#elasticsearch.compression: false

# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
# headers, set this value to [] (an empty list).
#elasticsearch.requestHeadersWhitelist: [ authorization ]

# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten
# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.
#elasticsearch.customHeaders: {}

# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
#elasticsearch.shardTimeout: 30000

# =================== System: Elasticsearch (Optional) ===================
# These files are used to verify the identity of Kibana to Elasticsearch and are required when
# xpack.security.http.ssl.client_authentication in Elasticsearch is set to required.
#elasticsearch.ssl.certificate: /path/to/your/client.crt
#elasticsearch.ssl.key: /path/to/your/client.key

# Enables you to specify a path to the PEM file for the certificate
# authority for your Elasticsearch instance.
#elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]

# To disregard the validity of SSL certificates, change this setting's value to 'none'.
#elasticsearch.ssl.verificationMode: full

# =================== System: Logging ===================
# Set the value of this setting to off to suppress all logging output, or to debug to log everything. Defaults to 'info'
#logging.root.level: debug

# Enables you to specify a file where Kibana stores log output.
logging:
  appenders:
    file:
      type: file
      fileName: /var/log/kibana/kibana.log
      layout:
        type: json
  root:
    appenders:
      - default
      - file
#  layout:
#    type: json

# Logs queries sent to Elasticsearch.
#logging.loggers:
#  - name: elasticsearch.query
#    level: debug

# Logs http responses.
#logging.loggers:
#  - name: http.server.response
#    level: debug
# Logs system usage information.
#logging.loggers:
#  - name: metrics.ops
#    level: debug

# =================== System: Other ===================
# The path where Kibana stores persistent data not saved in Elasticsearch. Defaults to data
#path.data: data

# Specifies the path where Kibana creates the process ID file.
pid.file: /run/kibana/kibana.pid

# Set the interval in milliseconds to sample system and process performance
# metrics. Minimum is 100ms. Defaults to 5000ms.
#ops.interval: 5000

# Specifies locale to be used for all localizable strings, dates and number formats.
# Supported languages are the following: English (default) "en", Chinese "zh-CN", Japanese "ja-JP", French "fr-FR".
#i18n.locale: "en"

# =================== Frequently used (Optional)===================

# =================== Saved Objects: Migrations ===================
# Saved object migrations run at startup. If you run into migration-related issues, you might need to adjust these settings.

# The number of documents migrated at a time.
# If Kibana can't start up or upgrade due to an Elasticsearch `circuit_breaking_exception`,
# use a smaller batchSize value to reduce the memory pressure. Defaults to 1000 objects per batch.
#migrations.batchSize: 1000

# The maximum payload size for indexing batches of upgraded saved objects.
# To avoid migrations failing due to a 413 Request Entity Too Large response from Elasticsearch.
# This value should be lower than or equal to your Elasticsearch cluster’s `http.max_content_length`
# configuration option. Default: 100mb
#migrations.maxBatchSizeBytes: 100mb

# The number of times to retry temporary migration failures. Increase the setting
# if migrations fail frequently with a message such as `Unable to complete the [...] step after
# 15 attempts, terminating`. Defaults to 15
#migrations.retryAttempts: 15

# =================== Search Autocomplete ===================
# Time in milliseconds to wait for autocomplete suggestions from Elasticsearch.
# This value must be a whole number greater than zero. Defaults to 1000ms
#unifiedSearch.autocomplete.valueSuggestions.timeout: 1000

# Maximum number of documents loaded by each shard to generate autocomplete suggestions.
# This value must be a whole number greater than zero. Defaults to 100_000
#unifiedSearch.autocomplete.valueSuggestions.terminateAfter: 100000

Sorry should Asked what version of the stack and are Kibana and Elasticsearch on the same server or different?

I'm using Elasticsearch v 8.8 and kibana v 8.8 on the same server.

Hmm weird I did have seen that before

and that is after you paste the enrollment token in?

Which type of install tar.gz or .deb .rpm?

Have you just tried uninstalling and starting over? Kibana or Both

You can create a new enrollment token if you like....

Ok, I will try uninstalling and start again. How to uninstall the whole package even the saved files. When I try to uninstall and reinstall again I usually see some files existed and not removed. Like repo files

How did you install what method?

But clean up everything ...

Sorry, I used .rpm method

Google is your friend :slight_smile:

Looks like -e

And you can check the directory structure and make sure it is clean ... same for kibana

Thank you for the guidance. I tried reinstalling again but still I'm getting same error. Couldn't configure elastic not even manually or with elastic token

So you do not configure elastic with a token... the token is for kibana

When you say manually can you show what you mean?

Are you following our docs or some other guide?

So I think at this point you need to share the kibana logs

should be in

/var/log/kibana/kibana.log

can up curl elastic

curl -k -v -u elastic https://192.168.1.87:9200

6c8854fa3ba12f24"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-18T18:20:10.796+00:00","message":"Invalid verification code '200190' provided. 4 attempts left.","log":{"level":"ERROR","logger":"plugins.interactiveSetup.verification"},"process":{"pid":3328},"trace":{"id":"12bc1223676afff7e316e055671bbb73"},"transaction":{"id":"2a94e8388ddab08e"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-18T18:20:25.238+00:00","message":"Unable to connect to host \"https://10.0.2.15:9200\", will proceed to the next host if available: connect ECONNREFUSED 10.0.2.15:9200","log":{"level":"ERROR","logger":"plugins.interactiveSetup.elasticsearch"},"process":{"pid":3328},"trace":{"id":"e1d153c18b15eed3a9920494eaf9c36b"},"transaction":{"id":"1f7a7cbc4cc40a0a"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-18T18:20:32.762+00:00","message":"Unable to connect to host \"https://localhost:9200\": connect ECONNREFUSED 127.0.0.1:9200","log":{"level":"ERROR","logger":"plugins.interactiveSetup.elasticsearch"},"process":{"pid":3328},"trace":{"id":"cb96271b7604886672c04424d00fb425"},"transaction":{"id":"53558a2cddc11bbb"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-18T18:20:54.389+00:00","message":"Failed to authenticate with host \"https://192.168.1.92:9200\": \"\"","log":{"level":"ERROR","logger":"plugins.interactiveSetup.elasticsearch"},"process":{"pid":3328},"trace":{"id":"ff9b0f9306d6c12823795c38acd2ae7c"},"transaction":{"id":"018f89f4ad77997b"}}

IP addr is changed as I did in new VM's

Trying 192.168.1.92:443...
* connect to 192.168.1.92 port 443 failed: Connection refused
* Failed to connect to 192.168.1.92 port 443: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 192.168.1.92 port 443: Connection refused

I did configure with elastictoken for kibana

I'm following your docs and some other guide for some queries.

I'm attaching image how I configure manually

Hi @Aditya_Bollam

Apologies you are only providing partial information ....

Please show the command and the output

Then you need to use the new IP in the elasticsearch.yml and curl!

If you are following any other docs than ours it will probably lead you wrong.

If you clean everything and change NOTHING and follow our docs it should work.

The screen show does not show anything ...

If

change in elasticsearch.yml
network.host: 192.168.1.87
to
network.host: 0.0.0.0

Hi,
As per your instructions, I cleaned everything and didn't change anything and followed only your docs now. I can access Elasticsearch and kibana but I can't configure elastic to kibana.
kibana logs

{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:33:45.140+00:00","message":"Plugin \"cloudGainsight\" is disabled.","log":{"level":"INFO","logger":"plugins-service"},"process":{"pid":2390},"trace":{"id":"add4da49b1ff44eddd08309e1ff0f996"},"transaction":{"id":"e097427637d01024"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:33:45.186+00:00","message":"Plugin \"profiling\" is disabled.","log":{"level":"INFO","logger":"plugins-service"},"process":{"pid":2390},"trace":{"id":"add4da49b1ff44eddd08309e1ff0f996"},"transaction":{"id":"e097427637d01024"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:33:45.311+00:00","message":"http server running at http://localhost:5601","log":{"level":"INFO","logger":"http.server.Preboot"},"process":{"pid":2390},"trace":{"id":"add4da49b1ff44eddd08309e1ff0f996"},"transaction":{"id":"e097427637d01024"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:33:45.558+00:00","message":"Setting up [1] plugins: [interactiveSetup]","log":{"level":"INFO","logger":"plugins-system.preboot"},"process":{"pid":2390},"trace":{"id":"add4da49b1ff44eddd08309e1ff0f996"},"transaction":{"id":"e097427637d01024"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:33:45.561+00:00","message":"\"interactiveSetup\" plugin is holding setup: Validating Elasticsearch connection configuration…","log":{"level":"INFO","logger":"preboot"},"process":{"pid":2390},"trace":{"id":"add4da49b1ff44eddd08309e1ff0f996"},"transaction":{"id":"e097427637d01024"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:33:45.610+00:00","message":"Holding setup until preboot stage is completed.","log":{"level":"INFO","logger":"root"},"process":{"pid":2390},"trace":{"id":"add4da49b1ff44eddd08309e1ff0f996"},"transaction":{"id":"e097427637d01024"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:36:50.496+00:00","message":"Stopping all plugins.","log":{"level":"INFO","logger":"plugins-system.preboot"},"process":{"pid":2390}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:36:53.670+00:00","message":"Kibana process configured with roles: [background_tasks, ui]","log":{"level":"INFO","logger":"node"},"process":{"pid":2424},"trace":{"id":"fc1f63c230a61a2909971200bb6ad12c"},"transaction":{"id":"3086f5ee5782caf4"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:37:08.798+00:00","message":"Plugin \"cloudChat\" is disabled.","log":{"level":"INFO","logger":"plugins-service"},"process":{"pid":2424},"trace":{"id":"fc1f63c230a61a2909971200bb6ad12c"},"transaction":{"id":"3086f5ee5782caf4"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:37:08.801+00:00","message":"Plugin \"cloudExperiments\" is disabled.","log":{"level":"INFO","logger":"plugins-service"},"process":{"pid":2424},"trace":{"id":"fc1f63c230a61a2909971200bb6ad12c"},"transaction":{"id":"3086f5ee5782caf4"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:37:08.801+00:00","message":"Plugin \"cloudFullStory\" is disabled.","log":{"level":"INFO","logger":"plugins-service"},"process":{"pid":2424},"trace":{"id":"fc1f63c230a61a2909971200bb6ad12c"},"transaction":{"id":"3086f5ee5782caf4"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:37:08.801+00:00","message":"Plugin \"cloudGainsight\" is disabled.","log":{"level":"INFO","logger":"plugins-service"},"process":{"pid":2424},"trace":{"id":"fc1f63c230a61a2909971200bb6ad12c"},"transaction":{"id":"3086f5ee5782caf4"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:37:08.847+00:00","message":"Plugin \"profiling\" is disabled.","log":{"level":"INFO","logger":"plugins-service"},"process":{"pid":2424},"trace":{"id":"fc1f63c230a61a2909971200bb6ad12c"},"transaction":{"id":"3086f5ee5782caf4"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:37:08.989+00:00","message":"http server running at http://0.0.0.0:5601","log":{"level":"INFO","logger":"http.server.Preboot"},"process":{"pid":2424},"trace":{"id":"fc1f63c230a61a2909971200bb6ad12c"},"transaction":{"id":"3086f5ee5782caf4"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:37:09.238+00:00","message":"Setting up [1] plugins: [interactiveSetup]","log":{"level":"INFO","logger":"plugins-system.preboot"},"process":{"pid":2424},"trace":{"id":"fc1f63c230a61a2909971200bb6ad12c"},"transaction":{"id":"3086f5ee5782caf4"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:37:09.241+00:00","message":"\"interactiveSetup\" plugin is holding setup: Validating Elasticsearch connection configuration…","log":{"level":"INFO","logger":"preboot"},"process":{"pid":2424},"trace":{"id":"fc1f63c230a61a2909971200bb6ad12c"},"transaction":{"id":"3086f5ee5782caf4"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.6.1"},"@timestamp":"2023-07-19T00:37:09.293+00:00","message":"Holding setup until preboot stage is completed.","log":{"level":"INFO","logger":"root"},"process":{"pid":2424},"trace":{"id":"fc1f63c230a61a2909971200bb6ad12c"},"transaction":{"id":"3086f5ee5782caf4"}}


Looks like you enrollment token probably expired...

So generate a new one per the instructions....

I tried creating the enrollment token but still I'm getting the same error. When I check the kibana status after trying to configure I get an error message

Jul 19 01:37:02 kibana kibana[2485]: i Kibana has not been configured.
Jul 19 01:37:02 kibana kibana[2485]: Go to http://0.0.0.0:5601/?code=946920 to get started.
Jul 19 01:48:28 kibana kibana[2485]: Your verification code is:  946 920
Jul 19 01:48:41 kibana kibana[2485]: [2023-07-19T01:48:41.493+00:00][ERROR][plugins.interactiveSetup.elasticsearch] Unable to connect to host "https://10.0.2.15:9200",>
Jul 19 02:41:19 kibana kibana[2485]: [2023-07-19T02:41:19.215+00:00][ERROR][plugins.interactiveSetup.elasticsearch] Unable to connect to host "https://10.0.2.15:9200",>
Jul 19 02:41:22 kibana kibana[2485]: [2023-07-19T02:41:22.889+00:00][ERROR][plugins.interactiveSetup.elasticsearch] Unable to connect to host "https://10.0.2.15:9200",>
Jul 19 02:41:32 kibana kibana[2485]: Your verification code is:  946 920
Jul 19 02:41:46 kibana kibana[2485]: [2023-07-19T02:41:46.712+00:00][ERROR][plugins.interactiveSetup.elasticsearch] Unable to connect to host "https://10.0.2.15:9200",>
Jul 19 03:03:34 kibana kibana[2485]: Your verification code is:  946 920
Jul 19 03:03:53 kibana kibana[2485]: [2023-07-19T03:03:53.740+00:00][ERROR][plugins.interactiveSetup.elasticsearch] Unable to connect to host "https://10.0.2.15:9200

OK that is an issue Kibana can not reach elasticsearch, is elasticsearch actually running?

systemctl status elasticsearch

What happens if you run?

curl -k -v -u elastic https://localhost:9200

and try

curl -k -v -u elastic https://10.0.2.15:9200

This should check connectivity to elasticsearch