构建 Apache Zeppelin 时构建失败
Posted
技术标签:
【中文标题】构建 Apache Zeppelin 时构建失败【英文标题】:Build Failure while while building the Apache Zeppelin 【发布时间】:2017-06-18 02:19:26 【问题描述】:我正在使用 Spark 安装 Apache Zeppelin,并且在运行 maven install 命令时出现Zeppelin: web Application
的以下错误
[ERROR] error Command failed with exit code 1.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Zeppelin ........................................... SUCCESS [ 50.394 s]
[INFO] Zeppelin: Interpreter .............................. SUCCESS [ 31.632 s]
[INFO] Zeppelin: Zengine .................................. SUCCESS [ 24.134 s]
[INFO] Zeppelin: Display system apis ...................... SUCCESS [ 19.607 s]
[INFO] Zeppelin: Spark dependencies ....................... SUCCESS [01:33 min]
[INFO] Zeppelin: Spark .................................... SUCCESS [ 29.058 s]
[INFO] Zeppelin: Markdown interpreter ..................... SUCCESS [ 5.796 s]
[INFO] Zeppelin: Angular interpreter ...................... SUCCESS [ 4.361 s]
[INFO] Zeppelin: Shell interpreter ........................ SUCCESS [ 4.827 s]
[INFO] Zeppelin: Livy interpreter ......................... SUCCESS [ 50.227 s]
[INFO] Zeppelin: HBase interpreter ........................ SUCCESS [ 11.682 s]
[INFO] Zeppelin: Apache Pig Interpreter ................... SUCCESS [ 10.991 s]
[INFO] Zeppelin: PostgreSQL interpreter ................... SUCCESS [ 5.541 s]
[INFO] Zeppelin: JDBC interpreter ......................... SUCCESS [ 6.663 s]
[INFO] Zeppelin: File System Interpreters ................. SUCCESS [ 6.304 s]
[INFO] Zeppelin: Flink .................................... SUCCESS [ 13.449 s]
[INFO] Zeppelin: Apache Ignite interpreter ................ SUCCESS [ 5.955 s]
[INFO] Zeppelin: Kylin interpreter ........................ SUCCESS [ 4.915 s]
[INFO] Zeppelin: Python interpreter ....................... SUCCESS [ 6.109 s]
[INFO] Zeppelin: Lens interpreter ......................... SUCCESS [ 11.360 s]
[INFO] Zeppelin: Apache Cassandra interpreter ............. SUCCESS [ 58.287 s]
[INFO] Zeppelin: Elasticsearch interpreter ................ SUCCESS [ 9.617 s]
[INFO] Zeppelin: BigQuery interpreter ..................... SUCCESS [ 5.584 s]
[INFO] Zeppelin: Alluxio interpreter ...................... SUCCESS [ 9.001 s]
[INFO] Zeppelin: Scio ..................................... SUCCESS [ 48.425 s]
[INFO] Zeppelin: web Application .......................... FAILURE [28:26 min]
[INFO] Zeppelin: Server ................................... SKIPPED
[INFO] Zeppelin: Packaging distribution ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37:14 min
[INFO] Finished at: 2017-02-01T16:21:39+05:30
[INFO] Final Memory: 224M/1792M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yar
n (yarn install) on project zeppelin-web: Failed to run task: 'yarn install --no
-lockfile --https-proxy=http://sg0227823:***@tulsa-proxy.sabre.com:80 --proxy=ht
tp://sg0227823:***@tulsa-proxy.sabre.com:80' failed. (error code 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :zeppelin-web
【问题讨论】:
maven-frontend-plugin 似乎无法执行 npm 脚本,因为该插件正在尝试使用本地 nodejs 而不是仅安装一个。您能否使用nvm 安装nodejs 6.9.1+ 并重试? 如果你想要更详细的日志,你可以在你的maven命令中添加-X
选项,比如mvn -X ...
仅供参考 - github.com/apache/zeppelin/pull/2016
【参考方案1】:
正如@lambda 在 cmets 中提到的,它已由他的 PR-2016 github.com/apache/zeppelin/pull/2016 修复,但似乎问题又出现在最新版本的 Zeppelin 中。
我通过安装系统范围的 npm 和 nodejs 解决了这个问题:
$ sudo yum install nodejs npm
(请注意,如果您使用的是 RHEL,这两个软件包都只能通过非默认 EPEL yum 存储库 https://fedoraproject.org/wiki/EPEL 获得)。
但后来我得到了
“不支持Node 0.10.48版本,请使用Node.js 4.0或更高版本。”当手动运行 'yarn install --no-lockfile' 时(不要将 Hadoop 的 yarn
命令与此 yarn
命令混淆 - https://yarnpkg.com/en/ 由 nodejs 使用)。这又通过安装最新的稳定 node.js 得到解决
$ sudo npm install n -g
$ sudo n stable
ps。一开始很难诊断 yarn 命令到底出了什么问题,因为 maven 只是吐出“错误代码 1”,但是您可以通过手动运行相同的命令来进行调试,例如,./zeppelin-web/node/yarn/dist/bin/yarn install --no-lock
(假设您在zeppelin 代码库)。所以你得到了确切问题的输出。
【讨论】:
以上是关于构建 Apache Zeppelin 时构建失败的主要内容,如果未能解决你的问题,请参考以下文章