-1

我是一个从 apache 学习 ambari Hadoop 的新人,我一直在尝试在 VirtualBox 环境中的 Ubuntu 上安装 ambari,但是,遇到这个问题让我筋疲力尽。

1、系统提示我“Ambari Server 'start'完成成功”如下

~# ambari-server start
Using python  /usr/bin/python2.7
Starting ambari-server
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start...................
Ambari Server 'start' completed successfully.

但是,我无法通过“ http://127.0.0.1:8080 ”访问ambari服务,当我检查服务器状态时如下

~# ambari-server status
Using python  /usr/bin/python2.7
Ambari-server status
Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid

当我检查 /var/run/ambari-server/ambari-server.pid 的文件时

~# cat /var/run/ambari-server/ambari-server.pid 
2875

当我检查日志文件时,它以以下几行开头

22 May 2015 10:59:42,876  INFO [main] Configuration:527 - Reading password from existing file
22 May 2015 10:59:43,073  INFO [main] Configuration:747 - Hosts Mapping File null
22 May 2015 10:59:43,074  INFO [main] HostsMap:60 - Using hostsmap file null
22 May 2015 10:59:45,169  INFO [main] ControllerModule:172 - Detected MYSQL as the database type from the JDBC URL
22 May 2015 10:59:45,253  INFO [main] ControllerModule:214 - Using c3p0 ComboPooledDataSource as the EclipsLink DataSource
22 May 2015 10:59:45,416  INFO [main] MLog:80 - MLog clients using log4j logging.
22 May 2015 10:59:46,124  INFO [main] C3P0Registry:204 - Initializing c3p0-0.9.1.1 [built 15-March-2007 01:32:31; debug? true; trace: 10]
22 May 2015 10:59:59,830 ERROR [main] DBAccessorImpl:99 - Error while creating database accessor 
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

我搜索了互联网,并没有找到解决此问题的方法。

顺便说一句,我还没有安装Hadoop,这是否是问题?

提前致谢。

4

4 回答 4

0

我希望这与https://issues.apache.org/jira/browse/AMBARI-9215有关

当我登录服务器然后启动 Ambari 时,它可以工作。但是当我开始使用织物时它不起作用。

于 2015-05-26T16:35:58.413 回答
0

作为一种解决方法,我正在尝试将脚本推送到目标主机并在后台执行命令。

/root/scripts/Start_Ambari.sh 的内容有以下内容。

!/bin/bash

ambari-server 启动 &

于 2015-05-26T19:52:43.453 回答
0

终于成功了

我没有在后台运行命令,而是使用nohup. 有效。下面给出了在远程机器上执行的脚本的内容。

#!/bin/bash
nohup ambari-server start
于 2015-05-27T14:55:08.483 回答
0

对于这种情况,问题可能是任何问题。让我指出其中的一些,无论哪个有效,请告诉我们。

  1. 以 root 身份运行您的 ambari-server

    $sudo ambari-server 启动

  2. 检查你的/etc/hosts文件

  3. 检查您的 8080 端口是否已打开以供访问。

于 2018-01-17T05:34:50.153 回答