查看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