Hi,
It's a new installation, and when I'm attempting the cluster initialization process after Wazuh indexer installation and configuration, I'm encountering an error when running this command:
# /usr/share/wazuh-indexer/bin/indexer-security-init.sh.
root@soc3-ThinkCentre-M72e:/home/soc3# /usr/share/wazuh-indexer/bin/indexer-security-init.sh
**************************************************************************
** This tool will be deprecated in the next major release of OpenSearch **
**
https://github.com/opensearch-project/security/issues/1755 **
**************************************************************************
Security Admin v7
Will connect to
192.168.20.159:9200 ... done
Connected as "CN=admin,OU=Wazuh,O=Wazuh,L=California,C=US"
OpenSearch Version: 2.6.0
Contacting opensearch cluster 'opensearch' and wait for YELLOW clusterstate ...
Cannot retrieve cluster state due to: 30,000 milliseconds timeout on connection http-outgoing-2 [ACTIVE]. This is not an error, will keep on trying ...
Root cause: java.net.SocketTimeoutException: 30,000 milliseconds timeout on connection http-outgoing-2 [ACTIVE] (java.net.SocketTimeoutException/java.net.SocketTimeoutException)
* Try running securityadmin.sh with -icl (but no -cl) and -nhnv (If that works you need to check your clustername as well as hostnames in your TLS certificates)
* Make sure that your keystore or PEM certificate is a client certificate (not a node certificate) and configured properly in opensearch.yml
* If this is not working, try running securityadmin.sh with --diagnose and see diagnose trace log file)
* Add --accept-red-cluster to allow securityadmin to operate on a red cluster.
Cannot retrieve cluster state due to: 30,000 milliseconds timeout on connection http-outgoing-3 [ACTIVE]. This is not an error, will keep on trying ...
Root cause: java.net.SocketTimeoutException: 30,000 milliseconds timeout on connection http-outgoing-3 [ACTIVE] (java.net.SocketTimeoutException/java.net.SocketTimeoutException)
* Try running securityadmin.sh with -icl (but no -cl) and -nhnv (If that works you need to check your clustername as well as hostnames in your TLS certificates)
* Make sure that your keystore or PEM certificate is a client certificate (not a node certificate) and configured properly in opensearch.yml
When I check the Wazuh indexer logs,
[2023-09-04T12:47:27,643][WARN ][o.o.c.c.ClusterFormationFailureHelper] [node-1] cluster-manager not discovered or elected yet, an election requires a node with id [tUQv5ImwSTy4ofT-eZY72g], have discovered [{node-1}{vIyQ96FMTwWNMPNSs38xnA}{XtYjMDJpRxif3WtMumBoaA}{192.168.20.159}{192.168.20.159:9300}{dimr}{shard_indexing_pressure_enabled=true}] which is not a quorum; discovery will continue using [
192.168.20.158:9300] from hosts providers and [{node-1}{vIyQ96FMTwWNMPNSs38xnA}{XtYjMDJpRxif3WtMumBoaA}{192.168.20.159}{192.168.20.159:9300}{dimr}{shard_indexing_pressure_enabled=true}] from last-known cluster state; node term 2, last-accepted version 89 in term 2
[2023-09-04T12:47:37,644][WARN ][o.o.c.c.ClusterFormationFailureHelper] [node-1] cluster-manager not discovered or elected yet, an election requires a node with id [tUQv5ImwSTy4ofT-eZY72g], have discovered [{node-1}{vIyQ96FMTwWNMPNSs38xnA}{XtYjMDJpRxif3WtMumBoaA}{192.168.20.159}{192.168.20.159:9300}{dimr}{shard_indexing_pressure_enabled=true}] which is not a quorum; discovery will continue using [
192.168.20.158:9300] from hosts providers and [{node-1}{vIyQ96FMTwWNMPNSs38xnA}{XtYjMDJpRxif3WtMumBoaA}{192.168.20.159}{192.168.20.159:9300}{dimr}{shard_indexing_pressure_enabled=true}] from last-known cluster state; node term 2, last-accepted version 89 in term 2
[2023-09-04T12:47:39,018][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [node-1] Exception while retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro_security)
org.opensearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];
at org.opensearch.cluster.block.ClusterBlocks.globalBlockedException(ClusterBlocks.java:205) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.cluster.block.ClusterBlocks.globalBlockedRaiseException(ClusterBlocks.java:191) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.action.get.TransportMultiGetAction.doExecute(TransportMultiGetAction.java:81) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.action.get.TransportMultiGetAction.doExecute(TransportMultiGetAction.java:58) ~[opensearch-2.6.0.jar:2.6.0]
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:218) [opensearch-2.6.0.jar:2.6.0]
at org.opensearch.indexmanagement.rollup.actionfilter.FieldCapsFilter.apply(FieldCapsFilter.kt:118) [opensearch-index-management-2.6.0.0.jar:2.6.0.0]
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:216) [opensearch-2.6.0.jar:2.6.0]
at org.opensearch.performanceanalyzer.action.PerformanceAnalyzerActionFilter.apply(PerformanceAnalyzerActionFilter.java:78) [opensearch-performance-analyzer-2.6.0.0.jar:2.6.0.0]
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:216) [opensearch-2.6.0.jar:2.6.0]
at org.opensearch.security.filter.SecurityFilter.apply0(SecurityFilter.java:232) [opensearch-security-2.6.0.0.jar:2.6.0.0]
at org.opensearch.security.filter.SecurityFilter.apply(SecurityFilter.java:149) [opensearch-security-2.6.0.0.jar:2.6.0.0]
at org.opensearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:216) [opensearch-2.6.0.jar:2.6.0]
at org.opensearch.action.support.TransportAction.execute(TransportAction.java:188) [opensearch-2.6.0.jar:2.6.0] at org.opensearch.action.support.TransportAction.execute(TransportAction.java:107) [opensearch-2.6.0.jar:2.6.0] at org.opensearch.client.node.NodeClient.executeLocally(NodeClient.java:110) [opensearch-2.6.0.jar:2.6.0]
at org.opensearch.client.node.NodeClient.doExecute(NodeClient.java:97) [opensearch-2.6.0.jar:2.6.0]
at org.opensearch.client.support.AbstractClient.execute(AbstractClient.java:465) [opensearch-2.6.0.jar:2.6.0]
at org.opensearch.client.support.AbstractClient.multiGet(AbstractClient.java:581) [opensearch-2.6.0.jar:2.6.0]
at org.opensearch.security.configuration.ConfigurationLoaderSecurity7.loadAsync(ConfigurationLoaderSecurity7.java:208) [opensearch-security-2.6.0.0.jar:2.6.0.0]
at org.opensearch.security.configuration.ConfigurationLoaderSecurity7.load(ConfigurationLoaderSecurity7.java:99) [opensearch-security-2.6.0.0.jar:2.6.0.0]
at org.opensearch.security.configuration.ConfigurationRepository.getConfigurationsFromIndex(ConfigurationRepository.java:372) [opensearch-security-2.6.0.0.jar:2.6.0.0]
at org.opensearch.security.configuration.ConfigurationRepository.reloadConfiguration0(ConfigurationRepository.java:318) [opensearch-security-2.6.0.0.jar:2.6.0.0]
at org.opensearch.security.configuration.ConfigurationRepository.reloadConfiguration(ConfigurationRepository.java:303) [opensearch-security-2.6.0.0.jar:2.6.0.0]
at org.opensearch.security.configuration.ConfigurationRepository$1.run(ConfigurationRepository.java:163) [opensearch-security-2.6.0.0.jar:2.6.0.0]
at java.lang.Thread.run(Thread.java:833) [?:?]
[2023-09-04T12:47:47,644][WARN ][o.o.c.c.ClusterFormationFailureHelper] [node-1] cluster-manager not discovered or elected yet, an election requires a node with id [tUQv5ImwSTy4ofT-eZY72g], have discovered [{node-1}{vIyQ96FMTwWNMPNSs38xnA}{XtYjMDJpRxif3WtMumBoaA}{192.168.20.159}{192.168.20.159:9300}{dimr}{shard_indexing_pressure_enabled=true}] which is not a quorum; discovery will continue using [
192.168.20.158:9300] from hosts providers and [{node-1}{vIyQ96FMTwWNMPNSs38xnA}{XtYjMDJpRxif3WtMumBoaA}{192.168.20.159}{192.168.20.159:9300}{dimr}{shard_indexing_pressure_enabled=true}] from last-known cluster state; node term 2, last-accepted version 89 in term 2
Kindly help to resolve this issue.