Error "illegal base64 data at input byte 56" when enroll elastic-agent

Can't enroll elastic-agent in Fleet.
When I run elastic-agent with docker compose then I get this errors:
{"log.level":"info","@timestamp":"2023-09-21T14:02:42.544Z","message":"HTTP request error","component":{"binary":"fleet-server","dataset":"elastic_agent.fleet_server","id":"fleet-server-default","type":"fleet-server"},"log":{"source":"fleet-server-default"},"service.name":"fleet-server","server.address":"","error.message":"illegal base64 data at input byte 56","ecs.version":"1.6.0","event.duration":42553,"http.request.id":"01HAW0SMF970DGRRMVNF02R28V","http.response.status_code":500,"ecs.version":"1.6.0"}
...


Error: fail to enroll: fail to execute request to fleet-server: status code: 500, fleet-server returned an error: BadRequest, message: illegal base64 data at input byte 56

What can I try to resolve the error?

Resolved.
The reason for the erro was that I didn't copy last 2 characters '==' in an enrollment token.

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