skip to Main Content

I have docker running on a remote linux machine and I want to start elasticsearch and kibana services there.

I use the following commands:

docker network create elastic
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.6.2
docker run --name elasticsearch --net elastic -m 4GB -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -t docker.elastic.co/elasticsearch/elasticsearch:8.6.2

docker pull docker.elastic.co/kibana/kibana:8.6.2
docker run --name kibana --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:8.6.2

Both seem to be running fine and the kibana service shows that "Kibana has not been configured". Go to http://0.0.0.0:5601/?code=xxxxxx to get started."

Now the problem is that I want to use this link in the browser of another machine which has windows. I tried putting in different IP addresses from "ifconfig" hosts and also the IP address I use to ssh connect to the remote machine, but the browser link shows no response. How do I find the correct IP address to use in the browser of another machine to see the elasticsearch/kibana UI there?

2

Answers


  1. Rather than reaching the kibana from another server you can use the following option.

    1- create a token for kibana

    sudo /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana
    

    2- stop the kibana

    3- run the following command, it will modify kibana.yml.

    sudo /usr/share/kibana/bin/kibana-setup --enrollment-token <enrollment-token>
    

    more details:

    https://medium.com/@musabdogan/installing-elasticsearch-cluster-multi-node-cluster-with-elasticsearch-version-8-631ddc774648

    Login or Signup to reply.
  2. Starting from version 8, you must setup SSL for a new Elasticsearch cluster, but for a single node setup these will be automatically generated.
    The elastic user and its password, plus the Kibana enrollment token will be printed on the first run: you must save these and use it to enroll Kibana. The enrollment token is valid for 30 minutes.

    There is a detailed step-by-step guide for Elasticsearch here : https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-cli-run-dev-mode

    On the same page you’ll find as well a docker-compose file to run a multi-node cluster with Kibana.

    When you start Kibana with Docker, a unique link is output to your terminal.
    To access Kibana, click the generated link in your terminal.

    • In your browser, paste the enrollment token that you copied when starting Elasticsearch and click the button to connect your Kibana instance with Elasticsearch.
    • Log in to Kibana as the elastic user with the password that was generated when you started Elasticsearch.

    More details regarding running Kibana with Docker: https://www.elastic.co/guide/en/kibana/8.7/docker.html

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search