Unable to start Kibana

I am trying to start Kibana using a docker. I have already installed elastic search and it is working fine: I can see the elastic search status here: http://localhost:9200/_cluster/health?pretty

But when I run kibana docker file, it is not starting and giving the below error:
{"type":"log","@timestamp":"2021-03-31T16:54:38Z","tags":["info","plugins-system"],"pid":12,"message":"Starting [3] plugins: [security,translations,data]"}
{"type":"log","@timestamp":"2021-03-31T16:55:08Z","tags":["info","optimize"],"pid":12,"message":"Optimizing and caching bundles for graph, monitoring, space_selector, login, overwritten_session, logout, logged_out, ml, dashboardViewer, apm, code, maps, canvas, infra, siem, uptime, stateSessionStorageRedirect, status_page, timelion and kibana. This may take a few minutes"}
Browserslist: caniuse-lite is outdated. Please run next command npm update
Browserslist: caniuse-lite is outdated. Please run next command npm update
Browserslist: caniuse-lite is outdated. Please run next command npm update
Browserslist: caniuse-lite is outdated. Please run next command npm update
events.js:174
throw er; // Unhandled 'error' event
^

Error: write EPIPE
at WriteWrap.afterWrite (net.js:782:14)
Emitted 'error' event at:
at onwriteError (_stream_writable.js:431:12)
at onwrite (_stream_writable.js:456:5)
at _destroy (internal/streams/destroy.js:40:7)
at Socket._destroy (net.js:607:3)
at Socket.destroy (internal/streams/destroy.js:32:8)
at WriteWrap.afterWrite (net.js:784:10)

My kIbana docker file looks like this:

FROM docker.elastic.co/kibana/kibana:${KIBANA_VER}

ARG KIBANA_VER
ARG ENH_TAB_VER=1.6.0
ARG DEPLOY_ENV=ENV_NOT_SET

# https://github.com/fbaligand/kibana-enhanced-table
RUN kibana-plugin install https://github.com/fbaligand/kibana-enhanced-table/releases/download/v${ENH_TAB_VER}/enhanced-table-${ENH_TAB_VER}_${KIBANA_VER}.zip

# Add environment label to Kibana breadcrumbs
ENV DEPLOY_ENV="${DEPLOY_ENV}"
COPY src/usr/local/bin/custom-entrypoint /usr/local/bin/custom-entrypoint
# RUN sed '$iecho "nav[aria-label=breadcrumb]:before { content: \\"${DEPLOY_ENV} |\\"; margin-right: 5px; }" >> /usr/share/kibana/node_modules/\@elastic/eui/dist/eui_theme_light.css' /usr/local/bin/kibana-docker /tmp/kibana-docker
# RUN mv /tmp/kibana-docker /usr/local/bin/kibana-docker

# RUN echo "nav[aria-label=breadcrumb]:before { content: \"${DEPLOY_ENV} |\"; margin-right: 5px; }" >> /usr/share/kibana/node_modules/\@elastic/eui/dist/eui_theme_light.css
ENTRYPOINT [ "/usr/local/bin/custom-entrypoint" ]
CMD [ "/usr/local/bin/kibana-docker" ]```

custom-entrypoint file: 
#!/bin/bash
BREADCRUMB="nav[aria-label=breadcrumb]:before { content: \"${DEPLOY_ENV} |\"; margin-right: 5px; }"
echo $BREADCRUMB >> /usr/share/kibana/node_modules/\@elastic/eui/dist/eui_theme_light.css
echo $BREADCRUMB >> /usr/share/kibana/node_modules/\@elastic/eui/dist/eui_theme_dark.css

/usr/local/bin/dumb-init -- "$@"

Hi, what version of kibana you are trying to run?
Does the error appear also if you don't install the enhanced table plugin?

@markov00 I am using kibana version 7.4.2
I just tried without installing enhanced table plugin. It works fine now. May I know what is causing that issue?

I'm not an expert here, but I suspect that you can't write files when installing the plugin.
Could you please check and compare your docker file with the one described here:

It looks like there are some additional steps and arguments to add plugins (like the --allow-root) Please try to follow that example and let me know if that help

Tried with --allow-root, still no luck.

Strange, I've configured probably something really similar to what you have and seems to work just fine without any modification.
This are all the file I've on my folder:

custom-entrypoint:

#!/bin/bash
BREADCRUMB="nav[aria-label=breadcrumb]:before { content: \"${DEPLOY_ENV} |\"; margin-right: 5px; }"
echo $BREADCRUMB >> /usr/share/kibana/node_modules/\@elastic/eui/dist/eui_theme_light.css
echo $BREADCRUMB >> /usr/share/kibana/node_modules/\@elastic/eui/dist/eui_theme_dark.css

/usr/local/bin/dumb-init -- "$@"

Dockerfile (I've manually added the default ARG for kibana)

FROM docker.elastic.co/kibana/kibana:7.4.0

ARG KIBANA_VER=7.4.0
ARG ENH_TAB_VER=1.6.0
ARG DEPLOY_ENV=ENV_NOT_SET

# https://github.com/fbaligand/kibana-enhanced-table
RUN kibana-plugin install https://github.com/fbaligand/kibana-enhanced-table/releases/download/v${ENH_TAB_VER}/enhanced-table-${ENH_TAB_VER}_7.4.0.zip

# Add environment label to Kibana breadcrumbs
ENV DEPLOY_ENV="${DEPLOY_ENV}"
COPY custom-entrypoint /usr/local/bin/custom-entrypoint
# RUN sed '$iecho "nav[aria-label=breadcrumb]:before { content: \\"${DEPLOY_ENV} |\\"; margin-right: 5px; }" >> /usr/share/kibana/node_modules/\@elastic/eui/dist/eui_theme_light.css' /usr/local/bin/kibana-docker /tmp/kibana-docker
# RUN mv /tmp/kibana-docker /usr/local/bin/kibana-docker

# RUN echo "nav[aria-label=breadcrumb]:before { content: \"${DEPLOY_ENV} |\"; margin-right: 5px; }" >> /usr/share/kibana/node_modules/\@elastic/eui/dist/eui_theme_light.css
ENTRYPOINT [ "/usr/local/bin/custom-entrypoint" ]
CMD [ "/usr/local/bin/kibana-docker" ]

docker-compose.yaml where I also included an elasticsearch

version: "3"
services:
  elasticsearch:
    environment:
      - reindex.remote.whitelist=docker.for.mac.host.internal:9200
      - discovery.type=single-node
    image: docker.elastic.co/elasticsearch/elasticsearch:7.4.2
    container_name: elasticsearch_7_4_2
    ports:
      - 9274:9200
  kibana:
    image: test-kdocker
    container_name: kibana_7_4_2
    ports:
      - 5674:5601

I've then issued the following:

chmod a+x custom-entrypoint

docker build -t test-kdocker .

docker-compose up

it tooks a bit but then I've kibana and es running with the Enhanced table running

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