Apache Zeppelin 0.8.0-Snapshot “Failed to exec build:dist” ( Building Zeppelin: web Application)

怎甘沉沦 提交于 2019-12-10 12:06:09

问题


I am building Apache Zeppelin 0.8.0 from maven and I have to use advanced features provided by Zeppelin e.g. Apache Zeppelin Notebook Authorization allow "Runners" But I am trying while different versions of node and npm but still getting the following error during mvn clean package -DskipTests for building Building Zeppelin: web Application.
Following is the error log from debug log: /root/.npm/_logs/2018-03-22T10_38_10_265Z-debug.log

Also when this new version( 0.8.0) will release?

1 verbose cli [ '/root/zeppelin/zeppelin-web/node/node',
1 verbose cli   '/root/zeppelin/zeppelin-web/node/node_modules/npm/bin/npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build:dist' ]
2 info using npm@5.5.1
3 info using node@v8.9.3
4 verbose run-script [ 'prebuild:dist', 'build:dist', 'postbuild:dist' ]
5 info lifecycle zeppelin-web@0.0.0~prebuild:dist: zeppelin-web@0.0.0
6 info lifecycle zeppelin-web@0.0.0~build:dist: zeppelin-web@0.0.0
7 verbose lifecycle zeppelin-web@0.0.0~build:dist: unsafe-perm in lifecycle true
8 verbose lifecycle zeppelin-web@0.0.0~build:dist: PATH: /root/zeppelin/zeppelin-web/node/node_modules/npm/bin/node-gyp-bin:/root/zeppelin/zeppelin-web/node_modules/.bin:/root/zeppelin/zeppel$9 verbose lifecycle zeppelin-web@0.0.0~build:dist: CWD: /root/zeppelin/zeppelin-web
10 silly lifecycle zeppelin-web@0.0.0~build:dist: Args: [ '-c',
10 silly lifecycle   'npm-run-all prebuild && grunt pre-webpack-dist && webpack && grunt post-webpack-dist' ]
11 silly lifecycle zeppelin-web@0.0.0~build:dist: Returned: code: 3  signal: null
12 info lifecycle zeppelin-web@0.0.0~build:dist: Failed to exec build:dist script
13 verbose stack Error: zeppelin-web@0.0.0 build:dist: `npm-run-all prebuild && grunt pre-webpack-dist && webpack && grunt post-webpack-dist`
13 verbose stack Exit status 3
13 verbose stack     at EventEmitter.<anonymous> (/root/zeppelin/zeppelin-web/node/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/root/zeppelin/zeppelin-web/node/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid zeppelin-web@0.0.0
15 verbose cwd /root/zeppelin/zeppelin-web
16 verbose Linux 4.4.0-87-generic
17 verbose argv "/root/zeppelin/zeppelin-web/node/node" "/root/zeppelin/zeppelin-web/node/node_modules/npm/bin/npm-cli.js" "run" "build:dist"
18 verbose node v8.9.3
19 verbose npm  v5.5.1
20 error code ELIFECYCLE
21 error errno 3
22 error zeppelin-web@0.0.0 build:dist: `npm-run-all prebuild && grunt pre-webpack-dist && webpack && grunt post-webpack-dist`
22 error Exit status 3
23 error Failed at the zeppelin-web@0.0.0 build:dist script.

回答1:


You need to run maven build with non-root user. Bower will break the install if used with root user.

Do any admin task (prerequisite) with root, place git repo under user space and build it there with the user.

Below should work with a normal user:

#Prerequisites
sudo yum update -y
sudo yum install -y java-1.8.0-openjdk-devel git gcc-c++ make
#Using NODE.JS Version 8 (Version 10 / Actual also works).
curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash -
sudo yum install -y nodejs fontconfig
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d    /yarn.repo
sudo yum install -y yarn
npm config set strict-ssl false
npm install -g bower

#Maven Enviroment
mkdir /usr/local/maven
cd /usr/local/maven
wget http://apache.rediris.es/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
tar xzvf apache-maven-3.5.4-bin.tar.gz --strip-components=1
sudo ln -s /usr/local/maven/bin/mvn /usr/local/bin/mvn
#Configure Maven to use more resources
export MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=1024m"

#Proxy Configs
#git config --global http.proxy http://your.company.proxy:port git config --global
#npm config set proxy http://your.company.proxy:8080
#npm config set https-proxy http://your.company.proxy:8080
#nano ~/.bowerrc
#{
#"proxy":"http ://:
#", "https-proxy":"http ://:
#"
#}

#Zeppelin Install
sudo useradd zeppelin
sudo su zeppelin
cd /home/zeppelin
git clone https://github.com/apache/zeppelin.git
cd zeppelin
mvn clean package -Dmaven.test.skip=true

Hope it helps.




回答2:


The issue might be caused by building Zeppelin as root user but 'bower' can't be run as root.

Try to edit the file below to add bower install --silent --allow-root for both "postinstall", "build:dist", and "build:ci" build steps then re-build.

Edit zeppelin/zeppelin-web/package.json:

  "scripts": {
    "clean": "rimraf dist && rimraf .tmp",
    "postinstall": "bower install --silent --allow-root",
    "prebuild": "npm-run-all clean lint:once",
    "build:dist": "npm-run-all prebuild && bower install --silent --allow-root && grunt pre-webpack-dist && webpack && grunt post-webpack-dist",
    "build:ci": "npm-run-all prebuild && bower install --silent --allow-root && grunt pre-webpack-ci && webpack && grunt post-webpack-dist",


来源:https://stackoverflow.com/questions/49426795/apache-zeppelin-0-8-0-snapshot-failed-to-exec-builddist-building-zeppelin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!