https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44025 --- Comment #1 from Johan Larsson <johan@imcode.com> --- Created attachment 210829 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210829&action=edit Bug 44025: Use all addresses of a single Elasticsearch server name as nodes A site normally has one <server> in koha-conf.xml, for example https://user:pass@elastic.example.com:9200. When that name resolves to several addresses (DNS round robin for the nodes of a cluster), Search::Elasticsearch still gets a single node. There is nothing to spread the requests over, and nothing to fail over to when that node is slow, hangs or answers with errors. When the configuration has exactly one <server> and its host name resolves to several IPv4 addresses, get_elasticsearch_params now returns one node per address, with user, password, scheme and port kept. For https ssl_options SSL_verifycn_name and SSL_hostname are set to the original name, so the certificate is still verified against the name. Left unchanged: several <server> entries, an IP address, a name that resolves to one address, a failed lookup. Installations that do not have a name with several addresses are not affected. The addresses are resolved when the client is created, so a long running process needs a restart to see changes in the DNS. Test plan: 1. prove t/Koha/SearchEngine/Elasticsearch/DnsNodes.t 2. Optional: make a name resolve to the address of your Elasticsearch and to a second address nobody listens on, for example in /etc/hosts: 127.0.0.1 multi-es <ES address> multi-es Set <server>multi-es:9200</server> in koha-conf.xml and check that Koha::SearchEngine::Elasticsearch->get_elasticsearch_params returns both addresses as nodes. Failing over from the dead address to the live one needs the patch of bug 44022. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.