CDH6.3.1 agent节点报Port 9001 not free on 127.0.0.1

CDH6.3.1 agent节点报Port 9001 not free on 127.0.0.1

1.背景

公司机房进行停电维护,服务器关机,第二天重启CDH服务发现问题,Zookeeper服务启动报错,排查发现Hadoop002-Hadoop004节点宕机,CDH server检测不到这三台服务器的状态。

2.排查问题

CDH6.3.1 agent节点报9001端口not free。

ENGINE Error in 'start' listener <bound method Server.start of <cherrypy._cpserver.Server object at 0x7fab75c75410>>
Traceback (most recent call last):
  File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/cherrypy/process/wspbus.py", line 215, in publish
    output.append(listener(*args, **kwargs))
  File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/cherrypy/_cpserver.py", line 171, in start
    super(Server, self).start()
  File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/cherrypy/process/servers.py", line 177, in start
    portend.free(*self.bind_addr, timeout=Timeouts.free)
  File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/portend.py", line 108, in free
    raise Timeout("Port {port} not free on {host}.".format(**locals()))
Timeout: Port 9001 not free on 127.0.0.1.

[27/Mar/2023 10:15:45 +0000] 224239 MainThread _cplogging   ERROR    [27/Mar/2023:10:15:45] ENGINE Shutting down due to error in start listener:
Traceback (most recent call last):
  File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/cherrypy/process/wspbus.py", line 253, in start
    self.publish('start')
  File "/opt/cloudera/cm-agent/lib/python2.7/site-packages/cherrypy/process/wspbus.py", line 233, in publish
    raise exc
ChannelFailures: Timeout('Port 9001 not free on 127.0.0.1.',)

最初排查的时候在Hadoop002-Hadoop004并没有看到9001被使用的情况。

netstat -tunlp | grep 9001

在这里插入图片描述

监控9001端口也没有发现端口被使用的情况。

tcpdump -n -X -i any port 9001

重启agent服务 systemctl restart cloudera-scm-agent;继续报该错误:

问题排查了3天并没有找到具体原因,也找不到9001端口被占用的情况。
reboot重启服务器之后,重启CDH server与agent,还是同样的错误,但是这次查看端口使用情况却发现了dockerd有服务占用了9001端口。
在这里插入图片描述在这里插入图片描述
在这里插入图片描述

查看该dockerd服务的进程情况:

ps -ef | grep 2632

在这里插入图片描述

修改了dockerd中的9001端口为19091,重启CDH server与agent,启动成功。
在这里插入图片描述

经了解得知,这是dockerd中的IANA注册服务,正常来说注册的时候会有端口占用的情况。注册完之后,进程停止之后,该端口就被释放了,但是一直没有被释放。怀疑是有什么端口保留的操作。

3.总结

由于公司内部CDH平台与dockerd部署在一起(资金紧张),并且dockerd也安装了Zookeeper,kafka等组件,涉及端口较多,运维难度较大。所以只能尽可能的进行隔离:配置文件隔离,数据文件,日志文件,访问端口等调整与隔离。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值