Leemoonsoo opened a new pull request #4070:
URL: https://github.com/apache/zeppelin/pull/4070
### What is this PR for?
Without HOME env variable set in Docker image, installing a helium
visualization package fails with error.
```
INFO [2021-03-04 06:40:51,674] ({qtp418304857-31}
YarnTaskExecutor.java[execute]:54) - Running 'yarn config set cache-folder
/opt/zeppelin/local-repo/helium-bundle/yarn-cache
--registry=https://registry.npmjs.org/' in
/opt/zeppelin/local-repo/helium-bundle
ERROR [2021-03-04 06:40:51,793] ({Thread-24}
InputStreamHandler.java[log]:60) -
/opt/zeppelin/local-repo/helium-bundle/node/yarn/dist/node_modules/mkdirp/index.js:90
ERROR [2021-03-04 06:40:51,795] ({Thread-24}
InputStreamHandler.java[log]:60) - throw err0;
ERROR [2021-03-04 06:40:51,795] ({Thread-24}
InputStreamHandler.java[log]:60) - ^
ERROR [2021-03-04 06:40:51,795] ({Thread-24}
InputStreamHandler.java[log]:60) -
ERROR [2021-03-04 06:40:51,796] ({Thread-24}
InputStreamHandler.java[log]:60) - Error: EACCES: permission denied, mkdir
'/.cache'
ERROR [2021-03-04 06:40:51,796] ({Thread-24}
InputStreamHandler.java[log]:60) - at Error (native)
ERROR [2021-03-04 06:40:51,796] ({Thread-24}
InputStreamHandler.java[log]:60) - at Object.fs.mkdirSync (fs.js:922:18)
ERROR [2021-03-04 06:40:51,797] ({Thread-24}
InputStreamHandler.java[log]:60) - at sync
(/opt/zeppelin/local-repo/helium-bundle/node/yarn/dist/node_modules/mkdirp/index.js:71:13)
ERROR [2021-03-04 06:40:51,797] ({Thread-24}
InputStreamHandler.java[log]:60) - at Function.sync
(/opt/zeppelin/local-repo/helium-bundle/node/yarn/dist/node_modules/mkdirp/index.js:77:24)
ERROR [2021-03-04 06:40:51,797] ({Thread-24}
InputStreamHandler.java[log]:60) - at Object.<anonymous>
(/opt/zeppelin/local-repo/helium-bundle/node/yarn/dist/bin/yarn.js:30:8)
ERROR [2021-03-04 06:40:51,797] ({Thread-24}
InputStreamHandler.java[log]:60) - at Module._compile (module.js:570:32)
ERROR [2021-03-04 06:40:51,798] ({Thread-24}
InputStreamHandler.java[log]:60) - at Object.Module._extensions..js
(module.js:579:10)
ERROR [2021-03-04 06:40:51,799] ({Thread-24}
InputStreamHandler.java[log]:60) - at Module.load (module.js:487:32)
ERROR [2021-03-04 06:40:51,801] ({Thread-24}
InputStreamHandler.java[log]:60) - at tryModuleLoad (module.js:446:12)
ERROR [2021-03-04 06:40:51,801] ({Thread-24}
InputStreamHandler.java[log]:60) - at Function.Module._load
(module.js:438:3)
```
This error can be solved by manually adding HOME env variable when starting
docker container, like
```
docker run -p8080:8080 --rm -e HOME=/opt/zeppelin -e
ZEPPELIN_HELIUM_REGISTRY=helium,https://s3.amazonaws.com/helium-package/helium.json
apache/zeppelin:0.9.0
```
However, the error message is not very intuitive and it may take lots of
time to find a solution.
So, I think it make sense to set the HOME env variable in Dockerfile.
### What type of PR is it?
Bug Fix
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-5167
### How should this be tested?
Reproduce the problem by running Zeppelin from the latest docker image
without the HOME env variable.
And try to install a visualization package from Helium menu
```
docker run -p8080:8080 --rm -e
ZEPPELIN_HELIUM_REGISTRY=helium,https://s3.amazonaws.com/helium-package/helium.json
apache/zeppelin:0.9.0
```
And then test with HOME environment variable, and verify visualization
package is installed without error.
```
docker run -p8080:8080 --rm -e HOME=/opt/zeppelin -e
ZEPPELIN_HELIUM_REGISTRY=helium,https://s3.amazonaws.com/helium-package/helium.json
apache/zeppelin:0.9.0
```
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]