No able to access Kibana in Azure

Hi ,

I have installed elasticsearch and kibana on linux in cloud.

Both services are up and running.

Output of curl for elastic search

root@vm4:~# curl -XGET http://localhost:9200/_cluster/health?pretty
{
  "cluster_name" : "demo-elk",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 6,
  "active_shards" : 6,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}

For Kibana
Below are the logs after starting service

● kibana.service - Kibana
   Loaded: loaded (/etc/systemd/system/kibana.service; disabled; vendor preset: enabled)
   Active: active (running) since Thu 2020-07-16 05:34:31 UTC; 11min ago
 Main PID: 8582 (node)
    Tasks: 11 (limit: 4087)
   Memory: 554.9M
   CGroup: /system.slice/kibana.service
           └─8582 /usr/share/kibana/bin/../node/bin/node /usr/share/kibana/bin/../src/cli

Jul 16 05:34:56 vm4 kibana[8582]: {"type":"log","@timestamp":"2020-07-16T05:34:56Z","tags":["info","plugins","taskManager","taskManager"],"pid":8582,"message":"TaskManager is identified by the Kiba
Jul 16 05:34:56 vm4 kibana[8582]: {"type":"log","@timestamp":"2020-07-16T05:34:56Z","tags":["status","plugin:task_manager@7.8.0","info"],"pid":8582,"state":"green","message":"Status changed from un
Jul 16 05:34:56 vm4 kibana[8582]: {"type":"log","@timestamp":"2020-07-16T05:34:56Z","tags":["status","plugin:encryptedSavedObjects@7.8.0","info"],"pid":8582,"state":"green","message":"Status change
Jul 16 05:34:56 vm4 kibana[8582]: {"type":"log","@timestamp":"2020-07-16T05:34:56Z","tags":["status","plugin:apm_oss@7.8.0","info"],"pid":8582,"state":"green","message":"Status changed from uniniti
Jul 16 05:34:56 vm4 kibana[8582]: {"type":"log","@timestamp":"2020-07-16T05:34:56Z","tags":["status","plugin:console_legacy@7.8.0","info"],"pid":8582,"state":"green","message":"Status changed from
Jul 16 05:34:56 vm4 kibana[8582]: {"type":"log","@timestamp":"2020-07-16T05:34:56Z","tags":["status","plugin:region_map@7.8.0","info"],"pid":8582,"state":"green","message":"Status changed from unin
Jul 16 05:34:56 vm4 kibana[8582]: {"type":"log","@timestamp":"2020-07-16T05:34:56Z","tags":["status","plugin:ui_metric@7.8.0","info"],"pid":8582,"state":"green","message":"Status changed from unini
Jul 16 05:34:56 vm4 kibana[8582]: {"type":"log","@timestamp":"2020-07-16T05:34:56Z","tags":["listening","info"],"pid":8582,"message":"Server running at http://0.0.0.0:5601"}
Jul 16 05:34:57 vm4 kibana[8582]: {"type":"log","@timestamp":"2020-07-16T05:34:57Z","tags":["info","http","server","Kibana"],"pid":8582,"message":"http server running at http://0.0.0.0:5601"}
Jul 16 05:46:07 vm4 kibana[8582]: {"type":"response","@timestamp":"2020-07-16T05:46:07Z","tags":[],"pid":8582,"method":"get","statusCode":302,"req":{"url":"/","method":"get","headers":{"host":"loca

Output of netstat

root@vm4:~# netstat -an | grep 5601
tcp        0      0 0.0.0.0:5601            0.0.0.0:*               LISTEN
root@vm4:~# netstat -nptul
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:5601            0.0.0.0:*               LISTEN      8582/node
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      693/sshd
tcp6       0      0 :::9200                 :::*                    LISTEN      8340/java
tcp6       0      0 :::9300                 :::*                    LISTEN      8340/java
tcp6       0      0 :::22                   :::*                    LISTEN      693/sshd
udp        0      0 127.0.0.1:323           0.0.0.0:*                           494/chronyd
udp6       0      0 ::1:323  

Configuration in kibana.yml

root@vm4:~# cat /etc/kibana/kibana.yml
# Kibana is served by a back end server. This setting specifies the port to use.
server.port: 5601

# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
# The default is 'localhost', which usually means remote machines will not be able to connect.
# To allow connections from remote users, set this parameter to a non-loopback address.
server.host: "0.0.0.0"

# 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.
# This setting was effectively always `false` before Kibana 6.3 and will
# default to `true` starting in Kibana 7.0.
#server.rewriteBasePath: false

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

# The Kibana server's name.  This is used for display purposes.
server.name: "demo-kibana"

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

Can anyone please guide here what is wrong here.
I was trying to access kibana dashboard using my public ip but its not coming.
http://52.146.42.234:5061/

Did you use Elastic Cloud? If so, it should work out of the box. Have you tried to contact support?
If not, are you sure that you set up the firewall rules to open the Kibana port?

Hi Mikhail

Thanks for the quick response.
No, I provisioned one free trial server on Azure cloud and did the configuration.

Regarding this:
If not, are you sure that you set up the firewall rules to open the Kibana port?

Do i need to set up firewall rules ?
Can you suggest exactly what need to be done ?

Thanks Again

Yes, it's the standard behavior for all the cloud providers:

By default, cloud servers launched through the Azure management console have their ports closed to secure them against external attacks. This is done for all ports apart from ports 22 (SSH), 80 (HTTP) and 443 (HTTPS). If you need to access your server remotely using a different port, you must first open the necessary port(s) using the Azure management console.

I've never worked with Azure. But this FAQ provides some details on the matter:
https://docs.bitnami.com/azure/faq/administration/use-firewall/

1 Like

I have added the inbound security rule for allowing access to server remotely .
and its working now.

Thanks a lot for helping.

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