- (SUCCESS) 使用
yum install httpd出现Could not retrieve mirrorlist - (SUCCESS)
ping www.baidu.com - (SUCCESS) Git 下载与升级
- (SUCCESS) CentOS Connecting to failed: No route to host
- (SUCCESS)构建 Maven
- (SUCCESS) fatal: not a git repository (or any of the parent directories): .git
- 编译 Amari Main
- 编译 Ambari Web
- 编译 Ambari Admin View
(SUCCESS) 使用 yum install httpd 出现 Could not retrieve mirrorlist
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was14: curl#7 - "Failed to connect to 2604:1380:2001:d00::3: Network is unreachable"One of the configured repositories failed (Unknown),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem.2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=<repoid> ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable <repoid>orsubscription-manager repos --disable=<repoid>5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=trueCannot find a valid baseurl for repo: base/7/x86_64
- 无法连接到
mirror listhttp://mirrorlist.centos.org/?镜像列表 - 替换新的 Yum 源 (做备份) ```shell [Centos7-Tsinghua-base] name=Centos7-Tsinghua-base baseurl=http://yum.internal.gridsumdissector.com:8080/Centos7-Tsinghua-base gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos7-Tsinghua-GPG-KEY [Centos7-Tsinghua-updates] name=Centos7-Tsinghua-updates baseurl=http://yum.internal.gridsumdissector.com:8080/Centos7-Tsinghua-updates gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos7-Tsinghua-GPG-KEY [Centos7-Tsinghua-extras] name=Centos7-Tsinghua-extras baseurl=http://yum.internal.gridsumdissector.com:8080/Centos7-Tsinghua-extras gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos7-Tsinghua-GPG-KEY [epel-7] name=epel-7 baseurl=http://yum.internal.gridsumdissector.com:8080/epel gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/EPEL-7-GPG-KEY [Centos7-163-base] name=Centos7-163-base baseurl=http://yum.internal.gridsumdissector.com:8080/Centos7-163-base gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos7-163-GPG-KEY [Centos7-163-updates] name=Centos7-163-updates baseurl=http://yum.internal.gridsumdissector.com:8080/Centos7-163-updates gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos7-163-GPG-KEY [Centos7-163-extras] name=Centos7-163-extras baseurl=http://yum.internal.gridsumdissector.com:8080/Centos7-163-extras gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos7-163-GPG-KEY
- 替换后刷新 Yum 源 `yum repolist`- 再次尝试下载```shellYou need to be root to perform this command.[panel@panel5-3 yum.repos.d]$ sudo yum install httpdCentos7-163-base | 3.6 kB 00:00:00Centos7-163-extras | 2.9 kB 00:00:00Centos7-163-updates | 2.9 kB 00:00:00Centos7-Tsinghua-base | 3.6 kB 00:00:00Centos7-Tsinghua-extras | 2.9 kB 00:00:00Centos7-Tsinghua-updates | 2.9 kB 00:00:00epel-7 | 3.6 kB 00:00:00(1/10): Centos7-163-base/group_gz | 153 kB 00:00:00(2/10): Centos7-163-extras/primary_db | 189 kB 00:00:00(3/10): Centos7-Tsinghua-base/group_gz | 153 kB 00:00:00(4/10): Centos7-Tsinghua-extras/primary_db | 189 kB 00:00:00(5/10): epel-7/group_gz | 95 kB 00:00:00(6/10): Centos7-Tsinghua-updates/primary_db | 3.0 MB 00:00:00(7/10): Centos7-163-updates/primary_db | 3.0 MB 00:00:00(8/10): Centos7-Tsinghua-base/primary_db | 6.1 MB 00:00:00(9/10): Centos7-163-base/primary_db | 6.1 MB 00:00:00(10/10): epel-7/primary_db | 18 MB 00:00:00Resolving Dependencies--> Running transaction check---> Package httpd.x86_64 0:2.4.6-93.el7.centos will be installed--> Processing Dependency: httpd-tools = 2.4.6-93.el7.centos for package: httpd-2.4.6-93.el7.centos.x86_64--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-93.el7.centos.x86_64--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-93.el7.centos.x86_64--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-93.el7.centos.x86_64--> Running transaction check---> Package apr.x86_64 0:1.4.8-5.el7 will be installed---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed---> Package httpd-tools.x86_64 0:2.4.6-93.el7.centos will be installed---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed--> Finished Dependency ResolutionDependencies Resolved===========================================================================================================================================================================Package Arch Version Repository Size===========================================================================================================================================================================Installing:httpd x86_64 2.4.6-93.el7.centos Centos7-163-base 2.7 MInstalling for dependencies:apr x86_64 1.4.8-5.el7 Centos7-163-base 103 kapr-util x86_64 1.5.2-6.el7 Centos7-163-base 92 khttpd-tools x86_64 2.4.6-93.el7.centos Centos7-163-base 92 kmailcap noarch 2.1.41-2.el7 Centos7-163-base 31 kTransaction Summary===========================================================================================================================================================================Install 1 Package (+4 Dependent packages)Total download size: 3.0 MInstalled size: 10 MIs this ok [y/d/N]: yDownloading packages:(1/5): apr-1.4.8-5.el7.x86_64.rpm | 103 kB 00:00:00(2/5): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:00:00(3/5): httpd-tools-2.4.6-93.el7.centos.x86_64.rpm | 92 kB 00:00:00(4/5): httpd-2.4.6-93.el7.centos.x86_64.rpm | 2.7 MB 00:00:00(5/5): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00:00---------------------------------------------------------------------------------------------------------------------------------------------------------------------------Total 4.6 MB/s | 3.0 MB 00:00:00Running transaction checkRunning transaction testTransaction test succeededRunning transactionInstalling : apr-1.4.8-5.el7.x86_64 1/5Installing : apr-util-1.5.2-6.el7.x86_64 2/5Installing : httpd-tools-2.4.6-93.el7.centos.x86_64 3/5Installing : mailcap-2.1.41-2.el7.noarch 4/5Installing : httpd-2.4.6-93.el7.centos.x86_64 5/5Verifying : apr-1.4.8-5.el7.x86_64 1/5Verifying : httpd-tools-2.4.6-93.el7.centos.x86_64 2/5Verifying : mailcap-2.1.41-2.el7.noarch 3/5Verifying : httpd-2.4.6-93.el7.centos.x86_64 4/5Verifying : apr-util-1.5.2-6.el7.x86_64
(SUCCESS) ping www.baidu.com
From gateway (x.x.x.x) icmp_seq=1 Destination Host Unreachable
- 公司内网不允许配置外网 (抛弃该问题 还需要找解决办法、优先级低)
(SUCCESS) Git 下载与升级
### 安装依赖yum -y install zlib-devel curl-devel openssl-devel perl cpio expat-devel gettext-devel openssl zlib autoconf tk perl-ExtUtils-MakeMaker### 通过 yum 安装 git (版本较低需要升级)yum install git -y### 两种方式安装#### 方式1: (wget下载、需要有访问外网的权限)### wget https://github.com/git/git/releases/tag/v2.23.2.tar.gzwget https://github.com/git/git/archive/refs/tags/v2.23.2.tar.gz---------------------------#### 方式2: (本地上传gz包)sudo rz------------------------------------------------### 进入目录cd ./git-2.23.2### 编译 configmake configure./configure### 编译安装make prefix=/usr/local/git allmake prefix=/usr/local/git install### 进入cd /usr/bin 创建软连接ln -s /usr/local/git/bin/git git----------------------------------------------------------###将 git 加入环境变量#### HOMEGIT_HOME=/usr/local/git/#### exportPATH=$GIT_HOME/bin---------------------------------------### 刷新profilesource /etc/profile### 检测版本git --version
- 参考链接
(SUCCESS) CentOS Connecting to failed: No route to host
# 执行wget命令wget http://127.0.0.1:8600# 报错Connecting to 127.0.0.1:8600... failed: No route to host解决办法:在本地防火墙配置需允许此端口访问,设置如下:# 编辑iptables配置文件vim /etc/sysconfig/iptables# 增加以下配置,开放本地8600端口,然后保存ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8600# 重启防火墙service iptables restart
(SUCCESS)构建 Maven
maven settings.xml<?xml version="1.0" encoding="UTF-8"?><!-- for full reference, see also http://maven.apache.org/ref/3.2.3/maven-settings/settings.html --><settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"><!--localRepository: 配置本地仓库的路径,服务器上下载下来的JAR包也会缓存在此路径下。为了避免C盘过度膨胀,我们可以将其放到其他磁盘空间较为充裕的路径下<localRepository>X:\Miscellaneous\MavenRepository</localRepository>--><!-- <localRepository>f:\maven_repository</localRepository> --><!-- 配置Maven服务器的账号信息,自动化部署的时候需要用到 --><servers><server><id>gridsum</id><!-- 使用公共的developer/developer账号进行日常的发布管理 --><username>developer</username><password>developer</password></server></servers><!-- 使用Mirror配置节可以强制所有包请求都会被转向内网Nexus服务器的地址 --><mirrors><mirror><id>gridsum</id><mirrorOf>*</mirrorOf><url>http://repository.gridsum.com/repository/maven-public/</url></mirror></mirrors><!-- 这个默认配置文件决定了我们的Maven服务器开启snapshot配置 --><profiles><profile><activation><activeByDefault>true</activeByDefault></activation><repositories><repository><id>gridsum</id><name>Gridsum Nexus Public Repository</name><url>http://repository.gridsum.com/repository/maven-public</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots></repository></repositories></profile></profiles></settings>
(SUCCESS) fatal: not a git repository (or any of the parent directories): .git
[panel@panel5-3 data2]$ sudo git initInitialized empty Git repository in /data2/.git/[panel@panel5-3 data2]$ ls -a. .. ambari .git
配置 SSH
### 配置用户信息sudo git config --global user.name "liuxiangqian"sudo git config --global user.email "liuxiangqian@gridsum.com"### 查看配置信息git config --global --list### 使用如下命令可以取消全局设置:git config --global --unset user.namegit config --global --unset user.email### 生成 ssh keyssh-keygen -t rsa -C "liuxiangqian@gridsum.com"### id_rsa.pub为公钥,id_rsa为私钥,它们都是隐藏文件。sudo cd .ssh/### id_rsa.pub 为公钥 Copy 出来ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDg9CBfLJtsuTlz6cK9V0RheElH6kZ9bV+oSb6WleAry3PjrJXwRFGe2z50ROjUsYo4Vj+k2YR+hUolOeaqU9sFLI3Ciq4WSdssoozPV4ODXt93/eXU1fkVfRkPyEpHorIj8mVS42IIBVpjHKpSj23kRmAUJ32xMYA4FTEytI+s7+phQ2FFlF8kafkfMqaX9uT+r7JNcVj/XqauefQHKot5oaf1CTxHAZ4qMGsyTggkCJTeOL1xwBUJsqH73FHoM6UQU1IWOMO9yvnPvTto+5XOC6dqMGb6IXIVg4w2ncj8N+J/HsGxaw3orPjl8OwssQxd0/T6o83TpOxrgkrINtXV liuxiangqian@gridsum.com
编译
git clone https://gitlab.gridsum.com/zeta/dev/panel/ambari.gitUsername for 'https://gitlab.gridsum.com': liuxiangqianPassword for 'https://liuxiangqian@gitlab.gridsum.com':mvn -clear ...yum install -y rpm-build.x86_64
编译 Amari Main
Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.0.1
- rpm (default-cli) on project ambari: RPM build execution returned: ‘127’ executing ‘/bin/sh
- target noarch-redhat-linux ambari.spec’
排错
- 可能是 rpm 或者 rpm-build 的问题
- 需要通过 yum 安装
yum install rpmyum install -y rpm-build.x86_64
Cannot create resource output directory: /data2/ambari/utility/target/classes
- org.apache.maven.lifecycle.
LifecycleExecutionException: - Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project utility: Cannot create resource output directory: /data2/ambari/utility/target/classes
[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 0.764 s[INFO] Finished at: 2021-04-06T17:43:40+08:00[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project utility: Cannot create resource output directory: /data2/ambari/utility/target/classes -> [Help 1]org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project utility: Cannot create resource output directory: /data2/ambari/utility/target/classesat 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: Cannot create resource output directory: /data2/ambari/utility/target/classesat org.apache.maven.plugin.resources.ResourcesMojo.execute (ResourcesMojo.java:307)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.maven.shared.filtering.MavenFilteringException: Cannot create resource output directory: /data2/ambari/utility/target/classesat org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources (DefaultMavenResourcesFiltering.java:215)at org.apache.maven.plugin.resources.ResourcesMojo.execute (ResourcesMojo.java:301)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][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
排错
- 移除
Target文件mvn clean
编译 Ambari Web
Failed to execute goal com.github.eirslett:frontend-maven-plugin:
- yarn (yarn install) on project ambari-web: Failed to run task: ‘
yarn install --ignore-engines --pure-lockfile‘ failed. - org.apache.commons.exec.
**ExecuteException**: Process exited with an error: 1 (Exit value: 1) - org.apache.maven.plugin.
**MojoFailureException**: Failed to run task - com.github.eirslett.maven.plugins.frontend.lib.
TaskRunnerException: ‘yarn install —ignore-engines —pure-lockfile’ failed.
warning fsevents@0.3.8: The platform "linux" is incompatible with this module.error /data2/liuxiangqian/ambari/ambari-web/node_modules/phantomjs: Command failed.
[ERROR] warning Ambari@2.4.0: No license field[INFO] [1/4] Resolving packages...[INFO] [2/4] Fetching packages...[ERROR] warning fsevents@0.3.8: The platform "linux" is incompatible with this module.[INFO] info "fsevents@0.3.8" is an optional dependency and failed compatibility check. Excluding it from installation.[ERROR] warning fsevents@1.1.1: The platform "linux" is incompatible with this module.[INFO] info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.[INFO] [3/4] Linking dependencies...[INFO] [4/4] Building fresh packages...[INFO] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.[ERROR] error /data2/liuxiangqian/ambari/ambari-web/node_modules/phantomjs: Command failed.[ERROR] Exit code: 1[ERROR] Command: sh[ERROR] Arguments: -c node install.js[ERROR] Directory: /data2/liuxiangqian/ambari/ambari-web/node_modules/phantomjs[ERROR] Output:[ERROR] PhantomJS not found on PATH[ERROR] Download already available at /tmp/npm_config_tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2[ERROR] Verified checksum of previously downloaded file[ERROR] Extracting tar contents (via spawned process)[ERROR] Error extracting archive[ERROR] Phantom installation failed { [Error: Command failed: tar jxf /tmp/npm_config_tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2[ERROR] tar: phantomjs-2.1.1-linux-x86_64/examples/unrandomize.js: Cannot change ownership to uid 0, gid 0: No such file or directory[ERROR] tar: Exiting with failure status due to previous errors[ERROR] ][ERROR] killed: false,[ERROR] code: 2,[ERROR] signal: null,[ERROR] cmd: 'tar jxf /tmp/npm_config_tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2' } Error: Command failed: tar jxf /tmp/npm_config_tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2[ERROR] tar: phantomjs-2.1.1-linux-x86_64/examples/unrandomize.js: Cannot change ownership to uid 0, gid 0: No such file or directory[ERROR] tar: Exiting with failure status due to previous errors[ERROR][ERROR] at ChildProcess.exithandler (child_process.js:213:12)[ERROR] at emitTwo (events.js:87:13)[ERROR] at ChildProcess.emit (events.js:172:7)[ERROR] at maybeClose (internal/child_process.js:829:16)[ERROR] at Socket.<anonymous> (internal/child_process.js:319:11)[ERROR] at emitOne (events.js:77:13)[ERROR] at Socket.emit (events.js:169:7)[ERROR] at Pipe._onclose (net.js:486:12)[INFO] ------------------------------------------------------------------------[INFO] Reactor Summary:[INFO][INFO] Ambari Main 1.8.2.0.0 .............................. SUCCESS [ 2.274 s][INFO] Apache Ambari Project POM .......................... SUCCESS [ 0.271 s][INFO] Ambari Web ......................................... FAILURE [ 12.027 s][INFO] Ambari Views ....................................... SKIPPED[INFO] Ambari Admin View .................................. SKIPPED[INFO] utility 1.0.0.0 .................................... SKIPPED[INFO] ambari-metrics ..................................... SKIPPED[INFO] Ambari Metrics Common .............................. SKIPPED[INFO] Ambari Metrics Hadoop Sink ......................... SKIPPED[INFO] Ambari Metrics Flume Sink .......................... SKIPPED[INFO] Ambari Metrics Kafka Sink .......................... SKIPPED[INFO] Ambari Metrics Storm Sink .......................... SKIPPED[INFO] Ambari Metrics Storm Sink (Legacy) ................. SKIPPED[INFO] Ambari Metrics Collector ........................... SKIPPED[INFO] Ambari Metrics Monitor ............................. SKIPPED[INFO] Ambari Metrics Grafana 2.1.0.0.0 ................... SKIPPED[INFO] Ambari Metrics Assembly ............................ SKIPPED[INFO] Ambari Server ...................................... SKIPPED[INFO] Ambari Functional Tests ............................ SKIPPED[INFO] Ambari Agent ....................................... SKIPPED[INFO] Ambari Client ...................................... SKIPPED[INFO] Ambari Python Client ............................... SKIPPED[INFO] Ambari Groovy Client ............................... SKIPPED[INFO] Ambari Shell ....................................... SKIPPED[INFO] Ambari Python Shell ................................ SKIPPED[INFO] Ambari Groovy Shell ................................ SKIPPED[INFO] ambari-logsearch ................................... SKIPPED[INFO] Ambari Logsearch Appender .......................... SKIPPED[INFO] Ambari Logsearch Portal ............................ SKIPPED[INFO] Ambari Logsearch Log Feeder ........................ SKIPPED[INFO] Ambari Logsearch Solr Client ....................... SKIPPED[INFO] Ambari Infra Solr Plugin ........................... SKIPPED[INFO] Ambari Logsearch Assembly .......................... SKIPPED[INFO] Ambari Logsearch Integration Test 1.8.2.0.0 ........ SKIPPED[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 15.217 s[INFO] Finished at: 2021-04-07T16:17:21+08:00[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.4:yarn (yarn install) on project ambari-web: Failed to run task: 'yarn install --ignore-engines --pure-lockfile' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.4:yarn (yarn install) on project ambari-web: Failed to run taskat org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)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:956)at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)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:497)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.MojoFailureException: Failed to run taskat com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute (AbstractFrontendMojo.java:121)at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)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:956)at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)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:497)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: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'yarn install --ignore-engines --pure-lockfile' failed.at com.github.eirslett.maven.plugins.frontend.lib.YarnTaskExecutor.execute (YarnTaskExecutor.java:64)at com.github.eirslett.maven.plugins.frontend.mojo.YarnMojo.execute (YarnMojo.java:65)at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute (AbstractFrontendMojo.java:115)at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)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:956)at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)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:497)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: com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutionException: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.execute (ProcessExecutor.java:82)at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.executeAndRedirectOutput (ProcessExecutor.java:64)at com.github.eirslett.maven.plugins.frontend.lib.YarnExecutor.executeAndRedirectOutput (YarnExecutor.java:28)at com.github.eirslett.maven.plugins.frontend.lib.YarnTaskExecutor.execute (YarnTaskExecutor.java:58)at com.github.eirslett.maven.plugins.frontend.mojo.YarnMojo.execute (YarnMojo.java:65)at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute (AbstractFrontendMojo.java:115)at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)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:956)at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)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:497)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.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.execute (ProcessExecutor.java:74)at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.executeAndRedirectOutput (ProcessExecutor.java:64)at com.github.eirslett.maven.plugins.frontend.lib.YarnExecutor.executeAndRedirectOutput (YarnExecutor.java:28)at com.github.eirslett.maven.plugins.frontend.lib.YarnTaskExecutor.execute (YarnTaskExecutor.java:58)at com.github.eirslett.maven.plugins.frontend.mojo.YarnMojo.execute (YarnMojo.java:65)at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute (AbstractFrontendMojo.java:115)at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)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:956)at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)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:497)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)[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/MojoFailureException[ERROR][ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn <goals> -rf :ambari-web
排错
Nodejs会通过yarn去加载依赖包,网络不稳定的时候会出现该问题,比较常见
- 保持网络畅通
删除
maven刚下载失败的目录find ~/.m2/repository/ -name "*.lastUpdated" -exec rm -rf {} \;
再次编译
Could not download Node.js:
- Could not download https://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-x64.tar.gz:
- Network is unreachable (connect failed) -> [Help 1]
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.4:install-node-and-yarn (install node and yarn) on project ambari-web: Could not download Node.js: Could not download https://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-x64.tar.gz: Network is unreachable (connect failed) -> [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 <args> -rf :ambari-web
排错
- 环境问题
- 需要 Node 环境先安装 Node.js ```shell 下载路径: https://nodejs.org/download/release/latest-v10.x/
注意下载后缀: (xz / gz) node-v10.24.1-linux-armv7l.tar.gz node-v10.24.1-linux-armv7l.tar.xz (√)
加入系统环境 export NODE_HOME=/usr/local/nodejs/nodejs export PATH=$PATH:$NODE_HOME/bin
source /etc/profile
2. 网络问题- 我的环境是无法访问外网的坏境 (From gateway (xx.xx.xx.x) icmp_seq=1 Destination Host Unreachable)- 无法下载 [`https://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-x64.tar.gz`](https://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-x64.tar.gz)- 手动下载然后根据 `POM` 放在 `MAVEN` 仓库中 (注意路径)- 这边路径是根据 `10.202.81.66` 编译库路径来 `Copy` 的```java## 路径.m2/repository/com/github/eirslett/node
- 还不可以直接将编译库的
eirslett打包.tar替换自身环境
- 补充
POM相关Plugin<plugin><groupId>com.github.eirslett</groupId><artifactId>frontend-maven-plugin</artifactId><version>1.4</version><configuration><nodeVersion>v4.5.0</nodeVersion><yarnVersion>v0.23.2</yarnVersion><workingDirectory>${basedir}</workingDirectory><npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven><!-- setting npm_config_tmp environment variable is a workaround forhttps://github.com/Medium/phantomjs/issues/673 --><environmentVariables><npm_config_tmp>/tmp/npm_config_tmp</npm_config_tmp></environmentVariables></configuration><executions><execution><id>install node and yarn</id><phase>generate-sources</phase><goals><goal>install-node-and-yarn</goal></goals></execution><execution><id>yarn install</id><phase>generate-sources</phase><goals><goal>yarn</goal></goals><configuration><arguments>install --ignore-engines --pure-lockfile</arguments></configuration></execution></executions></plugin>
编译 Ambari Admin View
org.apache.maven.lifecycle.LifecycleExecutionException:
- Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (Bower install) on project ambari-admin: Command execution failed
/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/bower-config/lib/util/rc.js
[DEBUG] env: XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt[DEBUG] Toolchains are ignored, 'executable' parameter is set to /data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node/node[DEBUG] Executing command line: [/data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node/node, /data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/bin/bower, install, --allow-root]/data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/bower-config/lib/util/rc.js:55throw error;^Error: Unable to parse /data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/.bowerrc: Unexpected stringat parse (/data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/bower-config/lib/util/rc.js:48:21)at json (/data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/bower-config/lib/util/rc.js:70:12)at rc (/data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/bower-config/lib/util/rc.js:31:9)at Config.load (/data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/bower-config/lib/Config.js:14:20)at Function.Config.read (/data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/bower-config/lib/Config.js:49:19)at Object.<anonymous> (/data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/lib/config.js:3:38)at Module._compile (module.js:409:26)at Object.Module._extensions..js (module.js:416:10)at Module.load (module.js:343:32)at Function.Module._load (module.js:300:12)[ERROR] Command execution failed.org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:982)at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:929)at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457)at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)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:956)at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)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:497)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)[INFO] ------------------------------------------------------------------------[INFO] Reactor Summary:[INFO][INFO] Ambari Main 1.8.2.0.0 .............................. SUCCESS [ 1.782 s][INFO] Apache Ambari Project POM .......................... SUCCESS [ 0.244 s][INFO] Ambari Web ......................................... SUCCESS [01:13 min][INFO] Ambari Views ....................................... SUCCESS [ 2.172 s][INFO] Ambari Admin View .................................. FAILURE [ 59.559 s][INFO] utility 1.0.0.0 .................................... SKIPPED[INFO] ambari-metrics ..................................... SKIPPED[INFO] Ambari Metrics Common .............................. SKIPPED[INFO] Ambari Metrics Hadoop Sink ......................... SKIPPED[INFO] Ambari Metrics Flume Sink .......................... SKIPPED[INFO] Ambari Metrics Kafka Sink .......................... SKIPPED[INFO] Ambari Metrics Storm Sink .......................... SKIPPED[INFO] Ambari Metrics Storm Sink (Legacy) ................. SKIPPED[INFO] Ambari Metrics Collector ........................... SKIPPED[INFO] Ambari Metrics Monitor ............................. SKIPPED[INFO] Ambari Metrics Grafana 2.1.0.0.0 ................... SKIPPED[INFO] Ambari Metrics Assembly ............................ SKIPPED[INFO] Ambari Server ...................................... SKIPPED[INFO] Ambari Functional Tests ............................ SKIPPED[INFO] Ambari Agent ....................................... SKIPPED[INFO] Ambari Client ...................................... SKIPPED[INFO] Ambari Python Client ............................... SKIPPED[INFO] Ambari Groovy Client ............................... SKIPPED[INFO] Ambari Shell ....................................... SKIPPED[INFO] Ambari Python Shell ................................ SKIPPED[INFO] Ambari Groovy Shell ................................ SKIPPED[INFO] ambari-logsearch ................................... SKIPPED[INFO] Ambari Logsearch Appender .......................... SKIPPED[INFO] Ambari Logsearch Portal ............................ SKIPPED[INFO] Ambari Logsearch Log Feeder ........................ SKIPPED[INFO] Ambari Logsearch Solr Client ....................... SKIPPED[INFO] Ambari Infra Solr Plugin ........................... SKIPPED[INFO] Ambari Logsearch Assembly .......................... SKIPPED[INFO] Ambari Logsearch Integration Test 1.8.2.0.0 ........ SKIPPED[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 02:17 min[INFO] Finished at: 2021-04-07T15:45:46+08:00[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0: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:3.0.0:exec (Bower install) on project ambari-admin: Command execution failed.at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)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:956)at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)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:497)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:478)at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)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:956)at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)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:497)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.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:982)at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:929)at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457)at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)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:956)at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)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:497)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)[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-adminYou have mail in /var/spool/mail/root
排错
nodeVersion,npmVersion配置项与实际不符
查看自身
nodeVersion跟npmVersion[root@gs-server-5130 ambari]# npm -v6.14.6[root@gs-server-5130 ambari]# node -vv10.22.1
修改
ambari/ambari-admin/pom.xml<nodeVersion>v10.22.1</nodeVersion><npmVersion>6.14.6</npmVersion>
删除
maven刚下载失败的目录find ~/.m2/repository/ -name "*.lastUpdated" -exec rm -rf {} \;
再次编译
- 其他原因
