Elasticsearch 7.9.3 http 401

The production environment uses elasticsearch 7.9.3 and uses xpack authentication as basic auth,When we were doing a master-slave cluster switch drill, we found a large number of authentication exception logs http 401, The actual account authorization is normal.This is a production environment, it happens occasionally many times, I'm looking for help
You can shut down all cluster nodes and restart them to reproduce the HTTP 401 error. You can also switch the domain name from the primary cluster to the backup cluster to reproduce the HTTP 401 error.
1、the service code log was Caused by: co.elastic.clients.elasticsearch._types.ElasticsearchException: [es/search] failed: [security_exception] ation [indices:data/read/search] is unauthorized for user [jxsarvr_es]
2、The load log is as follows: "status": 401,"upstream_status": 401

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.