ambari全攻略流程,错问杂集ambari(零)

ambari安装错集

ambari编译错集

  • 编译admin-admin问题

出现问题最多的还是在编译的时候没有可用的数据源,其中根本问题在于无法访问有条件的可以开启vpn代理情况解决,没条件的只能手搓安装(手搓不单指手动执行下载同样也指下载源码到本地使用npm编译等等)
错例:

ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/angular/bower-angular-animate.git", exit code of #128 fatal: unable to access 'https://github.com/angular/bower-angular-animate.git/': Failed connect to github.com:443; Connection refused

Additional error details:
fatal: unable to access 'https://github.com/angular/bower-angular-animate.git/': Failed connect to github.com:443; Connection refused

解决:

1.尝试使用npm安装
npm install angular-animate
或
bower install angular-animate
2.更改git的使用地址(墙的问题无需多言)

为了此方法博主本不浓密的头上又掉了几根兄弟

#代码含义为将https://github.com地址更换为https://hub.fastgit.xyz/,
#其中https://hub.fastgit.xyz/为国内github镜像网站,有过期风险,
#大家可根据百度搜索“github国内镜像,我这里使用的是“于飞SEO”博主提供的2022年4月6日更新 可用
#表示感谢
git config --global url."https://hub.fastgit.xyz/".insteadOf https://github.com
  • 整体编译问题

问题:
[ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.12:check (default) on project ambari-admin: Too many files with unapproved license: 1 See RAT report in: /opt/ambari-2.7.6/ambari-admin/target/rat.txt -> [Help 1]
解决:

我们可以查看错误指向的文件在文件中看到原因

# 删除文件继续编译
# rm -rf /opt/ambari-2.7.6/ambari-admin/src/main/resources/ui/admin-web/package-lock.json
*****************************************************

 Printing headers for text files without a valid license header...
 
=====================================================
== File: /opt/ambari-2.7.6/ambari-admin/src/main/resources/ui/admin-web/package-lock.json
=====================================================
问题:

这里根本问题为SNAPSHOT的源已经被正式版代替所以需要更改源
这里作者替换了一下全部:
3.0.1-b06-SNAPSHOT
3.0.1-b07-SNAPSHOT
3.0.1-b08-SNAPSHOT
3.0.1-b11-SNAPSHOT

[ERROR] Failed to execute goal on project ambari-metrics-timelineservice: 
Could not resolve dependencies for project org.apache.ambari:ambari-metrics-timelineservice:jar:2.7.6.0.0: 
Failed to collect dependencies at org.apache.phoenix:phoenix-core:jar:5.0.0-HBase-2.0 -> org.apache.hbase:hbase-mapreduce:jar:2.0.0 -> 
org.apache.hbase:hbase-server:jar:2.0.0 -> 
org.glassfish.web:javax.servlet.jsp:jar:2.3.2 -> 
org.glassfish:javax.el:jar:3.0.1-b08-SNAPSHOT: 
Failed to read artifact descriptor for 
org.glassfish:javax.el:jar:3.0.1-b08-SNAPSHOT: 
Could not transfer artifact org.glassfish:
javax.el:pom:3.0.1-b08-SNAPSHOT from/to maven-default-http-blocker (https://repo1.maven.org/maven2): 
Blocked mirror for repositories: 
[apache.snapshots (http://repository.apache.org/snapshots, default, snapshots)] -> [Help 1]
解决

我们通过查看maven源的文件发现没有b08-SNAPSHOT的文件所以直接就该修改pom.xml在这里插入图片描述

  1. 查看.m2的maven文件是否存在
    这里的SNAPSHOT为镜像文件我们直接操作复制非SNAPSHOT文件
    SNAPSHOT08

  2. 删除SNAPSHOT文件

rm -rf 3.0.1-b08-SNAPSHOT
  1. 复制非镜像文件并更名
#复制文件
cp -r 3.0.1-b08 3.0.1-b08-SNAPSHOT
# 进入3.0.1-b08-SNAPSHOT文件内,删除文件内的文件
rm -rf javax.el-3.0.1-b08.pom.sha1
# 修改复制后的3.0.1-b08-SNAPSHOT里的文件
mv javax.el-3.0.1-b08.pom javax.el-3.0.1-b08-SNAPSHOT.pom
#修改文件内容
vi _remote.repositories
将
javax.el-3.0.1-b08.pom>apache-hadoop=
改为
javax.el-3.0.1-b08-SNAPSHOT.pom>apache-hadoop=
问题

看到下载文件失败原因为下载地址已经更换所以我们修改ambari-metrics文件夹下的pom.xml

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (phoenix_download) on project ambari-metrics-timelineservice: 
An Ant BuildException has occured: 
Can't get https://downloads.apache.org/phoenix/apache-phoenix-5.0.0-HBase-2.0/bin/apache-phoenix-5.0.0-HBase-2.0-bin.tar.gz to 
/opt/ambari-2.7.6/ambari-metrics/ambari-metrics-timelineservice/target/embedded/phoenix.tar.gz
[ERROR] around Ant part ...<get usetimestamp="true" src="https://downloads.apache.org/phoenix/apache-phoenix-5.0.0-HBase-2.0/bin/apache-phoenix-5.0.0-HBase-2.0-bin.tar.gz" dest="/opt/ambari-2.7.6/ambari-metrics/ambari-metrics-timelineservice/target/embedded/phoenix.tar.gz"/>... 
@ 5:251 in /opt/ambari-2.7.6/ambari-metrics/ambari-metrics-timelineservice/target/antrun/build-Download Phoenix.xml
解决

修改/opt/ambari-2.7.6/ambari-metrics/pom.xml

# 将这个连接更改
<phoenix.tar>https://downloads.apache.org/phoenix/apache-phoenix-5.0.0-HBase-2.0/bin/apache-phoenix-5.0.0-HBase-2.0-bin.tar.gz</phoenix.tar>
# 新连接
<phoenix.tar>http://archive.apache.org/dist/phoenix/apache-phoenix-5.0.0-HBase-2.0/bin/apache-phoenix-5.0.0-HBase-2.0-bin.tar.gz</phoenix.tar>
解决扩展

提前下载如下安装包同时安装httpd服务使用我们自定义的离线源下载速度更快

# 将下载的放到/var/www/html/目录下
hadoop-3.1.1.tar.gz
hbase-2.0.2.tar.gz
grafana-6.7.4.linux-amd64.tar.gz
apache-phoenix-5.0.0-HBase-2.0-bin.tar.gz

修改ambari-metrics/pom.xml文件中全部的tar.gz的下载路径

 <hbase.tar>http://localhost/hbase-2.0.2-bin.tar.gz</hbase.tar>
 <hadoop.tar>http://localhost/hadoop-3.1.1.tar.gz</hadoop.tar>
 <grafana.tar>http://localhost/grafana-6.7.4.linux-amd64.tar.gz</grafana.tar>
 <phoenix.tar>http://localhost/apache-phoenix-5.0.0-HBase-2.0-bin.tar.gz</phoenix.tar>
问题
[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] Removing /root/ambari/ambari-admin/src/main/resources/ui/admin-web/node_modules/phantomjs/lib/phantom
[ERROR] Copying extracted folder /tmp/npm_config_tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1639887716005/phantomjs-2.1.1-linux-x86_64 -> /root/ambari/ambari-admin/src/main/resources/ui/admin-web/node_modules/phantomjs/lib/phantom
[ERROR] Install exited unexpectedly
解决

我处理的比较简单手动下载

# 文件地址
https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
# 拷贝位置
# 下载完成以后直接放到这个目录,重新编译就可以
/tmp/logsearch_npm_config_tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2

ambari开发错集

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值