Zeppelin:构建 zeppelin 时 Web 应用程序失败

Posted

技术标签:

【中文标题】Zeppelin:构建 zeppelin 时 Web 应用程序失败【英文标题】:Zeppelin: web Application failure while building zeppelin 【发布时间】:2017-01-14 07:08:18 【问题描述】:

我正在尝试使用本教程中的说明构建 apache zeppelin:Installing Zeppelig Tutorial

我安装了最新版本的 spark 2.0 和 maven 3.3.9。我使用以下命令构建 zeppelin:

sudo mvn clean package -DskipTests -Psparkr -Ppyspark -Pspark-2.0 -Dflink

我收到了这个错误:

[ERROR] npm WARN unmet dependency /home/parallels/incubator-zeppelin

/zeppelin-web/node_modules/grunt-jscs/node_modules/jscs requires lodash@'~3.10.0' but will load
[ERROR] npm WARN unmet dependency /home/parallels/incubator-zeppelin/zeppelin-web/node_modules/grunt-jscs/node_modules/lodash,
[ERROR] npm WARN unmet dependency which is version 4.6.1
[ERROR] npm WARN unmet dependency /home/parallels/incubator-zeppelin/zeppelin-web/node_modules/karma-coverage/node_modules/istanbul/node_modules/handlebars requires source-map@'^0.4.4' but will load
[ERROR] npm WARN unmet dependency /home/parallels/incubator-zeppelin/zeppelin-web/node_modules/karma-coverage/node_modules/source-map,
[ERROR] npm WARN unmet dependency which is version 0.5.6
[INFO] 
[INFO] --- frontend-maven-plugin:0.0.25:bower (bower install) @ zeppelin-web ---
[INFO] Running 'bower --allow-root install' in /home/parallels/incubator-zeppelin/zeppelin-web
[ERROR] module.js:338
[ERROR]     throw err;
[ERROR]           ^
[ERROR] Error: Cannot find module 'q'
[ERROR]     at Function.Module._resolveFilename (module.js:336:15)
[ERROR]     at Function.Module._load (module.js:278:25)
[ERROR]     at Module.require (module.js:365:17)
[ERROR]     at require (module.js:384:17)
[ERROR]     at Object.<anonymous> (/home/parallels/incubator-zeppelin/zeppelin-web/node_modules/bower/bin/bower:6:9)
[ERROR]     at Module._compile (module.js:460:26)
[ERROR]     at Object.Module._extensions..js (module.js:478:10)
[ERROR]     at Module.load (module.js:355:32)
[ERROR]     at Function.Module._load (module.js:310:12)
[ERROR]     at Function.Module.runMain (module.js:501:10)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Zeppelin ........................................... SUCCESS [  3.333 s]
[INFO] Zeppelin: Interpreter .............................. SUCCESS [ 12.493 s]
[INFO] Zeppelin: Zengine .................................. SUCCESS [  7.460 s]
[INFO] Zeppelin: Display system apis ...................... SUCCESS [ 16.886 s]
[INFO] Zeppelin: Spark dependencies ....................... SUCCESS [ 33.212 s]
[INFO] Zeppelin: Spark .................................... SUCCESS [ 25.951 s]
[INFO] Zeppelin: Markdown interpreter ..................... SUCCESS [  0.387 s]
[INFO] Zeppelin: Angular interpreter ...................... SUCCESS [  0.223 s]
[INFO] Zeppelin: Shell interpreter ........................ SUCCESS [  0.287 s]
[INFO] Zeppelin: Livy interpreter ......................... SUCCESS [  0.520 s]
[INFO] Zeppelin: HBase interpreter ........................ SUCCESS [  3.979 s]
[INFO] Zeppelin: PostgreSQL interpreter ................... SUCCESS [  0.488 s]
[INFO] Zeppelin: JDBC interpreter ......................... SUCCESS [  0.694 s]
[INFO] Zeppelin: File System Interpreters ................. SUCCESS [  0.766 s]
[INFO] Zeppelin: Flink .................................... SUCCESS [  7.653 s]
[INFO] Zeppelin: Apache Ignite interpreter ................ SUCCESS [  0.871 s]
[INFO] Zeppelin: Kylin interpreter ........................ SUCCESS [  0.334 s]
[INFO] Zeppelin: Python interpreter ....................... SUCCESS [  0.337 s]
[INFO] Zeppelin: Lens interpreter ......................... SUCCESS [  2.984 s]
[INFO] Zeppelin: Apache Cassandra interpreter ............. SUCCESS [01:00 min]
[INFO] Zeppelin: Elasticsearch interpreter ................ SUCCESS [  6.269 s]
[INFO] Zeppelin: BigQuery interpreter ..................... SUCCESS [  0.833 s]
[INFO] Zeppelin: Alluxio interpreter ...................... SUCCESS [  3.350 s]
[INFO] Zeppelin: web Application .......................... FAILURE [  3.653 s]
[INFO] Zeppelin: Server ................................... SKIPPED
[INFO] Zeppelin: Packaging distribution ................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:14 min
[INFO] Finished at: 2016-09-06T19:09:29+01:00
[INFO] Final Memory: 164M/479M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.25:bower (bower install) on project zeppelin-web: Failed to run task: 'bower --allow-root install' failed. (error code 1) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :zeppelin-web

*** 上有另一个线程出现同样的错误,@dirceusemighini 建议 cd 到 zeppelin-web 并运行以下命令。我创建另一个问题的原因是因为我是一个新的堆栈用户,它不会让我对那个问题发表评论。

./bower install

我试过了,我得到了以下错误:

module.js:338
throw err;
      ^
Error: Cannot find module 'q'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/home/parallels/incubator-zeppelin/zeppelin-web/node_modules/bower/bin/bower:6:9)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
parallels@ubuntu:~/incubator-zeppelin/zeppelin-web$ 

我已经卸载了 node、nodejs 和 npm,并在全球范围内重新安装了它们

节点-v:5.0.0

npm -v : 3.3.6

凉亭-v:1.7.9

有什么建议吗??

【问题讨论】:

这是在运行 Ubuntu 14.04 的虚拟机上,是吗?您能否更新链接到您引用的其他问题,请。此外,该错误与allow-root-install 有关,您可以尝试在没有root 的情况下进行构建,看看会发生什么/发布结果。您可能需要克隆到一个全新的目录。还要从你的构建命令中删除-Dflink,因为它没有做任何事情。 你也试过thisnpm install -g q 是的,没错。我试过npm install -g q,没有任何变化。 这是我引用的帖子的链接(***.com/questions/35014273/…)当我在没有 sudo 的情况下运行代码时,它从 Reactor Summurry 的第一行即 Zeppelin 失败...... ...(从帖子上的原始错误查看)即使我删除 -Dflink 我仍然从帖子中收到相同的错误,我无法在此处发布完整的错误 在你更新你的环境之后,你是否删除了 zeppelin 目录并重新克隆(这将是我接下来要尝试的) 【参考方案1】:

对我来说,问题是 Maven 安装。我卸载 Maven 并手动将其重新安装到 /usr/local/apache-maven/ 然后使用文本编辑器设置环境变量并重新运行构建。现在构建成功了。我不知道实际原因,但最后它起作用了..

gedit  ~/.bashrc

export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9
export PATH=$M2_HOME/bin:$PATH

运行构建:

mvn clean package -DskipTests 

【讨论】:

以上是关于Zeppelin:构建 zeppelin 时 Web 应用程序失败的主要内容,如果未能解决你的问题,请参考以下文章

构建 Apache Zeppelin 时出错

构建 Apache Zeppelin 时构建失败

Apache zeppelin 进程死亡

Zeppelin 构建失败

Apache - Zeppelin 在 Ubuntu 上构建失败

安装 Apache Zeppelin 的构建错误