# Opensearch cluster : OpenSearch Security not initialized

**URL:** <https://forum.opensearch.org/t/opensearch-cluster-opensearch-security-not-initialized/22715>\
**Category:** Security\
**Created:** [December 6, 2024, 12:06pm UTC](https://forum.opensearch.org/t/opensearch-cluster-opensearch-security-not-initialized/22715 "2024-12-06T12:06:03Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![NicoLef](https://avatars.discourse-cdn.com/v4/letter/n/cdc98d/32.png) [@NicoLef](https://forum.opensearch.org/u/NicoLef)\
**Post date:** [December 8, 2024, 2:05am UTC](https://forum.opensearch.org/t/opensearch-cluster-opensearch-security-not-initialized/22715/6 "2024-12-08T02:05:21Z")

</div>

Ok i found the problem.  
According to this post :

> [@Opensearch launch failed on cluster manager](https://forum.opensearch.org/t/opensearch-launch-failed-on-cluster-manager/16096):
>
> Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Describe the issue: I’m trying to create an opensearch cluster, in which contains a “cluster manager” node, and tothers data nodes. But when I tried to start opensearch on the cluster manager node which is the first node to start in my cluster, but start-up process aborted with errors , the main error is as below: org.opensearch.action.search.SearchPhaseExecutionException: all shards failed However, if I removed “node.roles: [ c…

the problem is it’s not possible to start a node with only the role cluster\_manager.  
In definitive, role need to be : [cluster\_manager, data]

Here is my opensearch.yml  
Cluster manager =\> 192.168.3.101

```auto
cluster.name: opensearch-cluster
node.name: cluster
network.bind_host: 192.168.3.101
network.publish_host: 192.168.3.101
network.host: 192.168.3.101
http.port: 9200
node.roles: [cluster_manager, data]
cluster.initial_cluster_manager_nodes: ["cluster"]
discovery.seed_hosts: ["192.168.3.106:9200", "192.168.3.101:9200"]
      #discovery.type: single-node
path.data: /srv/data
#
# Path to log files:
#
path.logs: /srv/logs
plugins.security.ssl.transport.pemcert_filepath: /etc/opensearch/node1_ip.pem
plugins.security.ssl.transport.pemkey_filepath: /etc/opensearch/node1-key_ip.pem
plugins.security.ssl.transport.pemtrustedcas_filepath: /etc/opensearch/root-ca.pem
plugins.security.ssl.http.enabled: true
plugins.security.ssl.http.pemcert_filepath: /etc/opensearch/node1_ip.pem
plugins.security.ssl.http.pemkey_filepath: /etc/opensearch/node1-key_ip.pem
plugins.security.ssl.http.pemtrustedcas_filepath: /etc/opensearch/root-ca.pem
plugins.security.allow_default_init_securityindex: true
plugins.security.authcz.admin_dn:
  - 'CN=A,OU=UNIT,O=ORG,L=TORONTO,ST=ONTARIO,C=CA'
plugins.security.nodes_dn:
  - 'CN=192.168.3.101,OU=AXI,O=AXI,L=PARIS,ST=FRANCE,C=FR'
  - 'CN=192.168.3.106,OU=AXI,O=AXI,L=PARIS,ST=FRANCE,C=FR'
plugins.security.audit.type: internal_opensearch
plugins.security.enable_snapshot_restore_privilege: true
plugins.security.check_snapshot_restore_write_privileges: true
plugins.security.restapi.roles_enabled: ["all_access", "security_rest_api_access"]

```

Data node (192.168.3.106)

```auto
cluster.name: opensearch-cluster
node.name: node1
network.bind_host: 192.168.3.106
network.host: 192.168.3.106
http.port: 9200
node.roles: [data]
cluster.initial_cluster_manager_nodes: ["cluster"]
discovery.seed_hosts: ["192.168.3.101", "192.168.3.106"]
    #discovery.type: single-node
path.data: /srv/data
#
# Path to log files:
#
path.logs: /srv/logs
plugins.security.ssl.transport.pemcert_filepath: /etc/opensearch/node1_ip.pem
plugins.security.ssl.transport.pemkey_filepath: /etc/opensearch/node1-key_ip.pem
plugins.security.ssl.transport.pemtrustedcas_filepath: /etc/opensearch/root-ca.pem
plugins.security.ssl.http.enabled: true
plugins.security.ssl.http.pemcert_filepath: /etc/opensearch/node1_ip.pem
plugins.security.ssl.http.pemkey_filepath: /etc/opensearch/node1-key_ip.pem
plugins.security.ssl.http.pemtrustedcas_filepath: /etc/opensearch/root-ca.pem
plugins.security.allow_default_init_securityindex: true
plugins.security.authcz.admin_dn:
  - 'CN=A,OU=UNIT,O=ORG,L=TORONTO,ST=ONTARIO,C=CA'
plugins.security.nodes_dn:
  - 'CN=192.168.3.101,OU=AXI,O=AXI,L=PARIS,ST=FRANCE,C=FR'
  - 'CN=192.168.3.106,OU=AXI,O=AXI,L=PARIS,ST=FRANCE,C=FR'
plugins.security.audit.type: internal_opensearch
plugins.security.enable_snapshot_restore_privilege: true
plugins.security.check_snapshot_restore_write_privileges: true
plugins.security.restapi.roles_enabled: ["all_access", "security_rest_api_access"]

```

There’s probably mistakes, but at the moment it’s the only method to get all nodes seeing each other.

```auto
[root@localhost opensearch]# curl -XGET https://192.168.3.101:9200/_cat/nodes?v -u 'admin: ******' --insecure
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role node.roles cluster_manager name
192.168.3.101 15 34 0 0.15 0.07 0.07 dm cluster_manager,data * cluster
192.168.3.106 13 67 0 0.03 0.07 0.10 d data - node1
[root@localhost opensearch]#

```

---

_[View the full topic](https://forum.opensearch.org/t/opensearch-cluster-opensearch-security-not-initialized/22715)._
