The syntax provided for the second example at https://opensearch.org/docs/latest/clients/java/#initializing-the-client-with-ssl-and-tls-enabled-using-restclient-transport is invalid: - hostname and port order are reversed - the password field is a character array The correct syntax is used earlier on the page for the Apache HTTP client version. Signed-off-by: Daniel Widdis <[email protected]>