Closed ivanthelad closed 8 years ago
Thanks for this report @ivanthelad. Yes. we have been discussing this option. @cescoffier, do you have any suggestions do make here?
it needs one of the following update in the docker file:
RUN chmod -R /app 777
or
append to the command line -Dvertx.cacheDirBase=/tmp/vertx-cache
I had the same issue and tried setting the system property. Unfortunately this gave further warnings (see below). Using chmod however does the trick.
SEVERE: Unexpected exception in route
io.vertx.core.file.FileSystemException: java.nio.file.AccessDeniedException: /app/file-uploads
at io.vertx.core.file.impl.FileSystemImpl$10.perform(FileSystemImpl.java:648)
at io.vertx.core.file.impl.FileSystemImpl$10.perform(FileSystemImpl.java:630)
at io.vertx.core.file.impl.FileSystemImpl.mkdirsBlocking(FileSystemImpl.java:237)
at io.vertx.ext.web.handler.impl.BodyHandlerImpl$BHandler.makeUploadDir(BodyHandlerImpl.java:115)
at io.vertx.ext.web.handler.impl.BodyHandlerImpl$BHandler.
Oh, yes. If you upload files is creates the file on the file system. You could change this directory when creating the body handler (it has one version where you pass the directory):
BodyHandler.create("/tmp/uploads");
Is this issue still valid?
I don't think so.
MSA aloha deployment fails with a repeated crashback loop due to following error
[osadmin@open-master01 PV_dir]$ oc logs aloha-5-lqslc -f I> No access restrictor found, access to any MBean is allowed Jolokia: Agent started with URL https://10.1.5.9:8778/jolokia/ Exception in thread "main" java.lang.IllegalStateException: Failed to create cache dir at io.vertx.core.impl.FileResolver.setupCacheDir(FileResolver.java:256) at io.vertx.core.impl.FileResolver.(FileResolver.java:79)
at io.vertx.core.impl.VertxImpl.(VertxImpl.java:138)
at io.vertx.core.impl.VertxImpl.(VertxImpl.java:114)
at io.vertx.core.impl.VertxImpl.(VertxImpl.java:110)
at io.vertx.core.impl.VertxFactoryImpl.vertx(VertxFactoryImpl.java:34)
at io.vertx.core.Vertx.vertx(Vertx.java:79)
at com.redhat.developers.msa.aloha.AlohaApplication.main(AlohaApplication.java:24)
[osadmin@open-master01 PV_dir]$ history
Bit of googling shows its a common issue with vert.x
http://stackoverflow.com/questions/35748582/vert-x-based-application-crashes-on-docker-container
It must be that this fails as reviewing the scc restricted showed this changes were not applied
https://github.com/redhat-helloworld-msa/helloworld-msa/blob/master/ansible/helloworld-msa.yml#L24
After apply these changes to the restricted scc the aloha container started up.
Recommendations. Perhaps rewrite the app so it doesn't attempt to start a cache on a path that is off limits to a container that is started by the default restricted scc