声明:博主写了一些Ambari系列文章,可以在历史文章中查看。

1. ambari-web npm install失败

解决办法:

手动将压缩包下载并按照报错指示拷贝到/tmp/phantomjs/目录下,重新npm install。(能翻墙就翻墙)

2. tar (child): bzip2:无法 exec: 没有那个文件或目录

解决办法:

1
yum install -y bzip2

3. bower install 失败

1
2
[INFO] Ambari Admin View .................................. FAILURE
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (Bower install) on project ambari-admin: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

原因:

bower_components失败,点击下载,拷贝并解压到/opt/ambari-admin/src/main/resources/ui/admin-web/app目录下。

4. psutils-compile错误

编译 Ambari Metrics Monitor失败:

1
2
ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (psutils-compile) on project ambari-metrics-host-monitoring: An Ant BuildException has occured: exec returned: 1
[ERROR] around Ant part ...<exec dir="/opt/ambari-release-2.4.0/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/psutil" executable="/opt/ambari-release-2.4.0/ambari-metrics/ambari-metrics-host-monitoring/../../ambari-common/src/main/unix/ambari-python-wrap" failonerror="true">... @ 4:267 in /opt/ambari-release-2.4.0/ambari-metrics/ambari-metrics-host-monitoring/target/antrun/build-psutils-compile.xml

解决办法:

1
yum -y install python-devel

5. ambari-metrics-grafana compile 失败

1
Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project ambari-metrics-grafana: An Ant BuildException has occured: java.net.ConnectException: Connection timed out

解决办法:

修改ambari-metrics/pom.xml 文件

1
2
3
4
# 修改前:
<grafana.tar>https://grafanarel.s3.mazonaws.com/builds/grafana-2.6.0.linux-x64.tar.gz</grafana.tar>
# 修改后:
<grafana.tar>https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-2.6.0.linux-x64.tar.gz</grafana.tar>

6. ambari-logsearch

报错信息:

The parameters ‘group’ for goal org.codehaus.mojo:rpm-maven-plugin:2.1.5:rpm are missing or invalid

加入红框内的代码

vim /opt/ambari-trunk/ambari-logsearch/pom.xml

1
2
3
4
5
6
7
8
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>2.1.5</version>
<configuration>
<group>Development/Tools</group>
</configuration>
</plugin>

7. Ambari Python Shell报错

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec

看上面应该是提示 python 没有setuptools,接下来就是安装setuptools模块。

  1. wget http://p7rtzbtjz.bkt.clouddn.com/setuptools-0.6c11-py2.6.egg
  2. sh setuptools-0.6c11-py2.6.egg
  3. 测试:python –> import setuptools ,没有报错即为安装成功。

参考博客:https://blog.csdn.net/l1028386804/article/details/79069295

8. 安装mysql-connector-java

下载mysql-connector-java-5.1.45-bin.jar包,并把它复制到/usr/share/java目录下。

然后修改配置文件

vim /etc/ambari-server/conf/ambari.properties

添加:server.jdbc.driver.path=/usr/share/java/mysql-connector-java-5.1.45-bin.jar

9. amabri-server setup

1
2
vim /usr/sbin/ambari-server
将${buildNumber}这行换成 HASH="${VERSION}"

10. /usr/bin/python2.6: No such file or directory

解决办法:

1
ln -s /usr/bin/python2.7 /usr/bin/python2.6

11. 编译wfmanager报错:

解决办法:

1
2
3
4
5
6
7
8
9
10
cd ./wfmanager/src/main/resources/ui
[root@liuyzh1 ui]# vim .bowerrc
{
"registry": "https://registry.bower.io"
}
:wq!
## 赋予777权限
chmod 777 .bowerrc
## 编译
mvn -B -X -e install package rpm:rpm -DnewVersion=2.6.1.0.0 -DskipTests -Dpython.ver="python >= 2.6" -Drat.skip=true -Preplaceurl