cdh的agent无法启动

本文介绍了解决Supervisord启动时遇到端口已被占用的问题,并提供了详细的步骤来终止冲突进程并重启代理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

查看supervisord的日志有如下错误:

[root@cdh1 ~]#  cat /opt/cm-5.10.0/log/cloudera-scm-agent/supervisord.out 

/opt/cm-5.10.0/lib64/cmf/agent/build/env/lib64/python2.7/site-packages/supervisor-3.0-py2.7.egg/supervisor/options.py:323: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
Error: Another program is already listening on a port that one of our HTTP servers is configured to use.  Shut this program down first before starting supervisord.

For help, use /opt/cm-5.10.0/lib64/cmf/agent/build/env/bin/supervisord -h

解决办法:


[root@cdh1 ~]# ps -ef | grep supervisord
root     14586     1  0 17:38 ?        00:00:00 /usr/lib64/cmf/agent/build/env/bin/python /usr/lib64/cmf/agent/build/env/bin/supervisord
root     26945  2348  0 17:58 pts/0    00:00:00 grep --color=auto supervisord
[root@cdh1 ~]# kill -s SIGTERM 14586
[root@cdh1 ~]# ps -ef | grep supervisord
root     27509  2348  0 17:58 pts/0    00:00:00 grep --color=auto supervisord
[root@cdh1 ~]# ps -ef | grep supervisord
root     27515 27507  0 17:58 ?        00:00:00 /usr/lib64/cmf/agent/build/env/bin/python /usr/lib64/cmf/agent/build/env/bin/supervisord
root     27517  2348  0 17:58 pts/0    00:00:00 grep --color=auto supervisord
[root@cdh1 ~]# kill -s SIGTERM 27507
[root@cdh1 ~]# ps -ef | grep supervisord
root     28850  2348  0 17:59 pts/0    00:00:00 grep --color=auto supervisord
[root@cdh1 ~]# ps -ef | grep supervisord
root     28853  2348  0 17:59 pts/0    00:00:00 grep --color=auto supervisord
[root@cdh1 ~]# ps -ef | grep supervisord
root     28855  2348  0 17:59 pts/0    00:00:00 grep --color=auto supervisord
[root@cdh1 ~]# ps -ef | grep supervisord
root     28857  2348  0 17:59 pts/0    00:00:00 grep --color=auto supervisord
[root@cdh1 ~]# ps -ef | grep supervisord
root     28859  2348  0 17:59 pts/0    00:00:00 grep --color=auto supervisord
[root@cdh1 ~]# ps -ef | grep supervisord
root     28861  2348  0 17:59 pts/0    00:00:00 grep --color=auto supervisord


直到确保supervisord被杀死,然后重启agent

<think>好的,用户的问题是询问CDH CM的启动命令。首先我需要回忆ClouderaManager和CDH的相关知识。根据之前的引用内容,用户提到过启动CM Server的命令是/opt/cm-5.6.0/etc/init.d/cloudera-scm-server start,并且在引用1中也有提到这个路径。同时,用户还提到了设置自启动,用chkconfig命令。接下来要确认CMServer和CM Agent启动命令是否有区别。引用1中启动的是Server,而Agent可能在其他节点上运行,可能需要不同的命令。例如,Agent启动可能是cloudera-scm-agent start。不过用户现在问的是CM的启动命令,可能指的是Server部分。 另外,用户可能还关心如何停止服务或者重启,所以应该一并提供这些命令。同时,日志路径也是常见问题,引用2提到了/var/log/cloudera-scm-server/cloudera-scm-server.log,这部分需要包含在回答中,帮助用户排查问题。 需要注意不同版本的路径可能不同,比如用户引用中的是cm-5.6.0,但其他版本路径中的版本号会变化,需要提醒用户根据实际安装路径调整命令。最后,用户可能还需要了解如何验证服务是否成功启动,比如检查状态或查看端口是否监听,这部分可以加入补充说明,增加回答的实用性。</think>Cloudera Manager(CM)和CDH启动命令根据组件不同有所区分,以下是关键操作步骤: ### 一、CM Server启动命令 1. **启动CM Server服务** ```bash /opt/cm-5.6.0/etc/init.d/cloudera-scm-server start ``` 2. **设置开机自启动** ```bash cp /opt/cm-5.6.0/etc/init.d/cloudera-scm-server /etc/init.d/ chkconfig cloudera-scm-server on ``` ### 二、CM Agent启动命令 1. **启动Agent服务(所有节点执行)** ```bash service cloudera-scm-agent start ``` 2. **重启Agent(配置变更后常用)** ```bash service cloudera-scm-agent restart ``` ### 三、服务状态检查 - **查看CM Server状态** ```bash service cloudera-scm-server status ``` - **查看端口监听(默认7180)** ```bash netstat -an | grep 7180 ``` ### 四、日志路径 - **Server日志(启动问题排查关键)** ```bash /var/log/cloudera-scm-server/cloudera-scm-server.log ``` - **Agent日志** ```bash /var/log/cloudera-scm-agent/cloudera-scm-agent.log ``` > **注意**:路径中的`cm-5.6.0`需替换为实际安装版本号,若使用非root用户需加`sudo`[^1][^3]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值