Why i can't to access to the interface of kibana?

i already installed elastic and kibana 8.2 in ubuntu 22.04 and i try to access kibana from the browser of my host it told me "Kibana server is not ready yet"
this my elastic and kibana yml files :

network.host: 192.168.1.10
#
# 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.
#
# --------------------------------- Readiness ----------------------------------
#
# Enable an unauthenticated TCP readiness endpoint on localhost
#
#readiness.port: 9399
#
# ---------------------------------- 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 11-06-2022 21:39:47

# 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: ["elastic"]

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

this for kibana yml :

server.host: "192.168.1.10"

# Enables you to specify a path to mount Kibana at if you are running behind a proxy.
# Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
# from requests it receives, and to prevent a deprecation warning at startup.
# This setting cannot end in a slash.
#server.basePath: ""

# Specifies whether Kibana should rewrite requests that are prefixed with
# `server.basePath` or require that they are rewritten by your reverse proxy.
# Defaults to `false`.
#server.rewriteBasePath: false

# Specifies the public URL at which Kibana is available for end users. If
# `server.basePath` is configured this URL should end with the same basePath.
#server.publicBaseUrl: ""

# The maximum payload size in bytes for incoming server requests.
#server.maxPayload: 1048576

# 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://192.168.1.10: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.

i put the @ ip of the ubuntu server in config file of kibana and elastic because i configured a static ip for the server

Server not ready means there's a number of potential issues.

You need to look at your logs

First thing I notice is you're trying to connect to elasticsearch on HTTP not HTTPS

elasticsearch.hosts: ["http://192.168.1.10:9200"]

Also, I assume that you have elasticsearch with credentials

You should probably try to use the enrollment token process Or you'll need to provide the username and password and all the relevant SSL information like the CA.

I generally advise people to install elasticsearch and Kibana The first time using all the defaults and all the default processes and then start to change things.

At the very least, you're going to need to use the right protocol. HTTPS you need to provide the username and password and you're going to have to provide the CA for the self-sign cert If you want to manually set this up the first time

thanks stephenb for your support
this my kibana logs :
i think that the error is here instead of the ip @ of the server i should make "localhost"

elastic@elastic:~$ journalctl -u kibana.service
juin 12 21:45:39 elastic systemd[1]: Started Kibana.
juin 12 21:46:08 elastic kibana[2253]: [2022-06-12T21:46:08.411+00:00][INFO ][p>
juin 12 21:46:08 elastic kibana[2253]: [2022-06-12T21:46:08.480+00:00][INFO ][p>
juin 12 21:46:08 elastic kibana[2253]: [2022-06-12T21:46:08.611+00:00][INFO ][h>
juin 12 21:46:08 elastic kibana[2253]: [2022-06-12T21:46:08.684+00:00][INFO ][p>
juin 12 21:46:08 elastic kibana[2253]: [2022-06-12T21:46:08.693+00:00][INFO ][p>
juin 12 21:46:08 elastic kibana[2253]: [2022-06-12T21:46:08.786+00:00][INFO ][r>
juin 12 21:46:09 elastic kibana[2253]: i Kibana has not been configured.
juin 12 21:46:09 elastic kibana[2253]: Go to http://localhost:5601/?code=078748>
juin 12 21:46:28 elastic kibana[2253]: [2022-06-12T21:46:28.548+00:00][INFO ][p>
juin 12 21:46:28 elastic systemd[1]: Stopping Kibana...
juin 12 21:46:28 elastic systemd[1]: kibana.service: Deactivated successfully.
juin 12 21:46:28 elastic systemd[1]: Stopped Kibana.
juin 12 21:46:28 elastic systemd[1]: kibana.service: Consumed 29.537s CPU time.
-- Boot 60e703accfd74432a6266b0f7d51d107 --
juin 13 10:39:12 elastic systemd[1]: Started Kibana.
juin 13 10:40:13 elastic kibana[856]: [2022-06-13T10:40:12.846+00:00][INFO ][pl>
juin 13 10:40:13 elastic kibana[856]: [2022-06-13T10:40:13.103+00:00][INFO ][pl>
juin 13 10:40:13 elastic kibana[856]: [2022-06-13T10:40:13.253+00:00][INFO ][ht>
juin 13 10:40:13 elastic kibana[856]: [2022-06-13T10:40:13.363+00:00][INFO ][pl>
juin 13 10:40:13 elastic kibana[856]: [2022-06-13T10:40:13.370+00:00][INFO ][pr>
juin 13 10:40:13 elastic kibana[856]: [2022-06-13T10:40:13.449+00:00][INFO ][ro>
juin 13 10:40:13 elastic kibana[856]: i Kibana has not been configured.
lines 1-23...skipping...
juin 12 21:45:39 elastic systemd[1]: Started Kibana.
juin 12 21:46:08 elastic kibana[2253]: [2022-06-12T21:46:08.411+00:00][INFO ][plugins-service] Plugin "cloudSecurityPosture" is disabled.
juin 12 21:46:08 elastic kibana[2253]: [2022-06-12T21:46:08.480+00:00][INFO ][plugins-service] Plugin "metricsEntities" is disabled.
juin 12 21:46:08 elastic kibana[2253]: [2022-06-12T21:46:08.611+00:00][INFO ][http.server.Preboot] http server running at http://localhost:5601
juin 12 21:46:08 elastic kibana[2253]: [2022-06-12T21:46:08.684+00:00][INFO ][plugins-system.preboot] Setting up [1] plugins: [interactiveSetup]
juin 12 21:46:08 elastic kibana[2253]: [2022-06-12T21:46:08.693+00:00][INFO ][preboot] "interactiveSetup" plugin is holding setup: Validating Elasticsearch connection >
juin 12 21:46:08 elastic kibana[2253]: [2022-06-12T21:46:08.786+00:00][INFO ][root] Holding setup until preboot stage is completed.
juin 12 21:46:09 elastic kibana[2253]: i Kibana has not been configured.
juin 12 21:46:09 elastic kibana[2253]: Go to http://localhost:5601/?code=078748 to get started.
juin 12 21:46:28 elastic kibana[2253]: [2022-06-12T21:46:28.548+00:00][INFO ][plugins-system.preboot] Stopping all plugins.
juin 12 21:46:28 elastic systemd[1]: Stopping Kibana...
juin 12 21:46:28 elastic systemd[1]: kibana.service: Deactivated successfully.
juin 12 21:46:28 elastic systemd[1]: Stopped Kibana.
juin 12 21:46:28 elastic systemd[1]: kibana.service: Consumed 29.537s CPU time.
-- Boot 60e703accfd74432a6266b0f7d51d107 --
juin 13 10:39:12 elastic systemd[1]: Started Kibana.
juin 13 10:40:13 elastic kibana[856]: [2022-06-13T10:40:12.846+00:00][INFO ][plugins-service] Plugin "cloudSecurityPosture" is disabled.
juin 13 10:40:13 elastic kibana[856]: [2022-06-13T10:40:13.103+00:00][INFO ][plugins-service] Plugin "metricsEntities" is disabled.
juin 13 10:40:13 elastic kibana[856]: [2022-06-13T10:40:13.253+00:00][INFO ][http.server.Preboot] http server running at http://localhost:5601
juin 13 10:40:13 elastic kibana[856]: [2022-06-13T10:40:13.363+00:00][INFO ][plugins-system.preboot] Setting up [1] plugins: [interactiveSetup]
juin 13 10:40:13 elastic kibana[856]: [2022-06-13T10:40:13.370+00:00][INFO ][preboot] "interactiveSetup" plugin is holding setup: Validating Elasticsearch connection c>
juin 13 10:40:13 elastic kibana[856]: [2022-06-13T10:40:13.449+00:00][INFO ][root] Holding setup until preboot stage is completed.
juin 13 10:40:13 elastic kibana[856]: i Kibana has not been configured.
juin 13 10:40:13 elastic kibana[856]: Go to http://localhost:5601/?code=636466 to get started.
juin 13 14:29:38 elastic systemd[1]: Stopping Kibana...
juin 13 14:29:38 elastic kibana[856]: [2022-06-13T14:29:38.664+00:00][INFO ][plugins-system.preboot] Stopping all plugins.
juin 13 14:29:39 elastic systemd[1]: kibana.service: Deactivated successfully.
juin 13 14:29:39 elastic systemd[1]: Stopped Kibana.
juin 13 14:29:39 elastic systemd[1]: kibana.service: Consumed 58.716s CPU time.
-- Boot 5db4ddd9b1fb48a480222323c8cf9d42 --
juin 13 17:46:14 elastic systemd[1]: Started Kibana.
juin 13 17:48:01 elastic kibana[854]: [2022-06-13T17:48:01.598+00:00][INFO ][plugins-service] Plugin "cloudSecurityPosture" is disabled.
juin 13 17:48:01 elastic kibana[854]: [2022-06-13T17:48:01.692+00:00][INFO ][plugins-service] Plugin "metricsEntities" is disabled.
juin 13 17:48:01 elastic kibana[854]: [2022-06-13T17:48:01.838+00:00][INFO ][http.server.Preboot] http server running at http://localhost:5601
juin 13 17:48:01 elastic kibana[854]: [2022-06-13T17:48:01.933+00:00][INFO ][plugins-system.preboot] Setting up [1] plugins: [interactiveSetup]
juin 13 17:48:01 elastic kibana[854]: [2022-06-13T17:48:01.939+00:00][INFO ][preboot] "interactiveSetup" plugin is holding setup: Validating Elasticsearch connection c>
juin 13 17:48:02 elastic kibana[854]: [2022-06-13T17:48:02.019+00:00][INFO ][root] Holding setup until preboot stage is completed.
juin 13 17:48:02 elastic kibana[854]: i Kibana has not been configured.
juin 13 17:48:02 elastic kibana[854]: Go to http://localhost:5601/?code=865985 to get started.
juin 26 17:35:03 elastic systemd[1]: Stopping Kibana...
juin 26 17:35:03 elastic kibana[854]: [2022-06-26T17:35:03.700+00:00][INFO ][plugins-system.preboot] Stopping all plugins.
juin 26 17:35:03 elastic systemd[1]: kibana.service: Deactivated successfully.
juin 26 17:35:03 elastic systemd[1]: Stopped Kibana.

@Firas_Bougrine I think your configuration may be fine

But You need to navigate to in your browser

http://localhost:5601/?code=636466

Like it says and paste in the enrollment token.

Enrollment tokens are only good for 30 mins.

Pasting the Kibana url into the browser window and then pasting in the enrollment token is how you finish setup.

Follow the instructions in the logs and docs :slight_smile:

thanks @stephenb for your response
i have this problem and i want to fix it
i installed elk 8.2 and i installed it like the guide but when i try to do this cmd like the guide i find this error

elastic@elastic:~$ curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic https://192.168.1.10:9200
Enter host password for user 'elastic':
curl: (77) error setting certificate file: /etc/elasticsearch/certs/http_ca.crt

@Firas_Bougrine

I just did a fresh install ... just accepted all the defaults.

curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic https://localhost:9200

Worked as root or sudo

The certs are owned by root:elasticsearch

sbrown@stephenb-es-8-test:~$ sudo ls -lrt /etc/elasticsearch/certs
total 24
-rw-rw---- 1 root elasticsearch  1915 Jun 27 18:30 http_ca.crt
-rw-rw---- 1 root elasticsearch  5838 Jun 27 18:30 transport.p12
-rw-rw---- 1 root elasticsearch 10029 Jun 27 18:30 http.p12
sbrown@stephenb-es-8-test:~$ 

if I run as normal user

sbrown@stephenb-es-8-test:~$ curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic https://localhost:9200 
Enter host password for user 'elastic':
curl: (77) error setting certificate verify locations:
  CAfile: /etc/elasticsearch/certs/http_ca.crt
  CApath: /etc/ssl/certs

if I run as root or sudo

sbrown@stephenb-es-8-test:~$ sudo curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic https://localhost:9200 
Enter host password for user 'elastic':
{
  "name" : "stephenb-es-8-test",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "jjCaopvzTKaw9Wk_HSpO4w",
  "version" : {
    "number" : "8.2.3",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "9905bfb62a3f0b044948376b4f607f70a8a151b4",
    "build_date" : "2022-06-08T22:21:36.455508792Z",
    "build_snapshot" : false,
    "lucene_version" : "9.1.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}
sbrown@stephenb-es-8-test:~$ 

thank you very much @stephenb for your help
@stephenb how to configuring kibana and elasticsearsh in HTTPS and access to the interface of kibana with https ??

You already setup https for elasticsearch... And between Kibana and Elasticsearch.

To encrypt communications between browser and Kibana see the docs here

This assumes you have the capability to generate a certificate non self signed certificate.

https for elasticsearch... And between Kibana and Elasticsearch is automatically configured when i installed elasticsearch ??

Yes assuming you followed the documentation for the default installation.

your elasticsearch.yml should look like this..

this is why you / we tested curl with https://....

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:  <!-- This is the https ssl for elasticsearch endpoint .. what you accessed with curl
  enabled: true
  keystore.path: certs/http.p12

And kibana.yml should look something like this... and this is https between kibana and elasticsearch

# This section was automatically generated during setup.
elasticsearch.hosts: ['https://10.168.0.12:9200'] <!-- kibana Connecting to elasticsearch via https
elasticsearch.serviceAccountToken: AAEAAWVsYXN0aWMva2liYW5hL2Vucm9sbC1wcm9jZXNzLXRva2VuLTE2NTYzNTU5Njg1Mjg6V3JXUnprY0FUZGV1MjF2MXhSTVFNZw
elasticsearch.ssl.certificateAuthorities: [/var/lib/kibana/ca_1656355969490.crt] <!-- the CA needed for the ssl connection created when you "enrolled" kibana

Again this is IF you followed the docs.

The only unsecured endpoint is between your browser and kibana

thanks again @stephenb, i have a question plz how to upgrade from elastic 8.2 to 8.3 ?

@Firas_Bougrine I am / was happy to help ... but I think you need to start reading the docs... you will learn better that way...

Here are the docs...

These are very detailed... but best practice.

but if you don't have any real data just stop elasticsearch and kibana and get the latest .debs and install then start elasticsearch first then kibana ... try and practice and learn.

thank you very much @stephenb , i already reading the docs but sometimes there are things I don't understand well
thank you good team of elastic

It is very common to not understand everything... try and learn .. we all have.. :slight_smile:
Mistakes are part of the learning process... keep doing / trying.. .and you will be fine!

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