(SUCCESS) 使用 yum install httpd 出现 Could not retrieve mirrorlist

  1. Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
  2. 14: curl#7 - "Failed to connect to 2604:1380:2001:d00::3: Network is unreachable"
  3. One of the configured repositories failed (Unknown),
  4. and yum doesn't have enough cached data to continue. At this point the only
  5. safe thing yum can do is fail. There are a few ways to work "fix" this:
  6. 1. Contact the upstream for the repository and get them to fix the problem.
  7. 2. Reconfigure the baseurl/etc. for the repository, to point to a working
  8. upstream. This is most often useful if you are using a newer
  9. distribution release than is supported by the repository (and the
  10. packages for the previous distribution release still work).
  11. 3. Run the command with the repository temporarily disabled
  12. yum --disablerepo=<repoid> ...
  13. 4. Disable the repository permanently, so yum won't use it by default. Yum
  14. will then just ignore the repository until you permanently enable it
  15. again or use --enablerepo for temporary usage:
  16. yum-config-manager --disable <repoid>
  17. or
  18. subscription-manager repos --disable=<repoid>
  19. 5. Configure the failing repository to be skipped, if it is unavailable.
  20. Note that yum will try to contact the repo. when it runs most commands,
  21. so will have to try and fail each time (and thus. yum will be be much
  22. slower). If it is a very temporary problem though, this is often a nice
  23. compromise:
  24. yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
  25. Cannot find a valid baseurl for repo: base/7/x86_64
  1. - 替换后刷新 Yum `yum repolist`
  2. ![image.png](https://cdn.nlark.com/yuque/0/2021/png/667110/1617676389025-da862387-8082-4e1e-bdb2-68591d741e89.png#align=left&display=inline&height=342&margin=%5Bobject%20Object%5D&name=image.png&originHeight=684&originWidth=1199&size=96414&status=done&style=none&width=599.5)
  3. - 再次尝试下载
  4. ```shell
  5. You need to be root to perform this command.
  6. [panel@panel5-3 yum.repos.d]$ sudo yum install httpd
  7. Centos7-163-base | 3.6 kB 00:00:00
  8. Centos7-163-extras | 2.9 kB 00:00:00
  9. Centos7-163-updates | 2.9 kB 00:00:00
  10. Centos7-Tsinghua-base | 3.6 kB 00:00:00
  11. Centos7-Tsinghua-extras | 2.9 kB 00:00:00
  12. Centos7-Tsinghua-updates | 2.9 kB 00:00:00
  13. epel-7 | 3.6 kB 00:00:00
  14. (1/10): Centos7-163-base/group_gz | 153 kB 00:00:00
  15. (2/10): Centos7-163-extras/primary_db | 189 kB 00:00:00
  16. (3/10): Centos7-Tsinghua-base/group_gz | 153 kB 00:00:00
  17. (4/10): Centos7-Tsinghua-extras/primary_db | 189 kB 00:00:00
  18. (5/10): epel-7/group_gz | 95 kB 00:00:00
  19. (6/10): Centos7-Tsinghua-updates/primary_db | 3.0 MB 00:00:00
  20. (7/10): Centos7-163-updates/primary_db | 3.0 MB 00:00:00
  21. (8/10): Centos7-Tsinghua-base/primary_db | 6.1 MB 00:00:00
  22. (9/10): Centos7-163-base/primary_db | 6.1 MB 00:00:00
  23. (10/10): epel-7/primary_db | 18 MB 00:00:00
  24. Resolving Dependencies
  25. --> Running transaction check
  26. ---> Package httpd.x86_64 0:2.4.6-93.el7.centos will be installed
  27. --> Processing Dependency: httpd-tools = 2.4.6-93.el7.centos for package: httpd-2.4.6-93.el7.centos.x86_64
  28. --> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-93.el7.centos.x86_64
  29. --> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-93.el7.centos.x86_64
  30. --> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-93.el7.centos.x86_64
  31. --> Running transaction check
  32. ---> Package apr.x86_64 0:1.4.8-5.el7 will be installed
  33. ---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
  34. ---> Package httpd-tools.x86_64 0:2.4.6-93.el7.centos will be installed
  35. ---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
  36. --> Finished Dependency Resolution
  37. Dependencies Resolved
  38. ===========================================================================================================================================================================
  39. Package Arch Version Repository Size
  40. ===========================================================================================================================================================================
  41. Installing:
  42. httpd x86_64 2.4.6-93.el7.centos Centos7-163-base 2.7 M
  43. Installing for dependencies:
  44. apr x86_64 1.4.8-5.el7 Centos7-163-base 103 k
  45. apr-util x86_64 1.5.2-6.el7 Centos7-163-base 92 k
  46. httpd-tools x86_64 2.4.6-93.el7.centos Centos7-163-base 92 k
  47. mailcap noarch 2.1.41-2.el7 Centos7-163-base 31 k
  48. Transaction Summary
  49. ===========================================================================================================================================================================
  50. Install 1 Package (+4 Dependent packages)
  51. Total download size: 3.0 M
  52. Installed size: 10 M
  53. Is this ok [y/d/N]: y
  54. Downloading packages:
  55. (1/5): apr-1.4.8-5.el7.x86_64.rpm | 103 kB 00:00:00
  56. (2/5): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:00:00
  57. (3/5): httpd-tools-2.4.6-93.el7.centos.x86_64.rpm | 92 kB 00:00:00
  58. (4/5): httpd-2.4.6-93.el7.centos.x86_64.rpm | 2.7 MB 00:00:00
  59. (5/5): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00:00
  60. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  61. Total 4.6 MB/s | 3.0 MB 00:00:00
  62. Running transaction check
  63. Running transaction test
  64. Transaction test succeeded
  65. Running transaction
  66. Installing : apr-1.4.8-5.el7.x86_64 1/5
  67. Installing : apr-util-1.5.2-6.el7.x86_64 2/5
  68. Installing : httpd-tools-2.4.6-93.el7.centos.x86_64 3/5
  69. Installing : mailcap-2.1.41-2.el7.noarch 4/5
  70. Installing : httpd-2.4.6-93.el7.centos.x86_64 5/5
  71. Verifying : apr-1.4.8-5.el7.x86_64 1/5
  72. Verifying : httpd-tools-2.4.6-93.el7.centos.x86_64 2/5
  73. Verifying : mailcap-2.1.41-2.el7.noarch 3/5
  74. Verifying : httpd-2.4.6-93.el7.centos.x86_64 4/5
  75. Verifying : apr-util-1.5.2-6.el7.x86_64

(SUCCESS) ping www.baidu.com

  1. From gateway (x.x.x.x) icmp_seq=1 Destination Host Unreachable
  • 公司内网不允许配置外网 (抛弃该问题 还需要找解决办法、优先级低)

(SUCCESS) Git 下载与升级

  1. ### 安装依赖
  2. yum -y install zlib-devel curl-devel openssl-devel perl cpio expat-devel gettext-devel openssl zlib autoconf tk perl-ExtUtils-MakeMaker
  3. ### 通过 yum 安装 git (版本较低需要升级)
  4. yum install git -y
  5. ### 两种方式安装
  6. #### 方式1: (wget下载、需要有访问外网的权限)
  7. ### wget https://github.com/git/git/releases/tag/v2.23.2.tar.gz
  8. wget https://github.com/git/git/archive/refs/tags/v2.23.2.tar.gz
  9. ---------------------------
  10. #### 方式2: (本地上传gz包)
  11. sudo rz
  12. ------------------------------------------------
  13. ### 进入目录
  14. cd ./git-2.23.2
  15. ### 编译 config
  16. make configure
  17. ./configure
  18. ### 编译安装
  19. make prefix=/usr/local/git all
  20. make prefix=/usr/local/git install
  21. ### 进入cd /usr/bin 创建软连接
  22. ln -s /usr/local/git/bin/git git
  23. ----------------------------------------------------------
  24. ###将 git 加入环境变量
  25. #### HOME
  26. GIT_HOME=/usr/local/git/
  27. #### export
  28. PATH=$GIT_HOME/bin
  29. ---------------------------------------
  30. ### 刷新profile
  31. source /etc/profile
  32. ### 检测版本
  33. git --version

(SUCCESS) CentOS Connecting to failed: No route to host

  1. # 执行wget命令
  2. wget http://127.0.0.1:8600
  3. # 报错
  4. Connecting to 127.0.0.1:8600... failed: No route to host
  5. 解决办法:在本地防火墙配置需允许此端口访问,设置如下:
  6. # 编辑iptables配置文件
  7. vim /etc/sysconfig/iptables
  8. # 增加以下配置,开放本地8600端口,然后保存
  9. ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8600
  10. # 重启防火墙
  11. service iptables restart

(SUCCESS)构建 Maven

  • maven settings.xml

    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <!-- for full reference, see also http://maven.apache.org/ref/3.2.3/maven-settings/settings.html -->
    3. <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    5. xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    6. <!--
    7. localRepository: 配置本地仓库的路径,服务器上下载下来的JAR包也会缓存在此路径下。
    8. 为了避免C盘过度膨胀,我们可以将其放到其他磁盘空间较为充裕的路径下
    9. <localRepository>X:\Miscellaneous\MavenRepository</localRepository>
    10. -->
    11. <!-- <localRepository>f:\maven_repository</localRepository> -->
    12. <!-- 配置Maven服务器的账号信息,自动化部署的时候需要用到 -->
    13. <servers>
    14. <server>
    15. <id>gridsum</id>
    16. <!-- 使用公共的developer/developer账号进行日常的发布管理 -->
    17. <username>developer</username>
    18. <password>developer</password>
    19. </server>
    20. </servers>
    21. <!-- 使用Mirror配置节可以强制所有包请求都会被转向内网Nexus服务器的地址 -->
    22. <mirrors>
    23. <mirror>
    24. <id>gridsum</id>
    25. <mirrorOf>*</mirrorOf>
    26. <url>http://repository.gridsum.com/repository/maven-public/</url>
    27. </mirror>
    28. </mirrors>
    29. <!-- 这个默认配置文件决定了我们的Maven服务器开启snapshot配置 -->
    30. <profiles>
    31. <profile>
    32. <activation>
    33. <activeByDefault>true</activeByDefault>
    34. </activation>
    35. <repositories>
    36. <repository>
    37. <id>gridsum</id>
    38. <name>Gridsum Nexus Public Repository</name>
    39. <url>http://repository.gridsum.com/repository/maven-public</url>
    40. <releases>
    41. <enabled>true</enabled>
    42. </releases>
    43. <snapshots>
    44. <enabled>true</enabled>
    45. <updatePolicy>always</updatePolicy>
    46. </snapshots>
    47. </repository>
    48. </repositories>
    49. </profile>
    50. </profiles>
    51. </settings>
  • Linux安装maven(详细教程)


(SUCCESS) fatal: not a git repository (or any of the parent directories): .git

  1. [panel@panel5-3 data2]$ sudo git init
  2. Initialized empty Git repository in /data2/.git/
  3. [panel@panel5-3 data2]$ ls -a
  4. . .. ambari .git

配置 SSH

  1. ### 配置用户信息
  2. sudo git config --global user.name "liuxiangqian"
  3. sudo git config --global user.email "liuxiangqian@gridsum.com"
  4. ### 查看配置信息
  5. git config --global --list
  6. ### 使用如下命令可以取消全局设置:
  7. git config --global --unset user.name
  8. git config --global --unset user.email
  9. ### 生成 ssh key
  10. ssh-keygen -t rsa -C "liuxiangqian@gridsum.com"
  11. ### id_rsa.pub为公钥,id_rsa为私钥,它们都是隐藏文件。
  12. sudo cd .ssh/
  13. ### id_rsa.pub 为公钥 Copy 出来
  14. ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDg9CBfLJtsuTlz6cK9V0RheElH6kZ9bV+oSb6WleAry3PjrJXwRFGe2z50ROjUsYo4Vj+k2YR+hUolOeaqU9sFLI3Ciq4WSdssoozPV4ODXt93/eXU1fkVfRkPyEpHorIj8mVS42IIBVpjHKpSj23kRmAUJ32xMYA4FTEytI+s7+phQ2FFlF8kafkfMqaX9uT+r7JNcVj/XqauefQHKot5oaf1CTxHAZ4qMGsyTggkCJTeOL1xwBUJsqH73FHoM6UQU1IWOMO9yvnPvTto+5XOC6dqMGb6IXIVg4w2ncj8N+J/HsGxaw3orPjl8OwssQxd0/T6o83TpOxrgkrINtXV liuxiangqian@gridsum.com

编译

  1. git clone https://gitlab.gridsum.com/zeta/dev/panel/ambari.git
  2. Username for 'https://gitlab.gridsum.com': liuxiangqian
  3. Password for 'https://liuxiangqian@gitlab.gridsum.com':
  4. mvn -clear ...
  5. 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’

    排错

  1. 可能是 rpm 或者 rpm-build 的问题
  • 需要通过 yum 安装
    1. yum install rpm
    2. yum 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
    1. [INFO] BUILD FAILURE
    2. [INFO] ------------------------------------------------------------------------
    3. [INFO] Total time: 0.764 s
    4. [INFO] Finished at: 2021-04-06T17:43:40+08:00
    5. [INFO] ------------------------------------------------------------------------
    6. [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]
    7. 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
    8. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    9. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    10. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    11. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    12. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    13. at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    14. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    15. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    16. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    17. at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    18. at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    19. at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    20. at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    21. at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    22. at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    23. at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    24. at java.lang.reflect.Method.invoke (Method.java:498)
    25. at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    26. at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    27. at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    28. at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    29. Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot create resource output directory: /data2/ambari/utility/target/classes
    30. at org.apache.maven.plugin.resources.ResourcesMojo.execute (ResourcesMojo.java:307)
    31. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    32. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    33. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    34. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    35. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    36. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    37. at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    38. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    39. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    40. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    41. at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    42. at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    43. at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    44. at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    45. at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    46. at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    47. at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    48. at java.lang.reflect.Method.invoke (Method.java:498)
    49. at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    50. at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    51. at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    52. at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    53. Caused by: org.apache.maven.shared.filtering.MavenFilteringException: Cannot create resource output directory: /data2/ambari/utility/target/classes
    54. at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources (DefaultMavenResourcesFiltering.java:215)
    55. at org.apache.maven.plugin.resources.ResourcesMojo.execute (ResourcesMojo.java:301)
    56. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    57. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    58. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    59. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    60. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    61. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    62. at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    63. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    64. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    65. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    66. at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    67. at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    68. at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    69. at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    70. at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    71. at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    72. at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    73. at java.lang.reflect.Method.invoke (Method.java:498)
    74. at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    75. at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    76. at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    77. at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    78. [ERROR]
    79. [ERROR]
    80. [ERROR] For more information about the errors and possible solutions, please read the following articles:
    81. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

    排错

  1. 移除 Target 文件
    1. 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.
  1. [ERROR] warning Ambari@2.4.0: No license field
  2. [INFO] [1/4] Resolving packages...
  3. [INFO] [2/4] Fetching packages...
  4. [ERROR] warning fsevents@0.3.8: The platform "linux" is incompatible with this module.
  5. [INFO] info "fsevents@0.3.8" is an optional dependency and failed compatibility check. Excluding it from installation.
  6. [ERROR] warning fsevents@1.1.1: The platform "linux" is incompatible with this module.
  7. [INFO] info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
  8. [INFO] [3/4] Linking dependencies...
  9. [INFO] [4/4] Building fresh packages...
  10. [INFO] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
  11. [ERROR] error /data2/liuxiangqian/ambari/ambari-web/node_modules/phantomjs: Command failed.
  12. [ERROR] Exit code: 1
  13. [ERROR] Command: sh
  14. [ERROR] Arguments: -c node install.js
  15. [ERROR] Directory: /data2/liuxiangqian/ambari/ambari-web/node_modules/phantomjs
  16. [ERROR] Output:
  17. [ERROR] PhantomJS not found on PATH
  18. [ERROR] Download already available at /tmp/npm_config_tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
  19. [ERROR] Verified checksum of previously downloaded file
  20. [ERROR] Extracting tar contents (via spawned process)
  21. [ERROR] Error extracting archive
  22. [ERROR] Phantom installation failed { [Error: Command failed: tar jxf /tmp/npm_config_tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
  23. [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
  24. [ERROR] tar: Exiting with failure status due to previous errors
  25. [ERROR] ]
  26. [ERROR] killed: false,
  27. [ERROR] code: 2,
  28. [ERROR] signal: null,
  29. [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
  30. [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
  31. [ERROR] tar: Exiting with failure status due to previous errors
  32. [ERROR]
  33. [ERROR] at ChildProcess.exithandler (child_process.js:213:12)
  34. [ERROR] at emitTwo (events.js:87:13)
  35. [ERROR] at ChildProcess.emit (events.js:172:7)
  36. [ERROR] at maybeClose (internal/child_process.js:829:16)
  37. [ERROR] at Socket.<anonymous> (internal/child_process.js:319:11)
  38. [ERROR] at emitOne (events.js:77:13)
  39. [ERROR] at Socket.emit (events.js:169:7)
  40. [ERROR] at Pipe._onclose (net.js:486:12)
  41. [INFO] ------------------------------------------------------------------------
  42. [INFO] Reactor Summary:
  43. [INFO]
  44. [INFO] Ambari Main 1.8.2.0.0 .............................. SUCCESS [ 2.274 s]
  45. [INFO] Apache Ambari Project POM .......................... SUCCESS [ 0.271 s]
  46. [INFO] Ambari Web ......................................... FAILURE [ 12.027 s]
  47. [INFO] Ambari Views ....................................... SKIPPED
  48. [INFO] Ambari Admin View .................................. SKIPPED
  49. [INFO] utility 1.0.0.0 .................................... SKIPPED
  50. [INFO] ambari-metrics ..................................... SKIPPED
  51. [INFO] Ambari Metrics Common .............................. SKIPPED
  52. [INFO] Ambari Metrics Hadoop Sink ......................... SKIPPED
  53. [INFO] Ambari Metrics Flume Sink .......................... SKIPPED
  54. [INFO] Ambari Metrics Kafka Sink .......................... SKIPPED
  55. [INFO] Ambari Metrics Storm Sink .......................... SKIPPED
  56. [INFO] Ambari Metrics Storm Sink (Legacy) ................. SKIPPED
  57. [INFO] Ambari Metrics Collector ........................... SKIPPED
  58. [INFO] Ambari Metrics Monitor ............................. SKIPPED
  59. [INFO] Ambari Metrics Grafana 2.1.0.0.0 ................... SKIPPED
  60. [INFO] Ambari Metrics Assembly ............................ SKIPPED
  61. [INFO] Ambari Server ...................................... SKIPPED
  62. [INFO] Ambari Functional Tests ............................ SKIPPED
  63. [INFO] Ambari Agent ....................................... SKIPPED
  64. [INFO] Ambari Client ...................................... SKIPPED
  65. [INFO] Ambari Python Client ............................... SKIPPED
  66. [INFO] Ambari Groovy Client ............................... SKIPPED
  67. [INFO] Ambari Shell ....................................... SKIPPED
  68. [INFO] Ambari Python Shell ................................ SKIPPED
  69. [INFO] Ambari Groovy Shell ................................ SKIPPED
  70. [INFO] ambari-logsearch ................................... SKIPPED
  71. [INFO] Ambari Logsearch Appender .......................... SKIPPED
  72. [INFO] Ambari Logsearch Portal ............................ SKIPPED
  73. [INFO] Ambari Logsearch Log Feeder ........................ SKIPPED
  74. [INFO] Ambari Logsearch Solr Client ....................... SKIPPED
  75. [INFO] Ambari Infra Solr Plugin ........................... SKIPPED
  76. [INFO] Ambari Logsearch Assembly .......................... SKIPPED
  77. [INFO] Ambari Logsearch Integration Test 1.8.2.0.0 ........ SKIPPED
  78. [INFO] ------------------------------------------------------------------------
  79. [INFO] BUILD FAILURE
  80. [INFO] ------------------------------------------------------------------------
  81. [INFO] Total time: 15.217 s
  82. [INFO] Finished at: 2021-04-07T16:17:21+08:00
  83. [INFO] ------------------------------------------------------------------------
  84. [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]
  85. 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 task
  86. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
  87. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
  88. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
  89. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
  90. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
  91. at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
  92. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
  93. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
  94. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
  95. at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
  96. at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
  97. at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
  98. at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
  99. at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
  100. at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
  101. at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
  102. at java.lang.reflect.Method.invoke (Method.java:497)
  103. at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
  104. at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
  105. at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
  106. at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
  107. Caused by: org.apache.maven.plugin.MojoFailureException: Failed to run task
  108. at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute (AbstractFrontendMojo.java:121)
  109. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
  110. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
  111. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
  112. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
  113. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
  114. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
  115. at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
  116. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
  117. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
  118. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
  119. at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
  120. at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
  121. at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
  122. at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
  123. at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
  124. at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
  125. at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
  126. at java.lang.reflect.Method.invoke (Method.java:497)
  127. at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
  128. at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
  129. at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
  130. at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
  131. Caused by: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'yarn install --ignore-engines --pure-lockfile' failed.
  132. at com.github.eirslett.maven.plugins.frontend.lib.YarnTaskExecutor.execute (YarnTaskExecutor.java:64)
  133. at com.github.eirslett.maven.plugins.frontend.mojo.YarnMojo.execute (YarnMojo.java:65)
  134. at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute (AbstractFrontendMojo.java:115)
  135. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
  136. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
  137. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
  138. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
  139. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
  140. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
  141. at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
  142. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
  143. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
  144. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
  145. at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
  146. at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
  147. at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
  148. at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
  149. at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
  150. at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
  151. at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
  152. at java.lang.reflect.Method.invoke (Method.java:497)
  153. at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
  154. at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
  155. at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
  156. at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
  157. Caused by: com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutionException: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
  158. at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.execute (ProcessExecutor.java:82)
  159. at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.executeAndRedirectOutput (ProcessExecutor.java:64)
  160. at com.github.eirslett.maven.plugins.frontend.lib.YarnExecutor.executeAndRedirectOutput (YarnExecutor.java:28)
  161. at com.github.eirslett.maven.plugins.frontend.lib.YarnTaskExecutor.execute (YarnTaskExecutor.java:58)
  162. at com.github.eirslett.maven.plugins.frontend.mojo.YarnMojo.execute (YarnMojo.java:65)
  163. at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute (AbstractFrontendMojo.java:115)
  164. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
  165. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
  166. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
  167. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
  168. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
  169. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
  170. at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
  171. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
  172. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
  173. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
  174. at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
  175. at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
  176. at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
  177. at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
  178. at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
  179. at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
  180. at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
  181. at java.lang.reflect.Method.invoke (Method.java:497)
  182. at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
  183. at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
  184. at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
  185. at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
  186. Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
  187. at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
  188. at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
  189. at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.execute (ProcessExecutor.java:74)
  190. at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.executeAndRedirectOutput (ProcessExecutor.java:64)
  191. at com.github.eirslett.maven.plugins.frontend.lib.YarnExecutor.executeAndRedirectOutput (YarnExecutor.java:28)
  192. at com.github.eirslett.maven.plugins.frontend.lib.YarnTaskExecutor.execute (YarnTaskExecutor.java:58)
  193. at com.github.eirslett.maven.plugins.frontend.mojo.YarnMojo.execute (YarnMojo.java:65)
  194. at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute (AbstractFrontendMojo.java:115)
  195. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
  196. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
  197. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
  198. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
  199. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
  200. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
  201. at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
  202. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
  203. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
  204. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
  205. at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
  206. at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
  207. at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
  208. at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
  209. at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
  210. at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
  211. at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
  212. at java.lang.reflect.Method.invoke (Method.java:497)
  213. at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
  214. at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
  215. at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
  216. at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
  217. [ERROR]
  218. [ERROR]
  219. [ERROR] For more information about the errors and possible solutions, please read the following articles:
  220. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  221. [ERROR]
  222. [ERROR] After correcting the problems, you can resume the build with the command
  223. [ERROR] mvn <goals> -rf :ambari-web

排错

  1. Nodejs 会通过 yarn 去加载依赖包,网络不稳定的时候会出现该问题,比较常见
  • 保持网络畅通
  • 删除 maven 刚下载失败的目录

    1. 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]
    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]
    2. [ERROR]
    3. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    4. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    5. [ERROR]
    6. [ERROR] For more information about the errors and possible solutions, please read the following articles:
    7. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
    8. [ERROR]
    9. [ERROR] After correcting the problems, you can resume the build with the command
    10. [ERROR] mvn <args> -rf :ambari-web

    排错

  1. 环境问题

注意下载后缀: (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

  1. 2. 网络问题
  2. - 我的环境是无法访问外网的坏境 From gateway (xx.xx.xx.x) icmp_seq=1 Destination Host Unreachable
  3. - 无法下载 [`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)
  4. - 手动下载然后根据 `POM` 放在 `MAVEN` 仓库中 (注意路径)
  5. - 这边路径是根据 `10.202.81.66` 编译库路径来 `Copy`
  6. ```java
  7. ## 路径
  8. .m2/repository/com/github/eirslett/node
  1. 还不可以直接将编译库的 eirslett 打包 .tar 替换自身环境
  • 补充 POM 相关 Plugin
    1. <plugin>
    2. <groupId>com.github.eirslett</groupId>
    3. <artifactId>frontend-maven-plugin</artifactId>
    4. <version>1.4</version>
    5. <configuration>
    6. <nodeVersion>v4.5.0</nodeVersion>
    7. <yarnVersion>v0.23.2</yarnVersion>
    8. <workingDirectory>${basedir}</workingDirectory>
    9. <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
    10. <!-- setting npm_config_tmp environment variable is a workaround for
    11. https://github.com/Medium/phantomjs/issues/673 -->
    12. <environmentVariables>
    13. <npm_config_tmp>/tmp/npm_config_tmp</npm_config_tmp>
    14. </environmentVariables>
    15. </configuration>
    16. <executions>
    17. <execution>
    18. <id>install node and yarn</id>
    19. <phase>generate-sources</phase>
    20. <goals>
    21. <goal>install-node-and-yarn</goal>
    22. </goals>
    23. </execution>
    24. <execution>
    25. <id>yarn install</id>
    26. <phase>generate-sources</phase>
    27. <goals>
    28. <goal>yarn</goal>
    29. </goals>
    30. <configuration>
    31. <arguments>install --ignore-engines --pure-lockfile</arguments>
    32. </configuration>
    33. </execution>
    34. </executions>
    35. </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

  1. [DEBUG] env: XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt
  2. [DEBUG] Toolchains are ignored, 'executable' parameter is set to /data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node/node
  3. [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]
  4. /data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/bower-config/lib/util/rc.js:55
  5. throw error;
  6. ^
  7. Error: Unable to parse /data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/.bowerrc: Unexpected string
  8. at 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)
  9. 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)
  10. 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)
  11. 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)
  12. 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)
  13. at Object.<anonymous> (/data2/liuxiangqian/ambari/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/lib/config.js:3:38)
  14. at Module._compile (module.js:409:26)
  15. at Object.Module._extensions..js (module.js:416:10)
  16. at Module.load (module.js:343:32)
  17. at Function.Module._load (module.js:300:12)
  18. [ERROR] Command execution failed.
  19. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
  20. at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
  21. at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
  22. at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:982)
  23. at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:929)
  24. at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457)
  25. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
  26. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
  27. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
  28. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
  29. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
  30. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
  31. at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
  32. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
  33. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
  34. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
  35. at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
  36. at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
  37. at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
  38. at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
  39. at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
  40. at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
  41. at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
  42. at java.lang.reflect.Method.invoke (Method.java:497)
  43. at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
  44. at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
  45. at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
  46. at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
  47. [INFO] ------------------------------------------------------------------------
  48. [INFO] Reactor Summary:
  49. [INFO]
  50. [INFO] Ambari Main 1.8.2.0.0 .............................. SUCCESS [ 1.782 s]
  51. [INFO] Apache Ambari Project POM .......................... SUCCESS [ 0.244 s]
  52. [INFO] Ambari Web ......................................... SUCCESS [01:13 min]
  53. [INFO] Ambari Views ....................................... SUCCESS [ 2.172 s]
  54. [INFO] Ambari Admin View .................................. FAILURE [ 59.559 s]
  55. [INFO] utility 1.0.0.0 .................................... SKIPPED
  56. [INFO] ambari-metrics ..................................... SKIPPED
  57. [INFO] Ambari Metrics Common .............................. SKIPPED
  58. [INFO] Ambari Metrics Hadoop Sink ......................... SKIPPED
  59. [INFO] Ambari Metrics Flume Sink .......................... SKIPPED
  60. [INFO] Ambari Metrics Kafka Sink .......................... SKIPPED
  61. [INFO] Ambari Metrics Storm Sink .......................... SKIPPED
  62. [INFO] Ambari Metrics Storm Sink (Legacy) ................. SKIPPED
  63. [INFO] Ambari Metrics Collector ........................... SKIPPED
  64. [INFO] Ambari Metrics Monitor ............................. SKIPPED
  65. [INFO] Ambari Metrics Grafana 2.1.0.0.0 ................... SKIPPED
  66. [INFO] Ambari Metrics Assembly ............................ SKIPPED
  67. [INFO] Ambari Server ...................................... SKIPPED
  68. [INFO] Ambari Functional Tests ............................ SKIPPED
  69. [INFO] Ambari Agent ....................................... SKIPPED
  70. [INFO] Ambari Client ...................................... SKIPPED
  71. [INFO] Ambari Python Client ............................... SKIPPED
  72. [INFO] Ambari Groovy Client ............................... SKIPPED
  73. [INFO] Ambari Shell ....................................... SKIPPED
  74. [INFO] Ambari Python Shell ................................ SKIPPED
  75. [INFO] Ambari Groovy Shell ................................ SKIPPED
  76. [INFO] ambari-logsearch ................................... SKIPPED
  77. [INFO] Ambari Logsearch Appender .......................... SKIPPED
  78. [INFO] Ambari Logsearch Portal ............................ SKIPPED
  79. [INFO] Ambari Logsearch Log Feeder ........................ SKIPPED
  80. [INFO] Ambari Logsearch Solr Client ....................... SKIPPED
  81. [INFO] Ambari Infra Solr Plugin ........................... SKIPPED
  82. [INFO] Ambari Logsearch Assembly .......................... SKIPPED
  83. [INFO] Ambari Logsearch Integration Test 1.8.2.0.0 ........ SKIPPED
  84. [INFO] ------------------------------------------------------------------------
  85. [INFO] BUILD FAILURE
  86. [INFO] ------------------------------------------------------------------------
  87. [INFO] Total time: 02:17 min
  88. [INFO] Finished at: 2021-04-07T15:45:46+08:00
  89. [INFO] ------------------------------------------------------------------------
  90. [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]
  91. 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.
  92. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
  93. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
  94. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
  95. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
  96. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
  97. at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
  98. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
  99. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
  100. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
  101. at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
  102. at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
  103. at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
  104. at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
  105. at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
  106. at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
  107. at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
  108. at java.lang.reflect.Method.invoke (Method.java:497)
  109. at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
  110. at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
  111. at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
  112. at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
  113. Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
  114. at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:478)
  115. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
  116. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
  117. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
  118. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
  119. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
  120. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
  121. at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
  122. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
  123. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
  124. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
  125. at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
  126. at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
  127. at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
  128. at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
  129. at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
  130. at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
  131. at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
  132. at java.lang.reflect.Method.invoke (Method.java:497)
  133. at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
  134. at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
  135. at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
  136. at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
  137. Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
  138. at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
  139. at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
  140. at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:982)
  141. at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:929)
  142. at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457)
  143. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
  144. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
  145. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
  146. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
  147. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
  148. at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
  149. at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
  150. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
  151. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
  152. at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
  153. at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
  154. at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
  155. at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
  156. at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
  157. at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
  158. at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
  159. at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
  160. at java.lang.reflect.Method.invoke (Method.java:497)
  161. at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
  162. at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
  163. at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
  164. at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
  165. [ERROR]
  166. [ERROR]
  167. [ERROR] For more information about the errors and possible solutions, please read the following articles:
  168. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  169. [ERROR]
  170. [ERROR] After correcting the problems, you can resume the build with the command
  171. [ERROR] mvn <goals> -rf :ambari-admin
  172. You have mail in /var/spool/mail/root

排错

  1. nodeVersion,npmVersion 配置项与实际不符
  • 查看自身 nodeVersionnpmVersion

    1. [root@gs-server-5130 ambari]# npm -v
    2. 6.14.6
    3. [root@gs-server-5130 ambari]# node -v
    4. v10.22.1
  • 修改 ambari/ambari-admin/pom.xml

    1. <nodeVersion>v10.22.1</nodeVersion>
    2. <npmVersion>6.14.6</npmVersion>
  • 删除 maven 刚下载失败的目录

    1. find ~/.m2/repository/ -name "*.lastUpdated" -exec rm -rf {} \;
  • 再次编译


  1. 其他原因