AAF dashboard shown errors 400 search_phrase_execution_exception

  • 7025148
  • 10-Jun-2021
  • 10-Jun-2021

Environment

Advanced Authentication 6.3.4.1

Situation

After upgrade from lowest version up to AAF 6.3.4.1, dashboard shown errors "400 search_phrase_execution_exception".

Resolution

It is possible to re-initialize indexes from the scratch as workaround. Please pay attention that logon statistics will be lost. Here is details steps with output examples:


1. Logon to AAF appliance command line as root.

2. Find elasticsearch password.

 - Go to docker «docker exec -ti aaf_aucore_1 bash»

 - Grep password from config file «cat $AUCORE_DATA/es_data.json | grep es»


3.Remove index and reconfigure elasticsearch
 - execute «curl -k -XDELETE --user elastic:<YOUR_ES_PASSWORD> 'https://localhost:9200/aucore-stats-2?pretty'»

Output example

curl -k -XDELETE --user elastic:c710843bca1a636d59ad936a98f7405a 'https://localhost:9200/aucore-stats-2?pretty'

{

  "acknowledged" : true

}

 - Open docker bash «docker exec -ti aaf_aucore_1 bash»
 - Execute script «/opt/penv/bin/au-setup-reporting $AUCORE_INI» to reconfigure elasticsearch, please note that ALL data related with dashboard and reporting will be lost.

Output example

c3c660934d1f:/opt/AuCore #  /opt/penv/bin/au-setup-reporting $AUCORE_INI

2021-06-02 13:21:27 DEBUG [aucore.uwsgi] postfork p=715 f=init_fips_mode

2021-06-02 13:21:27 DEBUG [urllib3.connectionpool] Starting new HTTPS connection (1): 127.0.0.1:9200

2021-06-02 13:21:27 DEBUG [urllib3.connectionpool] https://127.0.0.1:9200 "GET /_cluster/health?wait_for_status=yellow HTTP/1.1" 200 397

2021-06-02 13:21:27 INFO  [elasticsearch] GET https://127.0.0.1:9200/_cluster/health?wait_for_status=yellow [status:200 request:0.023s]

2021-06-02 13:21:27 DEBUG [elasticsearch] > None

2021-06-02 13:21:27 DEBUG [elasticsearch] < {"cluster_name":"elasticsearch-default","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":1,"active_shards":1,"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}

2021-06-02 13:21:27 DEBUG [aucore.au.utils.context] new thread WITHOUT context

2021-06-02 13:21:27 DEBUG [urllib3.connectionpool] Starting new HTTPS connection (1): 127.0.0.1:9200

2021-06-02 13:21:28 DEBUG [urllib3.connectionpool] https://127.0.0.1:9200 "PUT /aucore-stats-2 HTTP/1.1" 200 73

2021-06-02 13:21:28 INFO  [elasticsearch] PUT https://127.0.0.1:9200/aucore-stats-2 [status:200 request:1.440s]

2021-06-02 13:21:28 DEBUG [elasticsearch] > {"mappings":{"_doc":{"dynamic_templates":[{"notanalyzed":{"match":"*","match_mapping_type":"string","mapping":{"type":"keyword"}}}],"properties":{"type":{"type":"keyword"},"timestamp":{"type":"date"},"endpoint":{"properties":{"id":{"type":"keyword"},"type":{"type":"keyword"},"name":{"type":"keyword"}}},"user":{"properties":{"id":{"type":"keyword"},"user_name":{"type":"keyword"},"repo_name":{"type":"keyword"},"loginame":{"type":"keyword"}}},"tenant":{"type":"keyword"},"tenant_id":{"type":"keyword"},"server":{"type":"keyword"},"chain":{"properties":{"id":{"type":"keyword"},"name":{"type":"keyword"}}},"method":{"properties":{"name":{"type":"keyword"}}},"event":{"properties":{"id":{"type":"keyword"},"name":{"type":"keyword"}}},"reason":{"type":"keyword"}}}},"warmers":{},"aliases":{}}

2021-06-02 13:21:28 DEBUG [elasticsearch] < {"acknowledged":true,"shards_acknowledged":true,"index":"aucore-stats-2"}

 - reboot AAF server
 - repeat steps for each Master Site server.

Cause

Sometimes indexes might not be migrated during AAF Server upgrade, this causing such error messages on the dashboard.