Kibana container stopped working after upgrading to 4.2.1 from 4.2.0
docker logs shows only this:
fs.js:565
fs.write = function(fd, buffer, offset, length, position, callback) {
^
Error: EACCES, permission denied '/opt/kibana/optimize/.babelcache.json'
at Error (native)
at Object.fs.openSync (fs.js:500:18)
at Object.fs.writeFileSync (fs.js:1099:15)
at save (/opt/kibana/node_modules/babel-core/lib/api/register/cache.js:35:19)
at process._tickDomainCallback (node.js:381:11)
at Function.Module.runMain (module.js:503:11)
at startup (node.js:129:16)
at node.js:814:3
Oh that's strange -- can you provide the docker run arguments you used to start the container so we can try and reproduce? Are you using any volumes?
I saw this as well. It only happens after I've installed a plugin like Marvel or Sense.
I saw that .babelcache.json had 644 permissions.
I added RUN chmod o+w /opt/kibana/optimize/.babelcache.json and it works fine.
ditto; I ran into the same issue. I have a custom image that only has RUN kibana plugin -i elasticsearch/marvel/latest
If I use my custom image it fails with the same error as noted above, but if I use the official kibana image, it works.
Dockerfile
FROM kibana:4
# 2.0 plugin structure
RUN kibana plugin -i elasticsearch/marvel/latest
This works, but fails if I use the image created with the above dockerfile.
docker run \
--rm \
-p 5601:5601 \
-e "ELASTICSEARCH_URL=http://logging.elasticsearch.service.consul:9200" \
kibana
ah, I see the issue. In the Kibana dockerfile it runs this: RUN chown -R kibana:kibana /opt/kibana
it looks like when I run kibana plugin -i elasticsearch/marvel/latest it is installing it as root and not under the uid:gid `kibana:kibana. Adding
RUN chown -R kibana:kibana /opt/kibana
as the last line in my dockerfile fixes the issues. Is there a way for kibana plugin to respect the uid:gid of the folder it is installing into?
I think your best bet is probably to just use gosu like the entrypoint itself does, ie:
FROM kibana:4
RUN gosu kibana kibana plugin -i elasticsearch/marvel/latest
Any ideas what to do if I tried all the suggestions in this thread?
Thank you @tianon. I am using gosu and all is nice and dandy again.
Using gosu didn't work for me, but changing to the user kibana and back to root again worked for me, using one of the solutions in https://github.com/spujadas/elk-docker/issues/34#issuecomment-214701418
My Dockerfile ended up looking like:
FROM kibana:4.5
USER kibana
RUN kibana plugin --install elastic/sense
USER root
I'll leave this here in case it helps someone else.
I'm hitting this same kind of error after upgrading from 5.0 rc to 5.0 rtm. I checked all the file permissions on windows.
C:\kibana-5.0\bin>kibana.bat
fs.js:640
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EPERM: operation not permitted, open 'C:\kibana-5.0\optimize\.babelcache.json'
at Error (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.writeFileSync (fs.js:1333:33)
at save (C:\kibana-5.0\node_modules\babel-core\lib\api\register\cache.js:35:19)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
@niemyjski is this still an issue with one of the latest supported versions?
Supported tags and respective Dockerfile links
5.1.1, 5.1, 5, latest (5/Dockerfile) 4.6.3, 4.6, 4 (4.6/Dockerfile)
This image is officially deprecated in favor of upstream's images (see https://www.elastic.co/guide/en/kibana/current/_pulling_the_image.html).
For more information, please see docker-library/elasticsearch#160, docker-library/docs#842, and docker-library/docs#945.
This image has been deprecated in favor of the official
kibanaimage provided and maintained by elastic.co. The upstream images are available to pull viadocker.elastic.co/kibana/kibana:[version]like5.4.2. The images found here will receive no further updates once the5.6.0release is available upstream. Please adjust your usage accordingly.Elastic provides open-source support for Kibana via the elastic/kibana GitHub repository and the Docker image via the elastic/kibana-docker GitHub repository, as well as community support via its forums.
Thanks!