Hello,
I have ES 6.0.0 and SG 6-6.0.0-17.beta1 running on a server for more than a year. It’s just a small demo that i play with from time to time, so nobody else has access to it. I had no problems with it for a long time.
I noticed this week that i can’t login anymore. I haven’t done any changes to ES or SG for more than a year. After some debugging it seemed to be because of the old certificates, so i downloaded the new demo certificates. But when i run
./sgadmin.sh -cd …/sgconfig/ -icl -nhnv -cacert root-ca.pem -cert kirk.pem -key kirk-key.pem
``
it says
Search Guard Admin v6
Will connect to localhost:9300 … done
Connected as CN=kirk,OU=client,O=client,L=test,C=de
Contacting elasticsearch cluster ‘searchguard_demo’ and wait for YELLOW clusterstate …
ERR: Timed out while waiting for a green or yellow cluster state.
``
Running
./sgadmin.sh -cn searchguard_demo -cd …/sgconfig/ -nhnv -cacert root-ca.pem -cert kirk.pem -key kirk-key.pem --accept-red-cluster
``
results in
Search Guard Admin v6
Will connect to localhost:9300 … done
Connected as CN=kirk,OU=client,O=client,L=test,C=de
Contacting elasticsearch cluster ‘searchguard_demo’ …
Clustername: searchguard_demo
Clusterstate: RED
Number of nodes: 1
Number of data nodes: 1
searchguard index already exists, so we do not need to create one.
ERR: searchguard index state is RED.
Populate config from /usr/share/elasticsearch/plugins/search-guard-6/sgconfig
Will update ‘config’ with …/sgconfig/sg_config.yml
FAIL: Configuration for ‘config’ failed because of UnavailableShardsException[[searchguard][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[searchguard][0]] containing [index {[searchguard][sg][config], source[n/a, actual length: [3.2kb], max length: 2kb]}] and a refresh]]
Will update ‘roles’ with …/sgconfig/sg_roles.yml
FAIL: Configuration for ‘roles’ failed because of UnavailableShardsException[[searchguard][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[searchguard][0]] containing [index {[searchguard][sg][roles], source[n/a, actual length: [3.6kb], max length: 2kb]}] and a refresh]]
Will update ‘rolesmapping’ with …/sgconfig/sg_roles_mapping.yml
FAIL: Configuration for ‘rolesmapping’ failed because of UnavailableShardsException[[searchguard][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[searchguard][0]] containing [index {[searchguard][sg][rolesmapping], source[{“rolesmapping”:“eyJzZ19hbGxfYWNjZXNzIjp7InJlYWRvbmx5Ijp0cnVlLCJiYWNrZW5kcm9sZXMiOlsiYWRtaW4iXX0sInNnX2xvZ3N0YXNoIjp7ImJhY2tlbmRyb2xlcyI6WyJsb2dzdGFzaCJdfSwic2dfa2liYW5hX3NlcnZlciI6eyJyZWFkb25seSI6dHJ1ZSwidXNlcnMiOlsia2liYW5hc2VydmVyIl19LCJzZ19raWJhbmFfdXNlciI6eyJiYWNrZW5kcm9sZXMiOlsia2liYW5hdXNlciJdfSwic2dfcmVhZGFsbCI6eyJyZWFkb25seSI6dHJ1ZSwiYmFja2VuZHJvbGVzIjpbInJlYWRhbGwiXX0sInNnX21hbmFnZV9zbmFwc2hvdHMiOnsicmVhZG9ubHkiOnRydWUsImJhY2tlbmRyb2xlcyI6WyJzbmFwc2hvdHJlc3RvcmUiXX0sInNnX293bl9pbmRleCI6eyJ1c2VycyI6WyIqIl19fQ==”}]}] and a refresh]]
Will update ‘internalusers’ with …/sgconfig/sg_internal_users.yml
FAIL: Configuration for ‘internalusers’ failed because of UnavailableShardsException[[searchguard][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[searchguard][0]] containing [index {[searchguard][sg][internalusers], source[{“internalusers”:“eyJhZG1pbiI6eyJyZWFkb25seSI6dHJ1ZSwiaGFzaCI6IiQyYSQxMiRWY0NEZ2gyTkRrMDdKR04wcmpHYk0uQWQ0MXFWUi9ZRkpjZ0hwMFVHbnM1SkR5bXYuLlRPRyIsInJvbGVzIjpbImFkbWluIl19LCJsb2dzdGFzaCI6eyJyZWFkb25seSI6dHJ1ZSwiaGFzaCI6IiQyYSQxMiR1MVNoUjRsNHVCUzNVdjU5UGEyeTUuMXVRdVpCclp0bU5mcUIzaU0vLmpMMFhvVjlzZ2hTMiIsInJvbGVzIjpbImxvZ3N0YXNoIl19LCJraWJhbmFzZXJ2ZXIiOnsicmVhZG9ubHkiOnRydWUsImhhc2giOiIkMmEkMTIkNEFjZ0F0M3h3T1dhZEE1czVibEw2ZXYzOU9YRE5obU9lc0VvbzMzZVp0cnEyTjBZclUzSC4ifSwia2liYW5hcm8iOnsicmVhZG9ubHkiOnRydWUsImhhc2giOiIkMmEkMTIkSkpTWE5mVG93ejdVdTV0dFhmZVlwZVlFMGFyQUN2Y3dsUEJTdEIxRi5NSTdmMFU5WjRER0MiLCJyb2xlcyI6WyJraWJhbmF1c2VyIiwicmVhZGFsbCJdfSwicmVhZGFsbCI6eyJoYXNoIjoiJDJhJDEyJGFlNHljd3p3dkx0Wnh3WjgyUm1pRXVuQmJJUGlBbUdaZHVCQWpLTjBUWGR3UUZ0Q3dBUnoyIiwicm9sZXMiOlsicmVhZGFsbCJdfSwic25hcHNob3RyZXN0b3JlIjp7Imhhc2giOiIkMnkkMTIkRHB3bWV0SEt3Z1lub3JiZ2R2T1JDZW52NE5BSzhjUFVnOEFJNnB4TEN1V2YvQUxjMC52N1ciLCJyb2xlcyI6WyJzbmFwc2hvdHJlc3RvcmUiXX19”}]}] and a refresh]]
Will update ‘actiongroups’ with …/sgconfig/sg_action_groups.yml
FAIL: Configuration for ‘actiongroups’ failed because of UnavailableShardsException[[searchguard][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[searchguard][0]] containing [index {[searchguard][sg][actiongroups], source[n/a, actual length: [2.6kb], max length: 2kb]}] and a refresh]]
FAIL: Expected 1 nodes to return response, but got only 0
Done with failures
``
The yml config is
searchguard.ssl.transport.pemkey_filepath: esnode-key.pem
searchguard.ssl.transport.pemtrustedcas_filepath: root-ca.pem
searchguard.ssl.transport.enforce_hostname_verification: false
searchguard.ssl.http.enabled: false
searchguard.ssl.http.pemcert_filepath: esnode.pem
searchguard.ssl.http.pemkey_filepath: esnode-key.pem
searchguard.ssl.http.pemtrustedcas_filepath: root-ca.pem
searchguard.allow_unsafe_democertificates: true
searchguard.allow_default_init_sgindex: true
searchguard.authcz.admin_dn:
- CN=kirk,OU=client,O=client,L=test, C=de
searchguard.audit.type: internal_elasticsearch
searchguard.enable_snapshot_restore_privilege: true
searchguard.check_snapshot_restore_write_privileges: true
searchguard.restapi.roles_enabled: [“sg_all_access”]
cluster.name: searchguard_demo
discovery.zen.minimum_master_nodes: 1
node.max_local_storage_nodes: 3
``
ES logs just say:
[ERROR][c.f.s.a.BackendRegistry ] Not yet initialized (you may need to run sgadmin)
``
Java is 1.8.0_151, OS is Debian GNU/Linux 8.7 (jessie).
Thank you