We installed OpenSearch on 4 VMs(1 coordinating node, 1 master node and 2 data nodes) and according to documentation https://opensearch.org/docs/latest/opensearch/cluster/

when we login to OpenSearch URL or via curl, we are getting following msg:

e.g. [apm@IR-APM-DEV-MN1 config]$ curl -XGET https:// :9200/_cat/plugins?v -u 'admin:admin' --insecure

OpenSearch Security not initialized.

According to it and msg we saw “[opensearch-master] Not yet initialized (you may need to run securityadmin)" , we executed securityadmin script as follows:

./securityadmin.sh -cd ../securityconfig/ -nhnv -cacert ../../../config/root-ca.pem -cert ../../../config/kirk.pem -key ../../../config/kirk-key.pem -h -cn apm-cluster-1 -arc -diagnose

And got following error msg for example:

Will update '_doc/config' with ../securityconfig/config.yml FAIL: Configuration for 'config' failed because of UnavailableShardsException[[.opendistro_security][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[.opendistro_security][0]] containing [index {[.opendistro_security][_doc][config], source[n/a, actual length: [3.7kb], max length: 2kb]}] and a refresh]] ....

Can someone advise if any suggestions to overcome those errors? (primary shard is not active Timeout / increase max length )

Thanks, Noam

1

There are 1 best solutions below

0
On

simply we can disable the security method:

cd /path/to/opensearch-1.2.4

sudo nano config/opensearch.yml

Add the below line :-

plugins.security.disabled: true

If not try this link generate key and follow the given steps in the official.

https://opensearch.org/docs/latest/opensearch/install/tar/

Thank You.