elasticsearch-php icon indicating copy to clipboard operation
elasticsearch-php copied to clipboard

Cannot handle IPv6 in publish_address as hostname/ip:port

Open ezimuel opened this issue 5 years ago • 0 comments

The Elasticsearch\ConnectionPool\SniffingConnectionPool is not able to parse IPv6 address when returning publish_address in the format hostname/ip:port.

We need to change the regular expression in SniffingConnectionPool::parseClusterState() to manage hostname, IPv4 and IPv6. A potential good one can be:

$pattern = '/(.*):([0-9]+)$/';

ezimuel avatar Apr 09 '20 09:04 ezimuel