# Errors at opensearch startup

**URL:** <https://forum.opensearch.org/t/errors-at-opensearch-startup/16537>\
**Category:** OpenSearch Dashboards\
**Tags:** troubleshoot, install\
**Created:** [November 2, 2023, 10:41pm UTC](https://forum.opensearch.org/t/errors-at-opensearch-startup/16537 "2023-11-02T22:41:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miky](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Miky](https://forum.opensearch.org/u/Miky)\
**Post date:** [November 2, 2023, 10:41pm UTC](https://forum.opensearch.org/t/errors-at-opensearch-startup/16537/1 "2023-11-02T22:41:20Z")

</div>

Opensearch: 2.10

Hello,  
When I start opensearch I have these errors  
[2023-11-02T23:23:57,435][INFO][o.o.s.l.LogTypeService] [node1] Loading builtin types!  
[2023-11-02T23:23:57,498][INFO][o.o.s.l.LogTypeService] [node1] Indexing [418] fieldMappingDocs from logTypes: 23  
[2023-11-02T23:23:57,660][INFO][o.o.s.l.LogTypeService] [node1] Loading builtin types!  
[2023-11-02T23:23:57,661][INFO][o.o.s.l.LogTypeService] [node1] Indexing [418] fieldMappingDocs from logTypes: 23  
[2023-11-02T23:23:57,739][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [node1] Failure No shard available for [org.opensearch.action.get.MultiGetShardRequest@3c3547a9] retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro\_security)  
[2023-11-02T23:23:57,740][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [node1] Failure No shard available for [org.opensearch.action.get.MultiGetShardRequest@3c3547a9] retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro\_security)  
[2023-11-02T23:23:57,740][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [node1] Failure No shard available for [org.opensearch.action.get.MultiGetShardRequest@3c3547a9] retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro\_security)  
[2023-11-02T23:23:57,741][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [node1] Failure No shard available for [org.opensearch.action.get.MultiGetShardRequest@3c3547a9] retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro\_security)  
[2023-11-02T23:23:57,741][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [node1] Failure No shard available for [org.opensearch.action.get.MultiGetShardRequest@3c3547a9] retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro\_security)  
[2023-11-02T23:23:57,742][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [node1] Failure No shard available for [org.opensearch.action.get.MultiGetShardRequest@3c3547a9] retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro\_security)  
[2023-11-02T23:23:57,742][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [node1] Failure No shard available for [org.opensearch.action.get.MultiGetShardRequest@3c3547a9] retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro\_security)  
[2023-11-02T23:23:57,742][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [node1] Failure No shard available for [org.opensearch.action.get.MultiGetShardRequest@3c3547a9] retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro\_security)  
[2023-11-02T23:23:57,743][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [node1] Failure No shard available for [org.opensearch.action.get.MultiGetShardRequest@3c3547a9] retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro\_security)  
[2023-11-02T23:23:57,744][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [node1] Failure No shard available for [org.opensearch.action.get.MultiGetShardRequest@3c3547a9] retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro\_security)

I don’t understand where the problem comes from

# curl -X GET -u admin:admin “[https://localhost:9200/.opendistro\_security?pretty](https://localhost:9200/.opendistro_security?pretty)”

{  
“.opendistro\_security” : {  
“aliases” : { },  
“mappings” : {  
“properties” : {  
“actiongroups” : {  
“type” : “text”,  
“fields” : {  
“keyword” : {  
“type” : “keyword”,  
“ignore\_above” : 256  
}  
}  
},  
“audit” : {  
“type” : “text”,  
“fields” : {  
“keyword” : {  
“type” : “keyword”,  
“ignore\_above” : 256  
}  
}  
},  
“config” : {  
“type” : “text”,  
“fields” : {  
“keyword” : {  
“type” : “keyword”,  
“ignore\_above” : 256  
}  
}  
},  
“internalusers” : {  
“type” : “text”,  
“fields” : {  
“keyword” : {  
“type” : “keyword”,  
“ignore\_above” : 256  
}  
}  
},  
“nodesdn” : {  
“type” : “text”,  
“fields” : {  
“keyword” : {  
“type” : “keyword”,  
“ignore\_above” : 256  
}  
}  
},  
“roles” : {  
“type” : “text”,  
“fields” : {  
“keyword” : {  
“type” : “keyword”,  
“ignore\_above” : 256  
}  
}  
},  
“rolesmapping” : {  
“type” : “text”,  
“fields” : {  
“keyword” : {  
“type” : “keyword”,  
“ignore\_above” : 256  
}  
}  
},  
“tenants” : {  
“type” : “text”,  
“fields” : {  
“keyword” : {  
“type” : “keyword”,  
“ignore\_above” : 256  
}  
}  
},  
“whitelist” : {  
“type” : “text”,  
“fields” : {  
“keyword” : {  
“type” : “keyword”,  
“ignore\_above” : 256  
}  
}  
}  
}  
},  
“settings” : {  
“index” : {  
“replication” : {  
“type” : “DOCUMENT”  
},  
“number\_of\_shards” : “1”,  
“auto\_expand\_replicas” : “0-all”,  
“provided\_name” : “.opendistro\_security”,  
“creation\_date” : “1698884762924”,  
“number\_of\_replicas” : “0”,  
“uuid” : “hEw67cl8S1mdDu0eku04hg”,  
“version” : {  
“created” : “136317827”  
}  
}  
}  
}  
}

# curl -X GET -u admin:admin “localhost:9200/\_cat/shards?v”

index shard prirep state docs store ip node  
.plugins-ml-config 0 p STARTED 1 3.9kb 127.0.0.1 node1  
.opensearch-observability 0 p STARTED 0 208b 127.0.0.1 node1  
.opensearch-sap-log-types-config 0 p STARTED 127.0.0.1 node1  
myindex-000001 0 p STARTED 1 4.2kb 127.0.0.1 node1  
.opendistro\_security 0 p STARTED 9 31.8kb 127.0.0.1 node1  
.kibana\_1 0 p STARTED 0 208b 127.0.0.1 node1

# curl -X GET -u admin:admin “[https://localhost:9200/\_cluster/health?pretty](https://localhost:9200/_cluster/health?pretty)”

{  
“cluster\_name” : “localhost”,  
“status” : “green”,  
“timed\_out” : false,  
“number\_of\_nodes” : 1,  
“number\_of\_data\_nodes” : 1,  
“discovered\_master” : true,  
“discovered\_cluster\_manager” : true,  
“active\_primary\_shards” : 6,  
“active\_shards” : 6,  
“relocating\_shards” : 0,  
“initializing\_shards” : 0,  
“unassigned\_shards” : 0,  
“delayed\_unassigned\_shards” : 0,  
“number\_of\_pending\_tasks” : 0,  
“number\_of\_in\_flight\_fetch” : 0,  
“task\_max\_waiting\_in\_queue\_millis” : 0,  
“active\_shards\_percent\_as\_number” : 100.0  
}

Thank you

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [November 3, 2023, 12:47am UTC](https://forum.opensearch.org/t/errors-at-opensearch-startup/16537/2 "2023-11-03T00:47:36Z")

</div>

@Miky How do you deploy your cluster?  
Do those ERRORs stop after a while?

How long did you wait for a cluster to stabilize?  
Do you see a message in the logs “Node \<node\_name\> initialized”?

Please share your config.yml and opensearch.yml files.

---

<div class="post-metadata">

**Author:** ![Miky](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Miky](https://forum.opensearch.org/u/Miky)\
**Post date:** [November 3, 2023, 1:25am UTC](https://forum.opensearch.org/t/errors-at-opensearch-startup/16537/3 "2023-11-03T01:25:41Z")

</div>

Hello Pablo,

I see these errors during the startup but it stops, I see only once.  
I see them in /var/log/srv.mydomain.org.log  
I start the service at 02:11:12, the errors are displayed at 02:11:39 and it ends writing many logs at 02:11:53, then it wrote a few logs during 4 minutes.

$ cat config.yml  
\_meta:  
type: “config”  
config\_version: 2

config:  
dynamic:  
# Set filtered\_alias\_mode to ‘disallow’ to forbid more than 2 filtered aliases per index  
# Set filtered\_alias\_mode to ‘warn’ to allow more than 2 filtered aliases per index but warns about it (default)  
# Set filtered\_alias\_mode to ‘nowarn’ to allow more than 2 filtered aliases per index silently  
#filtered\_alias\_mode: warn  
#do\_not\_fail\_on\_forbidden: false  
#kibana:  
# Kibana multitenancy  
#multitenancy\_enabled: true  
#server\_username: kibanaserver  
#index: ‘.kibana’  
http:  
anonymous\_auth\_enabled: false  
xff:  
enabled: false  
#internalProxies: ‘192.168.0.10|192.168.0.11’ # regex pattern  
internalProxies: ‘.\*’ # trust all internal proxies, regex pattern  
authc:  
basic\_internal\_auth\_domain:  
description: “Authenticate via HTTP Basic against internal users database”  
http\_enabled: true  
transport\_enabled: true  
order: 4  
http\_authenticator:  
type: basic  
challenge: true  
authentication\_backend:  
type: intern

$ cat  
cluster.name: srv. domain. org  
node.name: node1  
node.max\_local\_storage\_nodes: 2  
path.data: /var/opensearch/  
path.logs: /var/log/opensearch/  
network.host: _local_  
http.port: 9200  
discovery.type: single-node  
gateway.auto\_import\_dangling\_indices: true  
http.compression: false

plugins:  
security:  
compliance.salt: Salt  
ssl:  
transport:  
enabled: true  
pemcert\_filepath: cert.crt  
pemkey\_filepath: key.key.pkcs  
pemtrustedcas\_filepath: CA.crt  
enforce\_hostname\_verification: false  
http:  
enabled: true  
pemcert\_filepath: cert.crt  
pemkey\_filepath: key.key.pkcs  
pemtrustedcas\_filepath: CA.crt

plugins.security.authcz.admin\_dn:

- [EMAILADDRESS=mail@domain.org](mailto:EMAILADDRESS=mail@domain.org),[CN=srv.domain.org](http://CN=srv.domain.org),OU=Corp1,O=Corp,L=City,ST=State,C=CR

plugins.security.roles\_mapping\_resolution: MAPPING\_ONLY

plugins.query.datasources.encryption.masterkey: “XXXXXXXXXX”

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [November 3, 2023, 12:55pm UTC](https://forum.opensearch.org/t/errors-at-opensearch-startup/16537/4 "2023-11-03T12:55:47Z")

</div>

@Miky In that case this is expected. The security plugin causes the errors. The plugin is initiated after the OpenSearch service is started. It needs around a minute or less to fully start and stabilize.  
You can ignore these errors.

It would be a different story if these errors would continue infinitely. Then it could mean that your security config files are incorrect.

However, according to your previous outputs, you can successfully connect to the cluster using credentials. This means that the security plugin has been successfully initiated.

Regarding your APIs.

```auto
curl -X GET -u admin:admin “https://localhost:9200/.opendistro_security?pretty”

```

To see the content of the .opendistro\_security index you must use admin certificates defined in the admin\_dn of the opensearch.yml.  
Alternatively, you can use the following API calls to check the content of the security configuration.

i.e.

```auto
Security config
curl --insecure -X GET -u admin:admin "https://localhost:9200/_plugins/_security/api/securityconfig?pretty"

Internal users
curl --insecure -X GET -u admin:admin "https://localhost:9200/_plugins/_security/api/internalusers?pretty"

```

---

<div class="post-metadata">

**Author:** ![Miky](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Miky](https://forum.opensearch.org/u/Miky)\
**Post date:** [November 3, 2023, 5:48pm UTC](https://forum.opensearch.org/t/errors-at-opensearch-startup/16537/5 "2023-11-03T17:48:03Z")

</div>

Hello Pablo and thank you for your answers,

Yes indeed I’m able to retrieve the .opendistro\_security index

`curl -X GET -u admin:admin “https://localhost:9200/.opendistro_security?pretty”`

```auto
{
  ".opendistro_security" : {
    "aliases" : { },
    "mappings" : {
      "properties" : {
        "actiongroups" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "audit" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "config" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "internalusers" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "nodesdn" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "roles" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "rolesmapping" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "tenants" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "whitelist" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        }
      }
    },
    "settings" : {
      "index" : {
        "replication" : {
          "type" : "DOCUMENT"
        },
        "number_of_shards" : "1",
        "auto_expand_replicas" : "0-all",
        "provided_name" : ".opendistro_security",
        "creation_date" : "1698884762924",
        "number_of_replicas" : "0",
        "uuid" : "hEw67cl8S1mdDu0eku04hg",
        "version" : {
          "created" : "136317827"
        }
      }
    }
  }
}

```

```auto
Security config
curl --insecure -X GET -u admin:admin "https://localhost:9200/_plugins/_security/api/securityconfig?pretty"
{
  "status" : "FORBIDDEN",
  "message" : "No permission to access REST API: Role based access not enabled.. No client TLS certificate found in request"
}

```

I’ll solve the REST API problems.

```auto
Internal users
curl --insecure -X GET -u admin:admin "https://localhost:9200/_plugins/_security/api/internalusers?pretty"
{
  "status" : "FORBIDDEN",
  "message" : "No permission to access REST API: Role based access not enabled.. No client TLS certificate found in request"
}

```

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [November 3, 2023, 5:54pm UTC](https://forum.opensearch.org/t/errors-at-opensearch-startup/16537/6 "2023-11-03T17:54:31Z")

</div>

@Miky Check your opensearch.yml file. You should have the following line in that file.

```auto
plugins.security.restapi.roles_enabled: ["all_access", "security_rest_api_access"]

```

Any user with the listed roles will have access to API calls.

This API will show you just the structure of the index.

```auto
curl -X GET -u admin:admin “https://localhost:9200/.opendistro_security?pretty”

```

To see the content of the index you need to use \_search.

```auto
curl -X GET --cert <admin.pem> --key <admin.key> “https://localhost:9200/.opendistro_security/_search?pretty”

```

---

<div class="post-metadata">

**Author:** ![Miky](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Miky](https://forum.opensearch.org/u/Miky)\
**Post date:** [November 3, 2023, 6:21pm UTC](https://forum.opensearch.org/t/errors-at-opensearch-startup/16537/7 "2023-11-03T18:21:45Z")

</div>

Thank you for this plugin command, I’m able to execute the previous queries

```auto
curl --insecure -X GET -u admin:admin "https://localhost:9200/_plugins/_security/api/internalusers?pretty"
{
  "logstash" : {
    "hash" : "",
    "reserved" : false,
    "hidden" : false,
    "backend_roles" : [
      "logstash"
    ],
    "attributes" : { },
    "description" : "Demo logstash user, using external role mapping",
    "opendistro_security_roles" : [],
    "static" : false
  },
  "admin" : {
    "hash" : "",
    "reserved" : true,
    "hidden" : false,
    "backend_roles" : [
      "superuser"
    ],
    "attributes" : { },
    "description" : "Demo admin user",
    "opendistro_security_roles" : [],
    "static" : false
  },
  "kibanaserver" : {
    "hash" : "",
    "reserved" : true,
    "hidden" : false,
    "backend_roles" : [],
    "attributes" : { },
    "description" : "Demo OpenSearch Dashboards user",
    "opendistro_security_roles" : [],
    "static" : false
  },
  "syslogng" : {
    "hash" : "",
    "reserved" : false,
    "hidden" : false,
    "backend_roles" : [
      "logstash"
    ],
    "attributes" : { },
    "description" : "Utilisateur Syslog NG permettant l'ecriture des Syslog dans Opensearch",
    "opendistro_security_roles" : [],
    "static" : false
  }
}

```

```auto
curl --insecure -X GET -u admin:admin "https://localhost:9200/_plugins/_security/api/securityconfig?pretty"
{
  "config" : {
    "dynamic" : {
      "filtered_alias_mode" : "warn",
      "disable_rest_auth" : false,
      "disable_intertransport_auth" : false,
      "respect_request_indices_options" : false,
      "kibana" : {
        "multitenancy_enabled" : true,
        "private_tenant_enabled" : true,
        "default_tenant" : "",
        "server_username" : "kibanaserver",
        "index" : ".kibana"
      },
      "http" : {
        "anonymous_auth_enabled" : false,
        "xff" : {
          "enabled" : false,
          "internalProxies" : ".*",
          "remoteIpHeader" : "X-Forwarded-For"
        }
      },
      "authc" : {
        "basic_internal_auth_domain" : {
          "http_enabled" : true,
          "transport_enabled" : true,
          "order" : 4,
          "http_authenticator" : {
            "challenge" : true,
            "type" : "basic",
            "config" : { }
          },
          "authentication_backend" : {
            "type" : "intern",
            "config" : { }
          },
          "description" : "Authenticate via HTTP Basic against internal users database"
        }
      },
      "authz" : { },
      "auth_failure_listeners" : { },
      "do_not_fail_on_forbidden" : false,
      "multi_rolespan_enabled" : true,
      "hosts_resolver_mode" : "ip-only",
      "do_not_fail_on_forbidden_empty" : false
    }
  }
}

```

```auto

```
