Run the default docker-compose.yml which uses postgresql and elasticsearch successfully.
Describe the bug
The auto-setup script uses curl to determine if elasticsearch is up. This does not appear to work correctly when the /etc/resolv.conf created by Docker inside the container contains search domains, as it might if they are inherited from the host. Here is my resolv.conf:
# Generated by Docker Engine.
# This file can be edited; Docker Engine will not make further changes once it
# has been modified.
nameserver 127.0.0.11
search home.arpa foo.com
options edns0 trust-ad ndots:0
# Based on host file: '/etc/resolv.conf' (internal resolver)
# ExtServers: [host(127.0.0.53)]
# Overrides: []
# Option ndots from: internal
And we can see the behavior of curl when using the non-qualified name elasticsearch:
# curl http://elasticsearch:9200
curl: (6) Could not resolve host: elasticsearch
But appending a . to make it fully-qualified works:
Also note that this seems specific to curl -- on the same image ping elasticsearch and nslookup elasticsearch and dig -t a elasticsearch @127.0.0.11 all work perfectly fine.
So we can see that curl is using ares/1.24.0 for DNS resolution, which means we are probably hitting issue https://github.com/c-ares/c-ares/issues/734, which should be resolved in 1.31.0. It appears that even alpine 3.20 does not use that version yet.
The result is that the temporal container continuously reports:
Waiting for Elasticsearch to start up.
The workaround appears to be to remove the search domains from resolv.conf by appending dns_search: "" to the compose options for the temporal container.
However, perhaps doing the check for ES being up with something other than curl might be a solution if other people are hitting this as well?
Minimal Reproduction
Start docker-compose where the host /etc/resolv.conf contains search domains.
Environment/Versions
OS and processor: Linux
Temporal Version: 1.25.0
Are you using Docker or Kubernetes or building Temporal from source? Docker Compose version v2.14.1
What are you really trying to do?
Run the default docker-compose.yml which uses postgresql and elasticsearch successfully.
Describe the bug
The auto-setup script uses
curl
to determine if elasticsearch is up. This does not appear to work correctly when the/etc/resolv.conf
created by Docker inside the container contains search domains, as it might if they are inherited from the host. Here is myresolv.conf
:And we can see the behavior of curl when using the non-qualified name
elasticsearch
:But appending a
.
to make it fully-qualified works:Also note that this seems specific to
curl
-- on the same imageping elasticsearch
andnslookup elasticsearch
anddig -t a elasticsearch @127.0.0.11
all work perfectly fine.So we can see that curl is using ares/1.24.0 for DNS resolution, which means we are probably hitting issue https://github.com/c-ares/c-ares/issues/734, which should be resolved in 1.31.0. It appears that even alpine 3.20 does not use that version yet.
The result is that the temporal container continuously reports:
The workaround appears to be to remove the search domains from resolv.conf by appending
dns_search: ""
to the compose options for the temporal container.However, perhaps doing the check for ES being up with something other than
curl
might be a solution if other people are hitting this as well?Minimal Reproduction
Start docker-compose where the host
/etc/resolv.conf
contains search domains.Environment/Versions