Fleet Admin user is invalid

I'm trying to enroll an agent using fleet, but seems there is something wrong with the api_key.
Is there a was how to initiate again the fleet setup (including user and role)?
How could be below mentioned error be solved?
Latest version 7.10.2 is used.

Details:
When starting an agent with fleet enroll:

    Error: fail to enroll: fail to execute request to Kibana: Status code: 400, Kibana returned an error: Bad Request, message: Fleet Admin user is invalid: [security_exception] unable to authenticate user [fleet_enroll] for REST request [/_security/api_key], with { header={ WWW-Authenticate={ 0="Basic realm=\"security\" charset=\"UTF-8\"" & 1="Bearer realm=\"security\"" & 2="ApiKey" } } }
    Error: enroll command failed with exit code: 1

When generating new enrollment token following error appears:

    Fleet Admin user is invalid: [security_exception] unable to authenticate user [fleet_enroll] for REST request [/_security/api_key], with { header={ WWW-Authenticate={ 0="Basic realm=\"security\" charset=\"UTF-8\"" & 1="Bearer realm=\"security\"" & 2="ApiKey" } } }

Thanks!

Hey @Robo ,

You can probably fix this by removing the default output

POST /.kibana/_delete_by_query
{
  "query": {
    "bool": {
      "must": [
        {
          "terms": {
            "type": [
              "ingest-outputs"
            ]
          }
        }
      ]
    }
  }
}

Then restarting Kibana and setup Fleet again from the UI should do the job.

Best,
Oleg

Thanks! Work as a charm. Also agent enrollment is working now without issues.
Maybe this can be added into common problems troubleshooting.

Glad it helped! That's a good idea, let me check with the relevant team if they can include this.

Best,
Oleg

1 Like

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