supervisord
제가 관리하는 일부 가상 머신에 설치했고 여기에서 감독자를 위한 초기화 스크립트도 추가했습니다.https://github.com/Supervisor/initscripts/blob/master/ubuntu
다음은 이를 처리하는 Ansible 역할의 일부입니다.
- name: Install supervisord
pip: name=supervisor state=present
sudo: yes
- name: Create /etc/supervisor.d/ directory
file: path=/etc/supervisor.d/ state=directory
sudo: yes
- name: Create /var/log/supervisor/ directory
file: path=/var/log/supervisor state=directory
sudo: yes
- name: Copy supervisor global configuration
copy: src=supervisord.conf dest=/etc/supervisord.conf
sudo: yes
- name: Copy supervisor service script
copy: src=supervisord_init dest=/etc/init.d/supervisord mode=0755
sudo: yes
register: supervisord_init
- name: Invoke update-rc.d for supervisord
command: update-rc.d supervisord defaults
sudo: yes
이제 재부팅 후 시스템 supervisord
서비스가 제대로 시작되지 않는 것을 확인했습니다.
초기화 스크립트 서비스를 수동으로 호출하면 정상적으로 시작됩니다.
ubuntu@ubuntu:~$ sudo /etc/init.d/supervisord start
Starting supervisor: supervisord.
ubuntu@ubuntu:~$
시스템이 부팅하는 동안 시작하려고 하는 서비스를 기록하는 장소(특정 로그 파일일 수 있음)가 있습니까?
답변1
내 문제를 해결했습니다. 이유는 모르겠지만 nginx
구성을 수정하고 다시 설치한 후에는 supervisord
모든 것이 제대로 작동합니다.