Kibana(6.7.2) run in docker raise [ERR_TOO_MANY_REDIRECTS]

OS: centos 7
kibana version: 6.7.2
Docker version 1.13.1, build b2f74b2/1.13.1
docker-compose version 1.18.0, build 8dd22a9
and other odds and ends

I've tried to start a kibana node by docker-compose

version: '2'
services:
  kibana:
    image: docker.elastic.co/kibana/kibana:6.7.2
    ports:
      - "5601:5601"
    environment:
      - SERVER_NAME=T4-ximei-es001
      - ELASTICSEARCH_HOSTS=http://${ip}:9200

but when i tried to access the url: http://{ip}:5601, the ERR_TOO_MANY_REDIRECTS (302) was raised, and the url will be redirected (sometime) to http://{ip}:5601 or http://${ip}:5601/app/kibana

I've tried to find the makefile/dockerfile .etc in github then, but the kibana-docker project is in archived status which the top version is 6.6.

My question is, how does this issue happens? and how can i find the original docker file which built this image?

The Dockerfile template was moved from the kibana-docker repo to the Kibana repo, and it's now here: https://github.com/elastic/kibana/blob/86c3ac4ff4f8b69d71116a359bfc8aaf8b872ed4/src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.js

There could be various reasons for TOO_MANY_REDIRECTS, that usually have to do with how the application is deployed. In a development environment, this can happen when the URL path to Kibana changes without clearing session cookies from the browser.

The typical suggestions would be to try a different browser, try incognito mode in your browser, try clearing cookies from your browser, try a different computer etc. Hopefully that will address your problem, since the docker compose file seems very basic.

Thx tsullivan, I found the docker template then, it seems that my dockerfile is correct :frowning:

It seems like this issue happened caused by the docker images' x-pack, I start up an ES cluster myself and set up the kibana by dockerfile. ref: https://github.com/elastic/kibana-docker/issues/35

Is there any possible to disable the xpack in docker image then?

Based on that issue, it looks like someone was having problems with the redirect that Kibana was making to the Login page, done via the X-Pack Security feature.

There is an "OSS Flavor" of Docker images that do not have X-Pack installed. The docker images are linked from the docs here: https://www.elastic.co/guide/en/kibana/6.7/docker.html#pull-image and following the www.docker.elastic.co link will show you each version, which includes default and OSS versions. A direct link to Kibana OSS 6.7.2 Docker image is here https://www.docker.elastic.co/#kibana-6-7-2-oss

Cheers bro, it's a big help for me then :smiley:

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