Elatricsearch (you may need to run securityadmin)Issue

Hello everyone,
After setup the Elasticsearch and Kibana (version 7.2.0), I can get access to the Kibana but not Elasticsearch. It gives me the following error:
[ERROR][c.a.o.s.a.BackendRegistry] [odfe-node1] Not yet initialized (you may need to run securityadmin)

And from the UI the error is: 502 Bad Gateway.

Can anyone help please?

Thanks

Try this

#!/bin/bash
host_ip=$(hostname -I)
cd /usr/share/elasticsearch/plugins/opendistro_security/tools
./securityadmin.sh -h "$host_ip" --accept-red-cluster -rl -icl -nhnv -cacert /etc/elasticsearch/root-ca.pem -cert /etc/elasticsearch/kirk.pem -key /etc/elasticsearch/kirk-key.pem
1 Like

Dear rozmir
Please mark this as solution, if this helps you.
Thanks

Every time Im restarting elasticsearch Ive got errors like this
[ERROR][c.a.o.s.a.BackendRegistry] [node_name] Not yet initialized (you may need to run securityadmin)
I think it`s not good to fix it every time manualy(with script).