2016-02-25 804 views
1

我非常感谢一些帮助,让cloudera manager在AWS EC2上运行。 它是我第一次安装,我打算使用AWS Free Tier来创建几个节点,并对Hadoop集群和cloudera分发进行一些培训。我在AWS EC2上使用RedHat RHEL 7.2映像。无法连接到Cloudera Manager,不在端口7180上监听

我下面这些指令...... Cloudera Manager installation

我已经安装了Cloudera管理器确定,得到的地方,它允许您使用浏览器登录到了Cloudera Manager服务器屏幕。但这就是问题出现的地方。看起来这款应用并没有在7180端口上收听,所以没有希望通过网络连接另一台电脑。我甚至无法在服务器本地连接,但该服务似乎运行正常。但它不听7180端口。

Q1 - 如何确认配置设置为使用端口7180.?

第二季度 - 是否有明显的步骤,我在这里失踪?

由于提前,

[编辑..] 我开始如果自由EC2主机上的内存所剩无几运行Cloudera的经理怀疑。我看到一条评论暗示...... AWS Forum post。但该进程不会崩溃或报告其日志文件中的任何问题。所以它一定是好的,对吧?

[编辑....更多的诊断信息,....]

下面是我检查诊断的列表: -

  • 的SELinux没有运行[用于安装和测试目的]
  • WAN防火墙,
  • EC2防火墙/安全组,
  • 在服务器本地防火墙,
  • Cloudera的管理r日志,
  • 服务是否正常运行?
  • 你可以在本地连接吗?

在EC2实例Securtity组,它包含: - 在RedHat的实例 SSH和端口7180,

防火墙/ iptables的/ firewalld,尝试: - 添加端口的iptables,然后 dissabling的iptables,然后 添加端口firewalld,然后 dissabling的firewalld服务,

$ sudo iptables -L 
Chain INPUT (policy ACCEPT) 
target  prot opt source    destination   
ACCEPT  all -- anywhere    anywhere    ctstate RELATED,ESTABLISHED 
ACCEPT  tcp -- anywhere    anywhere    tcp dpt:ssh 
ACCEPT  tcp -- anywhere    anywhere    state NEW tcp dpt:7180 
ACCEPT  tcp -- anywhere    anywhere    state NEW tcp dpt:7182 

但是我感觉到cloudera manager的安装是不开心,或者运行不正确

我检查了cloudera管理器日志,并以下列结尾。

$ tail /var/log/cloudera-scm-server/cloudera-scm-server.log 
2016-02-25 11:02:23,581 INFO main:com.cloudera.cmon.components.MetricSchemaUpdate: persisting 19264 new metrics 
2016-02-25 11:02:28,920 INFO main:com.cloudera.cmon.components.MetricSchemaUpdate: persisting 0 updated metrics 
2016-02-25 11:02:28,924 INFO main:com.cloudera.cmon.components.MetricSchemaManager: Cross entity aggregates processed. 

当我用tail -f命令,然后重新启动Cloudera的-SCM服务器服务,日志滚动了很多,回来相同的状态。如果我搜索ERROR,则不会有“ERR”行。

$ sudo service cloudera-scm-server start 
Starting cloudera-scm-server (via systemctl):    [ OK ] 

$ sudo systemctl status cloudera-scm-server 
● cloudera-scm-server.service - LSB: Cloudera SCM Server 
    Loaded: loaded (/etc/rc.d/init.d/cloudera-scm-server) 
    Active: active (exited) since Thu 2016-02-25 12:23:03 EST; 44s ago 
    Docs: man:systemd-sysv-generator(8) 
    Process: 747 ExecStart=/etc/rc.d/init.d/cloudera-scm-server start (code=exited, status=0/SUCCESS) 

所以,如果我尝试测试该服务,通过从本地机器我得到的那种品行的,这让我的东西它只是不听,也许不能正确启动连接。

尝试从相同的外壳采用了卷曲捅它作为Cloudera的-SCM服务器服务已启动

$ curl localhost:7180 
curl: (7) Failed connect to localhost:7180; Connection refused 

$ wget localhost:7180 
--2016-02-25 08:00:16-- http://localhost:7180/ 
Resolving localhost (localhost)... ::1, 127.0.0.1 
Connecting to localhost (localhost)|::1|:7180... failed: Connection refused. 
Connecting to localhost (localhost)|127.0.0.1|:7180... failed: Connection refused. 

尝试检查哪些端口是那台机器上听,没有7180,什么与回事? ?

$ netstat -nltp 
(No info could be read for "-p": geteuid()=1000 but you should be root.) 
Active Internet connections (only servers) 
Proto Recv-Q Send-Q Local Address   Foreign Address   State  PID/Program name  
tcp  0  0 0.0.0.0:7432   0.0.0.0:*    LISTEN  -     
tcp  0  0 0.0.0.0:22    0.0.0.0:*    LISTEN  -     
tcp  0  0 127.0.0.1:25   0.0.0.0:*    LISTEN  -     
tcp6  0  0 :::7432     :::*     LISTEN  -     
tcp6  0  0 :::22     :::*     LISTEN  -     
tcp6  0  0 ::1:25     :::*     LISTEN  - 
+0

宾果 - 发现内存不足的问题 - 日志中的消息 '$ sudo tail -100 /var/log/cloudera-scm-server/cloudera-scm-server.out JAVA_HOME =的/ usr /爪哇/ jdk1.7.0_67-的Cloudera 爪哇热点(TM)64位服务器VM警告:信息:OS :: commit_memory(0x000000078dc58000,265809920,0)失败;错误='无法分配内存'(errno = 12) # #没有足够的内存让Java运行时环境继续运行。 #本机的存储器分配(malloc的)未能分配265809920个字节用于犯保留存储器。 #/tmp/hs_err_pid831.log ' –

回答

0

我建议你尾巴的日志。如果您正在使用免费套餐,cloudera经理需要一段时间才能出现......在开始cloudera-scm-server之后,可能需要长达5分钟或更长时间。
日志应显示是否有任何错误,可能因内存分配问题,因为免费层服务器的可用内存有限。日志条目的小片段看起来很不错并且很典型 - 在7180上出现UI之前,它将经历一长串进程。

同样在这样的情况下,运行top甚至free -g来查看有多少资源被使用 - 尤其是记忆。

+0

感谢您的评论@OkezieE: #与更多信息的错误报告文件被保存。 CM似乎陷在了同一个地方。其从开始一直约3-4小时,该日志文件还没有从{代码}移动2016年2月25日12:19:47762 INFO主:com.cloudera.cmon.components.MetricSchemaManager:跨实体聚集处理。 {code} –

+0

我也发现数据库正在运行。我开始想,也许我忘了为Cloudera安装一个数据库来保存它的数据。 '#通过initialize_embedded_db.sh # #20160225-073401 # #自动生成这些是CM管理器 # com.cloudera.cmf.db.type = PostgreSQL的 com.cloudera.cmf数据库设置。 db.host = localhost:7432 com.cloudera.cmf.db.name = scm com.cloudera.cmf.db.user = scm ' –

+0

资源使用情况如何显示在该服务器上。坦率地说,我认为免费层ec2实例(t2.micro,t1.micro e.t.c)在CPU和内存方面的能力都太弱了。它有一个单核,内存大约为500MB,可用于非系统使用。根据Cloudera Manager的系统要求,我认为这不是足够的。才去任何进一步检查此页:http://www.cloudera.com/documentation/enterprise/5-4-x/topics/cm_ig_cm_requirements.html – OkezieE

2

这里是要寻找什么,以及可能的解决方案 - 给它更多的内存...

检查使用Cloudera的-SCM服务器服务的状态[取决于你的linux的味道]

$ sudo service cloudera-scm-server status 

OR

$ sudo systemctl status cloudera-scm-server 

查找状态 - Active: active (running) 如果你找到,但 - Active: active (exited) 在cloudera-scm-server的启动过程中可能会遇到问题。

在这种情况下,查看日志文件的Cloudera-SCM服务器

$sudo ls -l /var/log/cloudera-scm-server 

$sudo cat /var/log/cloudera-scm-server/cloudera-scm-server.out 
JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera 
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x000000078dc58000, 265809920, 0) failed; error='Cannot allocate memory' (errno=12) 
# 
# There is insufficient memory for the Java Runtime Environment to continue. 
# Native memory allocation (malloc) failed to allocate 265809920 bytes for committing reserved memory. 
# An error report file with more information is saved as: 
# /tmp/hs_err_pid831.log 
[[email protected] ~]$ sudo tail -100 /var/log/cloudera-scm-server/cloudera-scm-server.out 
JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera 
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x000000078dc58000, 265809920, 0) failed; error='Cannot allocate memory' (errno=12) 

命令top指示多少内存可用于您的系统。

可能的解决方法 - 看看this discussion at Cloudera forum

在这种情况下,Java堆大小太小了。

正如我们看到的堆被耗尽,假设这是不是内存泄漏 或类似的东西,Cloudera的经理可能需要更多的堆 操作。这可以配置为: /etc/default/cloudera-scm-server例如,您可以将“-Xmx2G”更改为“-Xmx3G”或“-Xmx4G”如果问题仍然存在 发生,也许堆转储将提供一些线索。

0

我有完全相同的问题,使用公共DNS或IP端口不能打CM登录7180

以下步骤将帮助您:

iptables stopped (service iptables stop) 
SELinux disabled (got to /etc/selinux/config and disbaled the selinux) 
curl/wget localhost:7180 works (check the curl status) 
ufw allow 7180 
service httpd status should be running. 
check va/log/cloudera-scm-server log : if any error found then troubleshoot the error  
cloudera-scm-server status (should be running state) 
netstat -nap | grep 7180 returns (if running other service then kill it) 

远程登录本地主机7180(应被连接)