Мои требования
Example: Elastic
Install Supervisord on relevant Linux machine where elasticsearch is installed.
Create new supervisor conf file for elasticsearch
Configure command to run elasticsearch in the above conf.
Ensure that the command to be configured picks up all the configure files needed to run
elasticsearch
Я установил Supervisord и создал файлasticsearch.conf
/ etc / supervisor / conf.d /asticsearch.conf
[program:elasticsearch]
command=/usr/share/elasticsearch/bin
directory=/
autostart=true
autorestart=true
environment=SECRET_ID="secret_id",SECRET_KEY="secret_key"
startretries=3
stdout_logfile=/var/log/elasticsearch/elasticsearch.log
stderr_logfile=/var/log/elasticsearch/elasticsearch.log
Ошибка при получении:
ubuntu@abc:~$ sudo /etc/init.d/supervisor status
● supervisor.service - Supervisor process control system for UNIX
Loaded: loaded (/lib/systemd/system/supervisor.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-09-25 06:00:40 UTC; 2h 44min ago
Docs: http://supervisord.org
Main PID: 8746 (supervisord)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/supervisor.service
└─8746 /usr/bin/python /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
Sep 25 08:41:12 --- sudo[10529]: root : TTY=unknown ;
PWD=/usr/share/elasticsearch/bin ; USER=root ; COMMAND=/bin/syst…h.service
Sep 25 08:41:12 ip-*** sudo[10529]: pam_unix(sudo:session): session opened for user root by
(uid=0)
Sep 25 08:41:12 ip- sudo[10529]: pam_unix(sudo:session): session closed for user
root
Sep 25 08:41:12 ip-1 supervisord[8746]: 2019-09-25 08:41:12,384 INFO exited:
elasticsearch (exit status 0; not expected)
Sep 25 08:41:15 ip-1 supervisord[8746]: 2019-09-25 08:41:15,387 INFO spawned:
'elasticsearch' with pid 10656
Sep 25 08:41:15 ip-1 sudo[10656]: root : TTY=unknown ;
PWD=/usr/share/elasticsearch/bin ; USER=root ; COMMAND=/bin/syst…h.service
Sep 25 08:41:15 ip- sudo[10656]: pam_unix(sudo:session): session opened for user
root by (uid=0)
Sep 25 08:41:15 ip-1 sudo[10656]: pam_unix(sudo:session): session closed for user
root
Sep 25 08:41:15 ip- supervisord[8746]: 2019-09-25 08:41:15,780 INFO exited:
elasticsearch (exit status 0; not expected)
Sep 25 08:41:16 ip- supervisord[8746]: 2019-09-25 08:41:16,781 INFO gave up:
elasticsearch entered FATAL state, too many s…o quickly
Hint: Some lines were ellipsized, use -l to show in full.
Мне нужно настроить Elasticsearch для супервизора. Помогите.