Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
opensearch-2.11.1
- Linux - RedHat
- ubi8/ubi-minimal
Describe the issue:
I came across this issue here (Hostname verification failure · Issue #3997 · opensearch-project/security · GitHub), but am unsure whether it is related or not.
I set up an OpenSearch cluster in OCP, through a StatefulSet, using kustomize. The security plugin has been enabled and has been configured to use keystore and truststore certificates. With a single node I have no issues deploying the cluster and I can reach it via the external Route. Status is green. All fine. As soon as I add an additional node to the StatefulSet, and adjust the config accordingly, the first node/pod will start successfully. However the second node can’t be created because it can’t connect to the first:
[opensearch-1] Exception during establishing a SSL connection: javax.net.ssl.SSLHandshakeException: No subject alternative DNS name matching opensearch-0.opensearch found.
I then remove the StatefulSet and re-apply, but thus time I can’t get node-0 to run:
[opensearch-0] failed to resolve host [opensearch-0.opensearch]
java.net.UnknownHostException: opensearch-0.opensearch: Name or service not known
Only once I re-deploy using an explicit single-node configuration, can node-0 be created inside the multi-node cluster, but I still can’t get the second node to run, and I am stuck with the same problem.
Configuration:
cluster.name: opensearch-cluster
network.host: 0.0.0.0
network.bind_host: 0.0.0.0
http.port: 9200
node.roles: [ coordinating, master, data, ingest ]
discovery.seed_hosts: [ “opensearch-0.opensearch”, “opensearch-1.opensearch” ]
cluster.initial_cluster_manager_nodes: [ “opensearch-0”, “opensearch-1” ]
plugins.security.disabled: false
plugins.security.allow_default_init_securityindex: true
plugins.security.system_indices.enabled: true
plugins.security.ssl.transport.keystore_filepath: certificates/tls.pfx
plugins.security.ssl.transport.truststore_filepath: certificates/truststore
Relevant Logs or Screenshots: