无法连接到Cloudera Manager,而不是侦听端口7180

时间:2016-02-25 18:27:18

标签: hadoop amazon-web-services amazon-ec2 cloudera cloudera-cdh

我非常感谢帮助cloudera经理在AWS EC2上运行。 它是我的第一次安装,我的目标是使用AWS Free Tier来启动一些节点并对Hadoop集群和cloudera发行版进行一些培训。我在AWS EC2上使用RedHat RHEL 7.2映像。

我按照这里的说明进行操作...... Cloudera Manager installation

我已经安装了cloudera manager,然后进入屏幕,邀请您使用浏览器登录cloudera Manager服务器。但这就是问题开始的地方。似乎应用程序没有侦听端口7180,因此没有希望通过网络连接另一台机器。我甚至无法在本地连接,在服务器上,但服务似乎运行正常。但它没有收听7180端口。

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

Q2 - 我在这里缺少明显的步骤吗?

提前致谢,

[编辑.. 我开始怀疑Free EC2主机是否运行不足以运行cloudera管理器。我看到一条暗示...... AWS Forum post的评论。但是该进程不会崩溃或报告其日志文件中的任何问题。所以一定没事,对吧?

[编辑....以获取更多诊断信息....]

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

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

EC2实例上的Securtity组,它包含: - 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经理的安装不开心,或者运行不正确

我已经检查过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服务相同的shell中的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      -  

5 个答案:

答案 0 :(得分:2)

这是寻找什么,以及可能的解决方案 - 给它更多的记忆......

使用[取决于你的linux风格]检查cloudera-scm-server服务的状态

$ sudo service cloudera-scm-server status

OR

$ sudo systemctl status cloudera-scm-server

查找状态 - Active: active (running) 但如果你发现 - Active: active (exited) 你可能在启动cloudera-scm-server时遇到问题。

在这种情况下,请查看cloudera-scm-server的日志文件

$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
[ec2-user@ip-172-31-31-166 ~]$ 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 Manager可能需要更多堆   操作。这可以配置为:        / etc / default / cloudera-scm-server例如,您可以将“-Xmx2G”更改为“-Xmx3G”或“-Xmx4G”如果问题仍然存在   碰巧,也许堆转储会提供一些线索。

答案 1 :(得分:0)

我建议你拖尾日志。如果您使用的是免费套餐,cloudera经理将需要一段时间才能启动...在您启动cloudera-scm-server后最多可能需要5分钟或更长时间。
日志应显示是否存在任何错误,可能是内存分配问题,因为可用层服务器的可用内存有限。日志条目的一小部分看起来很好而且很典型 - 它会在用户界面出现在7180之前经过一长串流程。

同样在进行此操作时,请运行top甚至free -g以查看正在使用的资源量 - 尤其是内存。

答案 2 :(得分:0)

我遇到了完全相同的问题,无法在端口7180上使用公共DNS或IP登录CM登录。

以下步骤可以帮助您:

try {
   socket = new Socket(ip, port);
   networkWriter = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
   networkReader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
} catch (IOException e1) {
    throw new AssertionError(e1);
}

telnet localhost 7180(应该连接)

答案 3 :(得分:0)

无法连接到Cloudera Manager,无法侦听端口7180

1] 检查状态

sudo service cloudera-scm-server status

*cloudera-scm-server.service - LSB: Cloudera SCM Server Loaded: loaded (/etc/rc.d/init.d/cloudera-scm-server; bad; vendor preset: disabled)   Active: active (exited) since  UTC; 47min ago      Docs: man:systemd-sysv-generator(8) rm /var/run/cloudera-scm-server.pid

注意:Cloudera Manager服务因异常退出而无法运行。 运行服务cloudera-scm-server状态将打印以下消息" cloudera-scm-server dead但pid文件存在"。

原因:内存不足。

解决方案:检查Cloudera Manager Server在内存不足时创建的堆转储。堆转储文件在/ tmp目录中创建,文件扩展名为.hprof,文件权限为600.其所有者和组将是Cloudera Manager服务器进程的所有者和组,通常为cloudera-scm:cloudera-scm。< / p>

链接: http://www.cloudera.com/documentation/manager/5-0-x/Cloudera-Manager-Diagnostics-Guide/cm5dg_troubleshooting_cluster_config.html

答案 4 :(得分:0)

    Check the status of `cloudera-scm-server` and follow the instructions ahead:

    [root@quickstart ~]# `service cloudera-scm-server status`
    By default, Cloudera's QuickStart VM manages CDH using Linux's configuration
    and service management. To use Cloudera Manager instead, you must shut down
    and disable the existing CDH services and then start Cloudera Manager. You can
    do this by running the following command:

`sudo /home/cloudera/cloudera-manager`    


    [root@quickstart ~]#    `sudo /home/cloudera/cloudera-manager `    
    `[QuickStart] Shutting down CDH services via init scripts...
    JMX enabled by default
    Using config: /etc/zookeeper/conf/zoo.cfg
    [QuickStart] Disabling CDH services on boot...
    [QuickStart] Starting Cloudera Manager services...
    [QuickStart] Deploying client configuration...
    [QuickStart] Starting CM Management services...
    [QuickStart] Enabling CM services on boot...
    [QuickStart] Starting CDH services...`
    ________________________________________________________________________________

    Success! You can now log into Cloudera Manager from the QuickStart VM's browser:

    http://quickstart.cloudera:7180

    Username: cloudera
    Password: cloudera