我正在运行主管。重新读取和重新启动成功完成。但是,当我运行命令:ps -ef | grep python
时,我只运行了一个文件,而不是5。而且,我也得到了状态错误:
Jun 25 13:38:18 woodward-testing supervisord[664]: 2018-06-25 13:38:18,308 ERRO pool dependentstartup event buffer overflowed, discarding event 1980
Jun 25 13:38:18 woodward-testing supervisord[664]: 2018-06-25 13:38:18,308 INFO success: form-org_mapping entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Jun 25 13:38:18 woodward-testing supervisord[664]: 2018-06-25 13:38:18,337 ERRO pool dependentstartup event buffer overflowed, discarding event 1981
Jun 25 13:38:18 woodward-testing supervisord[664]: 2018-06-25 13:38:18,337 INFO exited: form-org_mapping (exit status 1; not expected)
Jun 25 13:38:19 woodward-testing supervisord[664]: 2018-06-25 13:38:19,338 ERRO pool dependentstartup event buffer overflowed, discarding event 1982
Jun 25 13:38:19 woodward-testing supervisord[664]: 2018-06-25 13:38:19,340 INFO spawned: 'form-org_mapping' with pid 4340
Jun 25 13:38:19 woodward-testing supervisord[664]: 2018-06-25 13:38:19,578 ERRO pool dependentstartup event buffer overflowed, discarding event 1983
Jun 25 13:38:19 woodward-testing supervisord[664]: 2018-06-25 13:38:19,578 INFO success: form-org_mapping entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Jun 25 13:38:19 woodward-testing supervisord[664]: 2018-06-25 13:38:19,608 ERRO pool dependentstartup event buffer overflowed, discarding event 1984
Jun 25 13:38:19 woodward-testing supervisord[664]: 2018-06-25 13:38:19,608 INFO exited: form-org_mapping (exit status 1; not expected)
我的要求是:
producer_pricing
,consumer_pricing
和script_form_org_mapping
我已经在supervisor.conf文件中编写了以下conf:
; supervisor config file
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.
[eventlistener:dependentstartup]
command=python2 /home/aviral/dev/supervisord-dependent-startup/supervisord_dependent_startup.py -c /tmp/tmp_home/etc/supervisord.conf
stderr_logfile=/var/log/supervisor/%(program_name)s-err.log
autostart=true
events=PROCESS_STATE
[include]
files = /etc/supervisor/conf.d/*.ini
consumer_pricing.ini:
[program:consumer_pricing]
directory=/home/aviral/dev/woodward
command=/usr/bin/python consumer_pricing.py
redirect_stderr=true
autostart=false
startsecs=0
dependent_startup=true
dependent_startup_wait_for=kafka:running
stderr_logfile=/var/log/woodward/consumer_pricing.err.log
stdout_logfile=/var/log/woodward/consumer_pricing.out.log
form-org mapping.ini
[program:form-org_mapping]
directory=/home/aviral/dev/woodward
command=/usr/bin/python script_form_to_organization.py
autostart=true
stderr_logfile=/var/log/woodward/script_form_to_organization.err.log
stdout_logfile=/var/log/woodward/script_form_to_organization.out.log
startsecs=0
dependent_startup=true
dependent_startup_wait_for=kafka:running
我检查了脚本consumer_pricing.ini
和日志; Kafka尚未开始。