no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null

92 views
Skip to first unread message

Raguram Reddy

unread,
May 2, 2025, 2:41:20 AM5/2/25
to Wazuh | Mailing List
I am unable to set the replica to 0 in my wazuh and while doing that I am getting the error



PUT /.opendistro-alerting-config/_settings
{
  "number_of_replicas": 0
}

{
  "error": {
    "root_cause": [
      {
        "type": "security_exception",
        "reason": "no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null]"
      }
    ],
    "type": "security_exception",
    "reason": "no permissions for [] and User [name=admin, backend_roles=[admin], requestedTenant=null]"
  },
  "status": 403
}


Kindly help me how to resolve  this issue 

Stuti Gupta

unread,
May 2, 2025, 3:49:47 AM5/2/25
to Wazuh | Mailing List
Hi  Raguram Reddy

If you search that index on your "Dashboard menu -> Index management -> Indices" section, do you see the replicas count on "1"?    If so, you can click on the index name and in the settings section change this from 1 to 0 and then save changes. Does it return an error as well?

Or you create OpenSearch ISM, deployed via dev tools

PUT _plugins/_ism/policies/set_opendistro_replica_to_0
{
    "policy": {
        "policy_id": "Opendistro replica to 0",
        "description": "Set replica count for .opendistro-* indices to 0",
        "default_state": "index_created",
        "states": [
            {
                "name": "index_created",
                "actions": [],
                "transitions": [
                    {
                        "state_name": "replica_0",
                        "conditions": {
                            "min_index_age": "0ms"
                        }
                    }
                ]
            },
            {
                "name": "replica_0",
                "actions": [
                    {
                        "retry": {
                            "count": 3,
                            "backoff": "exponential",
                            "delay": "1m"
                        },
                        "replica_count": {
                            "number_of_replicas": 0
                        }
                    }
                ],
                "transitions": []
            }
        ],
        "ism_template": [
            {
                "index_patterns": [
                    ".opendistro-*"
                ],
                "priority": 1
            }
        ]
    }
}

After applying the newly created ISM to .opendistro* indices replica count will successfully changed from 1 to 0. It takes a few minutes to execute the policy after applying it to index.

Please let me know if this is helpful.

Raguram Reddy

unread,
May 2, 2025, 4:45:33 AM5/2/25
to Wazuh | Mailing List
{
  "error": {
    "root_cause": [
      {
        "type": "version_conflict_engine_exception",
        "reason": "[set_opensearch_replica_to_0]: version conflict, document already exists (current version [1])",
        "index": ".opendistro-ism-config",
        "shard": "0",
        "index_uuid": "6Gh5XruJTTGIEVXlUv6Rxg"
      }
    ],
    "type": "version_conflict_engine_exception",
    "reason": "[set_opensearch_replica_to_0]: version conflict, document already exists (current version [1])",
    "index": ".opendistro-ism-config",
    "shard": "0",
    "index_uuid": "6Gh5XruJTTGIEVXlUv6Rxg"
  },
  "status": 409
}

getting this error in dev tools and I am facing same kind of error like forbidden in indexes also 

Stuti Gupta

unread,
May 9, 2025, 8:07:34 AM5/9/25
to Wazuh | Mailing List

Could you please check if there is already an existing ISM policy with the same policy ID? If so, try running the command again using a different policy ID, such as:

PUT _plugins/_ism/policies/set_opendistro_replica_to_null
Reply all
Reply to author
Forward
0 new messages