LINUX.ORG.RU
ФорумAdmin

Запуск elastic+kibana в docker

 


0

1

Пытаюсь поработать с elasticsearch,kibana и столкнулся с проблемой.

Запускаю контейнер согласно инструкции

docker run -d --name elasticsearch --net elastic -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:8.2.2

После чего нужно выполнить команду для получения токена в кибану

docker exec -it elasticsearch /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana

Я так понимаю в ответе я должен получить тот самый токен.

Но вместо этого получаю лог ошибки

WARNING: Owner of file [/usr/share/elasticsearch/config/users] used to be [root], but now is [elasticsearch]
WARNING: Owner of file [/usr/share/elasticsearch/config/users_roles] used to be [root], but now is [elasticsearch]
Failed to determine the health of the cluster. Cluster health is currently RED.
This means that some cluster data is unavailable and your cluster is not fully functional.
The cluster logs (https://www.elastic.co/guide/en/elasticsearch/reference/8.2/logging.html) might contain information/indications for the underlying cause
It is recommended that you resolve the issues with your cluster before continuing
It is very likely that the command will fail when run against an unhealthy cluster.

If you still want to attempt to execute this command against an unhealthy cluster, you can pass the `-f` parameter.

ERROR: Failed to determine the health of the cluster. Cluster health is currently RED.

Совершенно не понимаю почему он мне втирает про кластер, я хочу работать и запускаю без кластера. Возможно проблема кроется в WARNING: Owner of file

Ответ на: комментарий от deadNightTiger
{"@timestamp":"2022-06-15T12:59:57.746Z", "log.level": "INFO",  "current.health":"RED","message":"Cluster health status changed from [YELLOW] to [RED] (reason: [state recovered]).","previous.health":"YELLOW","reason":"state recovered" , "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"elasticsearch[59d635461d1b][masterService#updateTask][T#1]","log.logger":"org.elasticsearch.cluster.routing.allocation.AllocationService","elasticsearch.cluster.uuid":"PCLPasQRRaqbGlCx43BV8w","elasticsearch.node.id":"EQ6mh-sST1m6MPCbBuN10Q","elasticsearch.node.name":"59d635461d1b","elasticsearch.cluster.name":"docker-cluster"}

sandrey81
() автор топика

Зачем ты вообще это делаешь?

Берешь готовый плейбук типа такого: https://github.com/janikvonrotz/ansible-docker-elk, чутка дорабатываешь напильником, чтобы он научился в 8.2.0 и автогенерацию паролей (полчаса-час), пользуешься. PROFIT!

George
()
Ответ на: комментарий от sandrey81

при чем тут composer

токен для кибаны он выдаст в интерактивном режиме (-it)

а данные и конфиги без persistent volumes где будут после апдейта образа?

https://www.elastic.co/guide/en/elasticsearch/reference/8.2/docker.html

kindof
()
Ответ на: комментарий от kindof

Мне нужен просто токет для кибаны. То что после перезапуска контейнера всё пропадет, меня это устраивает)) Моя задача сейчас, просто запустить кибану и поиграться с ней. В инструкции не сказано что нужно обязательно монтировать каталог

sandrey81
() автор топика