【发布时间】:2019-05-17 18:32:48
【问题描述】:
非常感谢一些帮助,让 cloudera 管理器在 AWS EC2 上运行。 这是我的第一次安装,我的目标是使用 AWS 免费套餐来启动一些节点,并对 Hadoop 集群和 cloudera 分发进行一些培训。我在 AWS EC2 上使用 RedHat RHEL 7.2 映像。
我正在按照这里的说明进行操作...Cloudera Manager installation
我已经安装了 cloudera manager 确定,然后进入它邀请您使用浏览器登录 cloudera manager 服务器的屏幕。但这就是问题的开始。该应用程序似乎没有在端口 7180 上侦听,因此没有希望通过网络从另一台计算机连接。我什至无法在服务器上本地连接,但服务似乎运行正常。但它没有监听 7180 端口。
Q1 - 我如何确认配置设置为使用端口 7180?
Q2 - 我在这里遗漏了哪些明显的步骤?
提前致谢,
[编辑..] 我开始怀疑免费 EC2 主机是否内存不足,无法运行 cloudera 管理器。我看到一条评论暗示....AWS Forum post。但该进程不会崩溃或在其日志文件中报告任何问题。所以应该没问题吧?
[编辑....带有更多诊断信息....]
这是我检查过的诊断列表:-
- SELinux 未运行 [用于安装和测试目的],
- WAN 防火墙,
- EC2 防火墙/安全组,
- 服务器上的本地防火墙,
- Cloudera 管理器日志,
- 服务是否启动并运行?
- 你能在本地连接吗?
EC2 实例上的安全组,它包含:- SSH 和端口 7180,
RedHat 实例上的Firewall/iptables/firewalld,尝试过:- 将端口添加到 iptables,然后 禁用 iptables,然后 将端口添加到firewalld,然后 禁用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 manager日志,结果如下。
$ 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-server 服务时,日志滚动很多,并返回相同的状态。如果我搜索 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-server 服务启动时使用 curl 来戳它
$ 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 -
【问题讨论】:
-
Bingo - 发现内存不足的问题 - 日志中的消息
$ 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) # # 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
标签: hadoop amazon-web-services amazon-ec2 cloudera cloudera-cdh