当前位置: 首页 > 知识库问答 >
问题:

在CentOS 7上安装Ambari 2.7.5失败

贺季
2023-03-14

我正在安装ApacheAmbari 2.7。5在CentOS 7机器上。

我遵循Apache网站上的安装指南。

指南步骤1的最后一个命令

mvn-B清洁安装rpm:rpm-DnewVersion=2.7。5.0.0-DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972-DskipTests-Dpython。ver=“python

以以下错误结束:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:18 min
[INFO] Finished at: 2020-04-30T22:51:27+02:00
[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:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    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:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
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:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    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:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
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)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    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:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR] 
[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/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :ambari-admin

我的Maven版本是3.6.3,Java版本是1.8。0_252。

对我来说,错误描述的信息量不大。错误堆栈末尾提供的帮助链接也不是很有用:它说“与许多其他错误不同,此异常不是由Maven core本身生成的,而是由插件生成的。根据经验,插件使用此错误来表示其配置中的问题或从POM检索到的信息。”

我对马文没有太多的经验,所以我在这一点上感到卡住了。有谁知道从这里搬去哪里吗?任何建议将不胜感激。

共有1个答案

长孙阳州
2023-03-14

@KonstantinPopov

对于上面出现的MojoExecutionException错误,您需要在构建环境中做一些额外的工作。如果您完全按照说明进行操作,那么在使用ambari mvn命令构建ambari包之前,您仍然需要获得正确版本的maven、npm和nodejs。同样在ambari admin pom中。xml您需要为Node/NPM设置版本。然后它应该正确构建

我的Centos 7.4完整历史记录如下:

[root@c7401 apache-ambari-2.7.5-src]# history
    1  yum install wget rsync nano maven java java-devel rpm-build gcc -y
    2  yum install ntp python python-devel rpm-build gcc-c++ java-1.7.0-openjdk java-1.7.0-openjdk-devel git -y
    3  wget https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg#md5=fe1f997bc722265116870bc7919059ea
    4  sh setuptools-0.6c11-py2.7.egg
    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
   15  wget https://downloads.apache.org/ambari/ambari-2.7.5/apache-ambari-2.7.5-src.tar.gz
   16  tar xfvz apache-ambari-2.7.5-src.tar.gz
   17  cd apache-ambari-2.7.5-src
   19  cd ambari-admin
   28  yum --enablerepo=extras install epel-release
   29  yum install npm -y
   32  node -v
   33  npm -v
   34  nano pom.xml
   35  cd ..
   36  mvn versions:set -DnewVersion=2.7.5.0.0
   37  pushd ambari-metrics
   38  mvn versions:set -DnewVersion=2.7.5.0.0
   39  popd
   40  mvn -B clean install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.7"
   41  yum install /root/apache-ambari-2.7.5-src/ambari-server/target/rpm/ambari-server/RPMS/x86_64/ambari-server-2.7.5.0-0.x86_64.rpm
   42  yum install /root/apache-ambari-2.7.5-src/ambari-agent/target/rpm/ambari-agent/RPMS/x86_64/ambari-agent-2.7.5.0-0.x86_64.rpm

maven文件的内容:

export JAVA_HOME=/usr/lib/jvm/jre-openjdk
export M2_HOME=/opt/maven
export MAVEN_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}

Ambari管理Pom文件中的更改:(确保您的版本正确)

           <configuration>
              <nodeVersion>v6.17.1</nodeVersion>
              <npmVersion>3.10.10</npmVersion>
              <workingDirectory>src/main/resources/ui/admin-web/</workingDirectory> 
<npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
            </configuration>
 类似资料:
  • 无法在Heroku上安装Yi2。 我正在尝试在Heroku上安装Yi2基本应用程序模板。但我面临着依赖性/编写器问题。 该应用程序在本地计算机上运行良好,但在部署到heroku时,会抛出ReflectionClass错误(找不到类yii\debug\Module)。此异常与yii2调试模块有关。我对作曲家的内部运作一无所知。我已经运行了,,但没有任何帮助。这些文件实际上存在于服务器上,这使我认为这

  • 我试图在windows server上安装Elasticsearch 7.16.2,但在安装过程中,我发现以下错误。 安装服务:"elasticsearch-service-x64"使用ES_JAVA_HOME(64-bit):"C:\Program Files\Java\jdk-17.0.1"-Dhs_err_pid=60;-D1m=10;-XX: AlwaysPreTouch;-Xsses.n

  • 问题内容: 我对知道在当前版本的centos7(7.5.1804)上安装用于python3.6的pip3的推荐方法(截至今天,2018年5月)以及如何在CentOS7中安装pip的公认答案感到不安。似乎已过时,因为: 输出(除其他外): 而且似乎比(如何在CentOS7中安装pip)的答案(更新的?)更简单。: 须藤百胜安装python34-setuptools sudo easy_install

  • 本文向大家介绍如何在centos7中安装nginx,包括了如何在centos7中安装nginx的使用技巧和注意事项,需要的朋友参考一下 安装所需环境 一. gcc 安装 安装 nginx 需要先将官网下载的源码进行编译,编译依赖 gcc 环境,如果没有 gcc 环境,则需要安装: yum install gcc-c++ 二. PCRE pcre-devel 安装 PCRE(Perl Compati

  • 本文向大家介绍Centos7 中安装 Node.js v4.4.4,包括了Centos7 中安装 Node.js v4.4.4的使用技巧和注意事项,需要的朋友参考一下 我们先来看看如何通过源码来编译安装 1、安装依赖包 [root@1c3b4a5a8f31 ~]# yum -y install gcc gcc-c++ openssl-devel 2、下载源码包 3、配置、编译、安装 4、配置nod

  • 本文向大家介绍Centos7下安装Docker Engine,包括了Centos7下安装Docker Engine的使用技巧和注意事项,需要的朋友参考一下 一.先决条件 首选需要一个64位操作系统和3.10或者更版本的内核。 查看当前内核版本: 二.yum安装Docker Engine 安装Docker Engine有两种方式,我们先选择yum安装,并且Docker官方提供了yum源。 1.使用普

  • 构建或组装调试工作良好。 但是,安装APK时会出现“分析包时出错”的问题。 当我查找它时,我看到要将android:导出="true"添加到活动中,将其添加到所有活动中正确吗?我应该添加活动以外的东西吗? 举个例子

  • 我试图在Mac OSX 10.7上安装JDK 1.7更新21。我从oracle站点下载了安装程序(作为dmg文件)。运行成功完成的安装程序。现在我在文件系统的任何地方都找不到java SDK。的输出为: