Kibana inaccessible

Hello, I set up a k3s cluster using ubuntu. I want to install ELK on my cluster. So I installed elasticsearch and Kibana with the Debian package in version 7.6.1. I left the elastic and Kibana configuration as default.

for elasticsearch:


sudo wget --directory-prefix=/opt/ https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.1-amd64.deb
sudo dpkg -i /opt/elasticsearch*.deb
# edit /etc/elasticsearch/elasticsearch.yml
# host.name + master
#network.host: 0.0.0.0
#discovery.seed_hosts: ["127.0.0.1", "192.168.122.196"]

For kibana:

wget https://artifacts.elastic.co/downloads/kibana/kibana-7.6.1-amd64.deb
shasum -a 512 kibana-7.6.1-amd64.deb
sudo dpkg -i kibana-7.6.1-amd64.deb
# edit /etc/kibana/kibana.yml
#server.host: "0.0.0.0"

When I want to connect to kibana the connection is impossible via web, via the local address 192.168.122.196:5601.
Kibana listens on port 5601 after restarting the service.
The service is running.

the command '''curl localhost:5601''' or '''curl 192.168.122.196'''
gives me the error: curl: (7) Failed to connect to localhost port 5601 after 0 ms: Connection refused

High @eloi-gn Welcome to the community

If you want to access kibana from other than localhost you need to uncomment the following line in kibana.yml which allows kibana to bind with the network

server.host: "0.0.0.0"

From the docs here

server.host
This setting specifies the host of the back end server. To allow remote users to connect, set the value to the IP address or DNS name of the Kibana server. Use 0.0.0.0 to make Kibana listen on all IPs (public and private). Default: "localhost"

BTW 7.6.1. is absolutely ancient and is EOL you should really use a much newer version at least 7.17 or 8.x and with that in mind if you look at the docs make sure you look at the right ones / version

Indeed I expressed myself incorrectly, # are not present in kibana.yml.

In elasticsearch I uncommented:

network.host: 0.0.0.0
discovery.seed_hosts: ["127.0.0.1", "192.168.122.196"]

In kibana I uncommented:

server.host: "0.0.0.0

try

curl http://192.168.122.196:5601 or
curl http://127.0.01:5601

Also look at the kibana logs
Is this a fresh install or something that has been recently changed.

Are kibana and elasticsearch on the same server?

Did you install security or is this just default setting? (are you using TLS/HTTPS or Authentication on elasticsearch?

What else have you changed?

can you curl elasticsearch?

This is a new installation.
kibana and elastic are on the same server.
I haven't installed security, it's just the default setting.

ubuntu@test-k3s-master-1:~$ curl http://192.168.122.196:5601
curl: (28) Failed to connect to 192.168.122.196 port 5601 after 134223 ms: Connexion terminée par expiration du délai d'attente
ubuntu@test-k3s-master-1:~$ curl http://127.0.0.1:5601
curl: (28) Failed to connect to 127.0.0.1 port 5601 after 133283 ms: Connexion terminée par expiration du délai d'attente
ubuntu@test-k3s-master-1:~$ tail -f /var/log/syslog
Feb 25 19:11:47 test-k3s-master-1 kernel: [ 1889.307727] [UFW BLOCK] IN=cni0 OUT=cni0 PHYSIN=vetha343fd43 PHYSOUT=veth9e76813d MAC=33:33:00:00:00:02:da:63:61:fb:c8:22:86:dd SRC=fe80:0000:0000:0000:d863:61ff:fefb:c822 DST=ff02:0000:0000:0000:0000:0000:0000:0002 LEN=56 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=133 CODE=0 
Feb 25 19:11:47 test-k3s-master-1 kernel: [ 1889.307733] [UFW BLOCK] IN=cni0 OUT=cni0 PHYSIN=vetha343fd43 PHYSOUT=vethd6f4dd90 MAC=33:33:00:00:00:02:da:63:61:fb:c8:22:86:dd SRC=fe80:0000:0000:0000:d863:61ff:fefb:c822 DST=ff02:0000:0000:0000:0000:0000:0000:0002 LEN=56 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=ICMPv6 TYPE=133 CODE=0 
Feb 25 19:11:51 test-k3s-master-1 systemd[1]: run-containerd-runc-k8s.io-ff228ca35a875649f6d2efec7b57bb75a24443ab9a49a96044fd150ddde0e861-runc.EaEOoi.mount: Deactivated successfully.
Feb 25 19:11:51 test-k3s-master-1 systemd[1]: run-containerd-runc-k8s.io-ff228ca35a875649f6d2efec7b57bb75a24443ab9a49a96044fd150ddde0e861-runc.DoeNcj.mount: Deactivated successfully.
Feb 25 19:11:53 test-k3s-master-1 systemd[1]: run-containerd-runc-k8s.io-9706856a715a435b57e0457a709736bc796e785174cd8b5871c43be8b4ed6677-runc.PgCBjD.mount: Deactivated successfully.

ubuntu@test-k3s-master-1:~$ sudo ufw status
État : actif

Vers                       Action      De
----                       ------      --
5601/tcp                   ALLOW       Anywhere                  
22/tcp                     ALLOW       Anywhere                  
5601/tcp (v6)              ALLOW       Anywhere (v6)             
22/tcp (v6)                ALLOW       Anywhere (v6)
ubuntu@test-k3s-master-1:~$ sudo systemctl status kibana
● kibana.service - Kibana
     Loaded: loaded (/etc/systemd/system/kibana.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2024-02-25 18:40:21 CET; 34min ago
   Main PID: 510 (node)
      Tasks: 11 (limit: 4598)
     Memory: 268.5M
        CPU: 28.293s
     CGroup: /system.slice/kibana.service
             └─510 /usr/share/kibana/bin/../node/bin/node /usr/share/kibana/bin/../src/cli -c /etc/kibana/kibana.yml

févr. 25 18:41:23 test-k3s-master-1 kibana[510]: {"type":"log","@timestamp":"2024-02-25T17:41:23Z","tags":["status","plugin:markdown_vis@7.6.1","info"],"pid">
févr. 25 18:41:23 test-k3s-master-1 kibana[510]: {"type":"log","@timestamp":"2024-02-25T17:41:23Z","tags":["status","plugin:metric_vis@7.6.1","info"],"pid":5>
févr. 25 18:41:23 test-k3s-master-1 kibana[510]: {"type":"log","@timestamp":"2024-02-25T17:41:23Z","tags":["status","plugin:tagcloud@7.6.1","info"],"pid":510>

Looks like Kibana is not starting correctly?

Did you check to see if the kibana process is actually running and listening on 5601?

Is elasticsearch running

curl http://localhost:9200

You're going to need to look closer at the logs in

/var/log/kibana

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