我是一个用ambari从apache学习Hadoop的新手,我一直在尝试在我的Ubuntu VirtualBox环境中安装ambari,然而,我遇到这个问题已经筋疲力尽了。
首先,系统提示"Ambari Server 'start' completed successfully",如下所示
~# 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,这是不是问题?
终于成功了
我没有在后台运行命令,而是使用了nohup
。它工作。在远程机器上执行的脚本内容如下:
#!/bin/bash
nohup ambari-server start
我希望这是有关https://issues.apache.org/jira/browse/AMBARI-9215
当我登录到服务器然后启动Ambari,它工作。但是当我开始使用织物时,它不工作。
作为解决方案,我正在尝试将脚本推送到目标主机并在后台执行命令。
/root/scripts/start_ambari .sh目录的内容如下:
<标题> !/bin/bash h1> 标题>这个问题可能是任何情况。让我指出其中的一些作品,请告诉我们。
-
以root身份运行ambari-server
-
检查
/etc/hosts
文件 -
检查您的8080端口是否已打开。