构建ambari 2.7.5 Centos 7时出错(在ambari-admin步骤失败) [英] Error building ambari 2.7.5 Centos 7 (fails at ambari-admin step)

查看:1517
本文介绍了构建ambari 2.7.5 Centos 7时出错(在ambari-admin步骤失败)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图按照这些说明,这相对简单。

I am trying to build ambari 2.7.5 on Centos 7 per these instructions, which is relatively straightforward.

但是,当构建进入ambari-admin时,它将失败。有几篇文章描述了解决该问题的一种可能的解决方案-编辑 ... ambari-admin / pom.xml并设置节点和npm版本以匹配服务器上安装的版本。

However, when the build gets to ambari-admin, it fails. There are several posts out there that describe a supposed solution to this- which is editing "...ambari-admin/pom.xml" and setting the node and npm versions to match the versions installed on the server.

不幸的是,这对我不起作用。我尝试了Centos(EPEL)随附的node / npm版本,尝试了apache的最新node / npm版本,并尝试了旧版本。我编辑pom.xml文件以使其匹配。

Sadly, this does not work for me. And I have tried the versions of node/npm that come with Centos(EPEL), I have tried the LATEST node/npm versions from apache, and I've tried older versions. I edit the pom.xml file to match.

最后,无论使用上述方法进行数十次尝试,始终都是完全相同的失败。

In the end, it is always the exact same failure regardless of the dozens of attempts using the above.

mvn -B clean install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6"


[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:05 min
[INFO] Finished at: 2020-06-11T15:43:05-05:00
[INFO] Final Memory: 43M/2151M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (Bower install) on project ambari-admin: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (Bower install) on project ambari-admin: Command execution failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
        at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:362)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
        at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)
        at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:610)
        at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:352)
        ... 22 more
[ERROR]
[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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :ambari-admin

最后,我也尝试降级我正在构建的内容-尝试2.7 .4,2.7.3,..和同一件事。

Lastly, I've ALSO tried downgrading what I am building- trying 2.7.4, 2.7.3,.. and same thing.

很显然,我似乎缺少一些基本知识,但我不知道该怎么做。

Clearly, it appears I am missing something basic but I have no idea what.

这是执行上述mvn build命令之前的典型设置:

Here is the typical setup I do before executing the above mvn build command:

export JAVA_HOME=/usr/lib/jvm/jre-openjdk
export M2_HOME=/usr/local/apache-maven-3.3.9
export MAVEN_HOME=/usr/local/apache-maven-3.3.9
export PATH=${M2_HOME}/bin:${PATH}
export _JAVA_OPTIONS="-Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true"


# npm -v
3.10.10
# node -v
v6.17.1
# mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T10:41:47-06:00)
Maven home: /usr/local/apache-maven-3.3.9
Java version: 1.8.0_252, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1127.8.2.el7.x86_64", arch: "amd64", family: "unix"

cd /usr/local/src
wget https://www-eu.apache.org/dist/ambari/ambari-2.7.5/apache-ambari-2.7.5-src.tar.gz
tar xfvz apache-ambari-2.7.5-src.tar.gz
cd apache-ambari-2.7.5-src
mvn versions:set -DnewVersion=2.7.5.0.0

pushd ambari-metrics
mvn versions:set -DnewVersion=2.7.5.0.0
popd


推荐答案

您正在寻找的解决方案是编辑

The solution you are looking for is to edit

ambari-admin/pom.xml

您将需要更新您的npm / node的版本。例如,在我今天的构建中:

You will need to update your version of npm/node. For example in my build today:

<nodeVersion>v10.21.0</nodeVersion>
<npmVersion>6.14.4</npmVersion>

这些版本位于构建和构建环境中。我必须从node14退回到node 10,以便获得依赖关系,一直到下一个Bower / Angular冲突为止。

Those versions are in the build and the build environment. I had to go backwards from node14 to node 10 in order to get dependencies to work all way through to the next bower/angular conflict.

根据您的构建环境,您可能还需要编辑

Depending on your build environment you may also need to edit

ambari-admin/src/main/resources/ui/admin-web/bower.json

例如在我今天的版本中:

For example in my build today:

{
  "name": "adminconsole",
  "private": true,
  "dependencies": {
    "bootstrap": "3.3.7",
    "angular": "1.3.0",
    "angular-route": "1.3.0",
    "angular-bootstrap": "0.11.0",
    "underscore": "1.7.0",
    "restangular": "1.4.0",
    "angular-bootstrap-toggle-switch": "0.5.1",
    "angular-animate": "1.3.0",
    "angular-translate": "~2.8.1",
    "font-awesome": "4.2.0"
  },
  "devDependencies": {
    "angular-mocks": "1.3.0",
    "commonjs": "0.2.0",
    "chai": "1.8.0",
    "mocha": "1.14.0",
    "sinon": "1.10.3"
  }
}

您可能还需要获得Maven 3.6 .3:

You may also need to get maven 3.6.3:

    5 wget https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz -P /tmp
    6  tar xf /tmp/apache-maven-3.6.3-bin.tar.gz -C /opt
    7  ln -s /opt/apache-maven-3.6.3 /opt/maven
    8  nano /etc/profile.d/maven.sh
    9  chmod +x /etc/profile.d/maven.sh
   10  source /etc/profile.d/maven.sh
   11  mvn -v

您可以找到有关此帖子的更多信息:

You can find more info on this post:

在CentOS 7上的Ambari 2.7.5安装失败

这篇关于构建ambari 2.7.5 Centos 7时出错(在ambari-admin步骤失败)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆