Error: EROFS: read-only file system, open optimize/.babelcache.json


#1

I have Kibana 6.0.0 installed on a shared read-only file system and looks like kibana does not like this and refuses to start up due to the below error:

fs.js:642
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: EROFS: read-only file system, open 'path/kibana/6.0.0-build001/common/optimize/.babelcache.json'
    at Error (native)
    at Object.fs.openSync (fs.js:642:18)
    at Object.fs.writeFileSync (fs.js:1348:33)
    at save (path/kibana/6.0.0-build001/common/node_modules/babel-register/lib/cache.js:45:16)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)
    at Module.runMain (module.js:606:11)
    at run (bootstrap_node.js:383:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:496:3

Is this a known issue and is there a way to work around this?


(CJ Cenizal) #2

Hi there, Kibana currently requires the ability to write to the file system.

Thanks,
CJ


#3

Thanks CJ for your reply

There is a way to work around this, which is to:

export BABEL_DISABLE_CACHE=1

(And in kibana.yml setting logging.dest, path.data and pid.file to custom paths that are writable.)

Would you recommend this? Besides the effect of a slower start up time, are there any other side effects of when babel cache is disabled?


(CJ Cenizal) #4

I checked with some of the other other engineers, and the general consensus is that this sounds like something worth trying out, but we haven't tried it ourselves nor do we actively test this scenario so you'll be in uncharted territory. You're welcome to try it out, and we'd love to hear how it goes, but we don't know if you'll run into problems. :slight_smile:

CJ


#5

Then I will make it my mission to find out and report back :smile: - thanks for checking CJ.


#6

So looks like the method above works and Kibana starts up fine for only Kibana 5.6.x and maybe earlier versions.

However, for 6.0.x, although the above does get me through the babel error, a subsequent error is thrown:

{"type":"error","@timestamp":"2017-12-13T11:26:25Z","tags":["fatal"],"pid":8950,"level":"fatal","error":{"message":"EROFS: read-only file system, open '/path/optimize/bundles/graph.entry.js'","name":"Error","stack":"Error: EROFS: read-only file system, open '/path/optimize/bundles/graph.entry.js'\n at Error (native)","code":"EROFS"},"message":"EROFS: read-only file system, open '/path/optimize/bundles/graph.entry.js'"}


#7

We bumped into this as well.

We use the official RPMs and notice that Kibana wants to write to /usr/share/kibana. This messes up our security measures because we follow the recommendations of FHS and Red Hat in assuming that /usr is read-only:

https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/ch-filesystem#s1-filesystem-fhs

@cjcenizal Wouldn't it more obvious to write to /var/lib/kibana or /opt/kibana, for example?


(CJ Cenizal) #8

Thank you for bringing this up, Jacco. You're right, we shouldn't write to /usr. We've added this change to our roadmap and we'll get to it ASAP.

CJ


(system) #9

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