I have installed elasticsearch on my server, its status is showing as active:
[root@dev]# systemctl status elasticsearch ● elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2024-04-16 16:51:00 BST;
Here is elasticsearch.yml:
node.roles: [master, data, ingest]
path.data: /data/elasticsearch
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: false
network.host: 0.0.0.0
http.port: 9200
transport.host: localhost
transport.port: 9300-9400
discovery.type: "single-node"
I have installed kibana as well, which is in active status, but throwing following exception: [ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. security_exception: missing authentication credentials for REST request
Here is kibana.yml:
server.port: 5601
server.host: "0.0.0.0"
server.name: "Kibana"
elasticsearch.hosts: ["http://localhost:9200"]
Note that both elasticsearch and kibana are on same server. And they are installed using ansible role. Elasticsearch is single node only.
You need kibana_system built in user to connect Kibana with Elasticsearch.
So you can add these two lines in your kibana.yml.
Source: https://www.elastic.co/guide/en/kibana/7.17/using-kibana-with-security.html
elasticsearch.username: "kibana_system"
elasticsearch.password: "kibanapassword"
Please write your own kibana_system password. If you do not have any, you can recreate using elasticsearch.
bin/elasticsearch-reset-password -u kibana_system
This uses -u (user) tag and resets your password.
Source: https://www.elastic.co/guide/en/elasticsearch/reference/current/reset-password.html
User explanation:
kibana_system: The user Kibana uses to connect and communicate with Elasticsearch.