Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Unable to start Kibana 5.3.0 without X-Pack #27

Closed
kylegordon opened this issue Apr 21, 2017 · 32 comments
Closed

Unable to start Kibana 5.3.0 without X-Pack #27

kylegordon opened this issue Apr 21, 2017 · 32 comments
Assignees

Comments

@kylegordon
Copy link

Our ElasticSearch 5.3.0 cluster does not have X-Pack installed, and I have no plans to install it.

However, when running Kibana 5.3.0 Docker image, it consistently switches to Red status due to the cluster not supporting X-Pack. How do you disable it completely?

I am running Kibana locally as below...

docker run -e ELASTICSEARCH_URL=http://10.2.8.243:9200 -e KIBANA_INDEX=.kibana -e XPACK_SECURITY_ENABLED=false -e XPACK_MONITORING_ENABLED=false -e SERVER_NAME:localhost -p 5601:5601 docker.elastic.co/kibana/kibana:5.3.0

@jarpy jarpy self-assigned this Apr 24, 2017
@jarpy
Copy link
Contributor

jarpy commented Apr 24, 2017

Indeed. That's ugly, sorry.

Even with all X-Pack components disabled:

services:
  kibana:
    image: docker.elastic.co/kibana/kibana:${ELASTIC_VERSION}
    environment:
      - XPACK_GRAPH_ENABLED=false
      - XPACK_MONITORING_ENABLED=false
      - XPACK_REPORTING_ENABLED=false
      - XPACK_SECURITY_ENABLED=false

...the exeception is still thrown:

Unhandled rejection [illegal_argument_exception] No endpoint or operation is available at [_xpack]

For now, I would create a custom image with:

FROM docker.elastic.co/kibana/kibana:5.3.1
RUN bin/kibana-plugin remove x-pack && \
    kibana 2>&1 | grep -m 1 "Optimization of .* complete" # [1]

Would it be worth have a single flag to truly disable all X-Pack functionality? @ycombinator?

[1] See elastic/kibana#6057 for the optimization trick.

@ycombinator
Copy link
Contributor

Unhandled rejection [illegal_argument_exception] No endpoint or operation is available at [_xpack]

That particular exception is being thrown because there is apparently no x-pack installed on the Elasticsearch side.

I can see the value in having a single flag to disable all of X-Pack but it seems to me the issue here might be that the kibana docker image is doing too much? Maybe there should be a base kibana docker image that is only OSS kibana, and another one that layers on the x-pack plugin via RUN bin/kibana-plugin install x-pack?

@sebamontini
Copy link

@ycombinator @jarpy any update on this? we try to build our own custom images which does the kibana-plugin remove x-pack but doesn't seems to be working as expected.

@jarpy
Copy link
Contributor

jarpy commented Jul 11, 2017

We will likely release an OSS-only image soon.

What's going wrong with your custom image?

@akailash
Copy link

akailash commented Jul 11, 2017

  - xpack.ml.enabled=false

Have you used this env setting as well?
or "XPACK_ML_ENABLED"

@sebamontini
Copy link

@akailash no need for that since we're using kibana and ES 5.1.2

@jarpy don't really now, I did exactly what you said in your previous comment (except for the version)
and when the image starts, i get that xpack is still installed

@sebamontini
Copy link

the workaround we found was to still use the image form docker hub which doesn't have xpack installed and works great (unless the 5.1.2 does)

@pavlod
Copy link

pavlod commented Aug 6, 2017

I am just running kibana container like this:

docker run docker.elastic.co/kibana/kibana:5.5.1 /bin/bash -c 'bin/kibana-plugin remove x-pack ; /usr/local/bin/kibana-docker'

@xbulat
Copy link

xbulat commented Aug 8, 2017

/bin/bash -c '/usr/share/kibana/bin/kibana-plugin remove x-pack;/usr/local/bin/kibana-docker'

@sebamontini
Copy link

you could just use the old docker hub image: https://hub.docker.com/_/kibana/ which doesn't have xpack at all

it supports up to 5.6.0...hopefully they will have this fixed before that version

@JorritSalverda
Copy link

With version 5.6.0 out where can we find the OSS version that doesn't depend on x-pack? Since the Kibana image on Docker Hub is no longer updated I guess half the world is waiting in suspense for it to arrive :)

@Webreaper
Copy link

Yeah, this is pretty frustrating - I'm trying to update to Kibana 5.6 to resolve some gauge rendering issues (amongst other things) and it's not available on Docker hub, but the version on the Elastic Docker hub doesn't appear to be fit-for-purpose if you're not running X-Pack.

Do we have an ETA for the OSS package, and is there a workaround in the meantime?

@blacksails
Copy link

blacksails commented Sep 19, 2017

Until we get a fix I just built my own image

FROM docker.elastic.co/kibana/kibana:5.6.0
RUN bin/kibana-plugin remove x-pack

and set XPACK_SECURITY_ENABLED, XPACK_GRAPH_ENABLED, XPACK_ML_ENABLED and XPACK_REPORTING_ENABLED to false.

@dcwangmit01
Copy link

Elaborating on @pavlod and @xbulat's answers...

If you are running under Kubernetes, you may use the existing elastic.co image unmodified if you add this to your container.spec:

command: [ "/bin/bash", "-c", "/usr/share/kibana/bin/kibana-plugin remove x-pack; /usr/local/bin/kibana-docker" ]

@fsosa
Copy link

fsosa commented Sep 28, 2017

@blacksails any chance you could publish your image or share your dockerfile?

@blacksails
Copy link

@fsosa well my comment contains everything in my dockerfile ;)

@petrus-v
Copy link

petrus-v commented Oct 11, 2017

@jarpy

What was motivations to not build automaticly oss flavor ?

It would be really appreciated if Elastic registry could host oss docker image.

I've tried docker pull docker.elastic.co/kibana/kibana-oss:5.6.3 without success. Is there a plan to publish those images soon as you announced on July?

Regards,

@CpuID
Copy link

CpuID commented Oct 24, 2017

bump would love to see the OSS images published standalone, to avoid people going down the road of their own forks as it seems others already are.

@jarpy
Copy link
Contributor

jarpy commented Oct 24, 2017

bump

Ouch! :)

Sorry for the slow process here. We'll be shipping pre-packaged, OSS-only images as an option with the next 6.0 release candidate. We're also working with Docker Inc. to continue support for the existing 5.x series OSS images on Docker Hub.

@CpuID
Copy link

CpuID commented Oct 24, 2017

We're also working with Docker Inc. to continue support for the existing 5.x series OSS images on Docker Hub.

interesting option, thx.

@qoomon
Copy link

qoomon commented Oct 25, 2017

This seem quite active https://hub.docker.com/r/blacktop/kibana/

@petrus-v
Copy link

@jarpy

Hey, I've notice that it's effectively ready to pull image from -oss flavor for versions 6.x.x (ie: docker pull docker.elastic.co/kibana/kibana-oss:6.1.1).

Thank you very much about that!

@jarpy
Copy link
Contributor

jarpy commented Jan 2, 2018

You are welcome!

Thanks for reminding me that we can close this issue.

@jarpy jarpy closed this as completed Jan 2, 2018
@yogeek
Copy link

yogeek commented Jan 11, 2018

Hello,

I tried @blacksails solution to uninstall xpack in kibana Dockerfile but the initialization is still quite slow.
240 seconds to start...
The log contains the following lines :

kibana_1          | {"type":"log","@timestamp":"2018-01-11T09:09:44Z","tags":["warning","config"],"pid":1,"message":"Settings for \"xpack\" were not applied, check for spelling errors and ensure the plugin is loaded."}
kibana_1          | {"type":"log","@timestamp":"2018-01-11T09:09:46Z","tags":["info","optimize"],"pid":1,"message":"Optimizing and caching bundles for kibana, stateSessionStorageRedirect, timelion and status_page. This may take a few minutes"}
kibana_1          | {"type":"log","@timestamp":"2018-01-11T09:13:47Z","tags":["info","optimize"],"pid":1,"message":"Optimization of bundles for kibana, stateSessionStorageRedirect, timelion and status_page complete in 241.23 seconds"}

Here is my config :

Dockerfile

FROM docker.elastic.co/kibana/kibana:5.6.5
RUN bin/kibana-plugin remove x-pack
COPY config/kibana.yml /usr/share/kibana/config/kibana.yml

config/kibana.yml

server.name: kibana
server.host: "0"
elasticsearch.url: http://elasticsearch:9200
elasticsearch.username: elastic
elasticsearch.password: changeme
xpack.monitoring.ui.container.elasticsearch.enabled: false

xpack.security.enabled: false
xpack.monitoring.enabled: false
xpack.graph.enabled: false
xpack.reporting.enabled: false
xpack.ml.enabled: false
xpack.watcher.enabled: false

docker-compose.yml

  kibana:
    image: kibana-test
    build:
      context: ./kibana
    ports:
      - "5601:5601"
    volumes:
      - "./kibana/config/:/usr/share/kibana/config"
    depends_on:
      - elasticsearch

Am I missing something ?
Thank you

@dliappis
Copy link
Contributor

@yogeek Have you considered running the -oss image flavor instead?

The -oss flavor doesn't have x-pack preinstalled so you don't need to customize your image. There's also an -oss flavor for elasticsearch. All images can be listed at https://www.docker.elastic.co

@yogeek
Copy link

yogeek commented Jan 11, 2018

@dliappis Sorry I have forgotten to precise that I have to use the 5.6.5 version and oss flavours are not yet available

@dliappis
Copy link
Contributor

@yogeek Sorry I missed that you used <6.0.0

So you need to trigger a bundle reoptimization (which Kibana doesn't do after remove, but does after install) as shown in the example: #27 (comment) . There is a kibana issue in elastic/kibana#6057, it's not related to Docker.

So change your Dockerfile kibana-plugin remove x-pack to:

RUN bin/kibana-plugin remove x-pack && \
    kibana 2>&1 | grep -m 1 "Optimization of .* complete"

I was successful running docker-compose build kibana && docker-compose up with the following compose/Dockerfiles:

docker-compose.yml and Dockerfile uninstalling kibana
vagrant@m01:~$ tree
.
├── docker-compose.yml
└── kibana
    ├── config
    │   └── kibana.yml
    └── Dockerfile

2 directories, 3 files

vagrant@m01:~$ cat docker-compose.yml 
version: '2.2'
services:
  kibana:
    image: kibana-test
    build:
      context: ./kibana
    ports:
      - "5601:5601"
    volumes:
      - "./kibana/config/:/usr/share/kibana/config"
    depends_on:
      - elasticsearch
    networks:
      - myelastic

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:5.6.5
    environment:
      - 'xpack.security.enabled=false'
    ports:
      - "9200:9200"
    networks:
      - myelastic
   
networks:
  myelastic:

vagrant@m01:~$ cat kibana/Dockerfile 
FROM docker.elastic.co/kibana/kibana:5.6.5
RUN bin/kibana-plugin remove x-pack && \
    kibana 2>&1 | grep -m 1 "Optimization of .* complete"
COPY config/kibana.yml /usr/share/kibana/config/kibana.yml

vagrant@m01:~$ cat kibana/config/kibana.yml 
server.name: kibana
server.host: "0"
elasticsearch.url: http://elasticsearch:9200

xpack.monitoring.ui.container.elasticsearch.enabled: false
xpack.security.enabled: false
xpack.monitoring.enabled: false
xpack.graph.enabled: false
xpack.reporting.enabled: false
xpack.ml.enabled: false
xpack.watcher.enabled: false

@dliappis
Copy link
Contributor

Explicitly running optimize is worked on in elastic/kibana#14991

@yogeek
Copy link

yogeek commented Jan 11, 2018

@dliappis Great it works !
Thank you very much for your help (I did not understand the optimization tip when I read the thread the first time)

@melissachang
Copy link

It would be nice if the oss variants were at https://www.docker.elastic.co/# (which is linked to from https://www.elastic.co/guide/en/kibana/current/docker.html). Can I file an Issue?

@tylersmalley
Copy link
Contributor

@melissachang you can click the arrow next to the version for all variants.

@melissachang
Copy link

Ah thanks, I totally missed that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests