elkninja/elastic-stack-docker-part-one

Metricbeat doesn't want to start: host parsing failed for elasticsearch-shard: 'password' config for module elasticsearch is not a string

v-bulynkin opened this issue · 1 comments

Hello!

I'm reading the article and everything has worked good until Metricbeat which I can't force to work.

When I start docker compose up -d in Metricbeat logs I see the following:
user@ubuntu:~/elk$ docker logs elk-metricbeat01-1
Exiting: 9 errors: host parsing failed for elasticsearch-ccr: 'password' config for module elasticsearch is not a string; host parsing failed for elasticsearch-enrich: 'password' config for module elasticsearch is not a string; host parsing failed for elasticsearch-cluster_stats: 'password' config for module elasticsearch is not a string; host parsing failed for elasticsearch-index: 'password' config for module elasticsearch is not a string; host parsing failed for elasticsearch-index_recovery: 'password' config for module elasticsearch is not a string; host parsing failed for elasticsearch-index_summary: 'password' config for module elasticsearch is not a string; host parsing failed for elasticsearch-ml_job: 'password' config for module elasticsearch is not a string; host parsing failed for elasticsearch-node_stats: 'password' config for module elasticsearch is not a string; host parsing failed for elasticsearch-shard: 'password' config for module elasticsearch is not a string

But why?

This is my project folder (*.tar.gz are docker images archives which I've moved from another docker host):

user@ubuntu:~/elk$ ll
total 1113664
drwxrwxr-x 8 user user      4096 Jun  8 18:04 ./
drwxr-x--- 7 user user      4096 Jun  8 13:02 ../
drwxr-x--- 5 root root      4096 Jun  8 13:03 certs/
-rw-rw-r-- 1 user user      7139 Jun  8 18:00 docker-compose.yml
-rw-rw-r-- 1 user user 623698342 Jun  8 12:39 elasticsearch.tar.gz
-rw-rw-r-- 1 user user       877 Jun  8 12:39 .env
drwxr-xr-x 5 user user      4096 Jun  8 18:03 esdata01/
drwxrwxr-x 2 user user      4096 Jun  8 12:39 filebeatdata01/
drwxrwxr-x 8 user user      4096 Jun  8 18:01 kibanadata/
-rw-rw-r-- 1 user user 391381853 Jun  8 12:39 kibana.tar.gz
drwxrwxr-x 2 user user      4096 Jun  8 12:39 logstashdata01/
drwxrwxr-x 2 user user      4096 Jun  8 18:01 metricbeatdata01/
-rw-rw-r-- 1 user user 125247211 Jun  8 12:39 metricbeat.tar.gz
-rw-rw-r-- 1 user user      1174 Jun  8 17:57 metricbeat.yml

What I modified in comparison with original configs:

  1. ENCRYPTION_KEY, passwords and STACK_VERSION=8.14.0 in .env
  2. All volumes to mounts: ./certs, ./esdata01, etc. in docker-compose.yml

Elasticsearch and kibana work as expected:

user@ubuntu:~/elk$ docker compose ps
NAME           IMAGE                  COMMAND                  SERVICE   CREATED          STATUS                    PORTS
elk-es01-1     elasticsearch:8.14.0   "/bin/tini -- /usr/l…"   es01      26 minutes ago   Up 25 minutes (healthy)   0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9300/tcp
elk-kibana-1   kibana:8.14.0          "/bin/tini -- /usr/l…"   kibana    25 minutes ago   Up 25 minutes (healthy)   0.0.0.0:5601->5601/tcp, :::5601->5601/tcp

Kibana's web interface can be opened:

изображение

I found the solution.
Because I set 123456 as a password variable, it wasn't treated as a string.
After I change it to P@ssw0rd, Metricbeat started working.