Cloudera-scm-agent dead but pid file exist

Issue : cloudera-scm-agent failed to restart, saying agent dead but pid file exist. Sometimes it starts good but it`ll die after few min.


Solution : Try 1

Delete the pid file and restart the agent.

# rm -f /var/run/cloudera-scm-agent.pid

# service cloudera-scm-agent restart

# service cloudera-scm-agent status

It`ll work for most of the cases. If it doesn`t work try the next step.


Try 2 :


Delete the pid file and restart the agent.

# rm -f /var/run/cloudera-scm-agent.pid

Hard stop the agent :

# service cloudera-scm-agent hard_stop_confirmed

Hard restart the agent :

# service cloudera-scm-agent hard_restart_confirmed

Try 3 :

Check for zombie agent process.

Check the agent status :

# service cloudera-scm-agent status

If the agent status is stopped, there should not be any agent process running in background.

Check it using PS command :

# ps -ef | grep "cloudera-scm-agent"

Kill the zombie agent process

kill -9 <pid>

Start the agent :

# service cloudera-scm-agent start
### Cloudera SCM Agent 启动时报错 Traceback 的解决方案 #### 错误分析 当遇到 `cloudera-scm-agent` 启动失败并抛出 `Traceback` 错误时,可能的原因有多种。常见的原因包括目录权限不足、端口冲突以及配置文件设置不正确。 #### 权限问题处理 如果错误提示涉及获取目录属性失败,则可能是由于目标路径不存在或当前用户无权访问这些路径造成的。应确认 `/xx/log/cloudera-scm-agent` 和其他指定的日志存储位置确实存在,并且具有适当的读写权限[^1]。 ```bash sudo mkdir -p /xx/log/cloudera-scm-agent sudo chown -R cloudera-scm:cloudera-scm /xx/log/ ``` #### 端口占用排查 对于因尝试创建套接字而引发的异常——即本地回环接口上的特定端口已被占用的情况,建议先通过命令查看是否有其他服务正在使用相同端口: ```bash netstat -tuln | grep 9001 lsof -i :9001 ``` 一旦发现冲突的服务实例,可以选择停止它或将 `cloudera-scm-agent` 配置中的监听端口更改为未被使用的数值[^2]。 #### 修改配置文件 针对某些情况下需要调整通信参数的情形,在编辑位于 `/etc/cloudera-scm-agent/` 下的 `config.ini` 文件时,请确保其中定义的服务主机地址和服务端开放的端口均指向正确的CM Server节点及其默认对外开放的工作端口(通常是7182),以此来建立有效的连接关系[^3]。 ```ini [General] service_host=your_cloudera_manager_ip_or_hostname port=7182 ``` #### 调整网络策略 考虑到防火墙规则或其他安全措施可能会阻止必要的流量传输,适当放宽对Cloudera Manager所依赖的一系列内部通讯所需端口的安全限制也是解决问题的关键之一。例如允许所有来自本机的数据包到达 CM Server 上运行的应用程序监听的所有端口[^4]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值