-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MAC15]: Agent doesn't come up on Fleet UI on reboot after running install command with --delay-enroll
.
#5561
Comments
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
@muskangulati-qasource Please review. |
Secondary review on this ticket is Done! |
The logs say agent is trying to enroll but can't because the token is not valid UTF-8 text: My first suspicion is the token wasn't provided to the agent correctly (missing some part of it perhaps, the trailing {"log.level":"warn","@timestamp":"2024-09-19T07:26:59.413Z","log.logger":"transport","log.origin":{"function":"github.com/elastic/elastic-agent-libs/transport/httpcommon.(*HTTPTransportSettings).RoundTripper.NetDialer.TestNetDialer.func3","file.name":"transport/tcp.go","file.line":53},"message":"DNS lookup failure \"af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com\": lookup af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com: no such host","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-09-19T07:26:59.413Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":524},"message":"1st enrollment attempt failed, retrying enrolling to URL: https://af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com:443/ with exponential backoff (init 1s, max 10s)","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-09-19T07:26:59.413Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.tryDelayEnroll","file.name":"cmd/run.go","file.line":583},"message":"failed to perform delayed enrollment (will try again): fail to enroll: fail to execute request to fleet-server: lookup af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com: no such host","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-09-19T07:26:59.678Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":518},"message":"Starting enrollment to URL: https://af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com:443/","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"warn","@timestamp":"2024-09-19T07:26:59.881Z","log.logger":"transport","log.origin":{"function":"github.com/elastic/elastic-agent-libs/transport/httpcommon.(*HTTPTransportSettings).RoundTripper.NetDialer.TestNetDialer.func3","file.name":"transport/tcp.go","file.line":53},"message":"DNS lookup failure \"af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com\": lookup af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com: no such host","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-09-19T07:26:59.881Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":524},"message":"1st enrollment attempt failed, retrying enrolling to URL: https://af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com:443/ with exponential backoff (init 1s, max 10s)","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-09-19T07:26:59.881Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.tryDelayEnroll","file.name":"cmd/run.go","file.line":583},"message":"failed to perform delayed enrollment (will try again): fail to enroll: fail to execute request to fleet-server: lookup af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com: no such host","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-09-19T07:27:00.555Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":518},"message":"Starting enrollment to URL: https://af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com:443/","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-09-19T07:27:00.906Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":524},"message":"1st enrollment attempt failed, retrying enrolling to URL: https://af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com:443/ with exponential backoff (init 1s, max 10s)","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-09-19T07:27:00.906Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.tryDelayEnroll","file.name":"cmd/run.go","file.line":583},"message":"failed to perform delayed enrollment (will try again): fail to enroll: fail to execute request to fleet-server: dial tcp 35.235.72.223:443: connect: network is unreachable","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-09-19T07:27:01.463Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":518},"message":"Starting enrollment to URL: https://af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com:443/","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-09-19T07:27:01.668Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":524},"message":"1st enrollment attempt failed, retrying enrolling to URL: https://af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com:443/ with exponential backoff (init 1s, max 10s)","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-09-19T07:27:01.668Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.tryDelayEnroll","file.name":"cmd/run.go","file.line":583},"message":"failed to perform delayed enrollment (will try again): fail to enroll: fail to execute request to fleet-server: dial tcp 35.235.72.223:443: connect: network is unreachable","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-09-19T07:27:01.937Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":518},"message":"Starting enrollment to URL: https://af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com:443/","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-09-19T07:27:02.976Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":524},"message":"1st enrollment attempt failed, retrying enrolling to URL: https://af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com:443/ with exponential backoff (init 1s, max 10s)","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-09-19T07:27:02.976Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.tryDelayEnroll","file.name":"cmd/run.go","file.line":583},"message":"failed to perform delayed enrollment (will try again): fail to enroll: fail to execute request to fleet-server: status code: 401, fleet-server returned an error: ErrInvalidToken, message: token not valid utf8","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-09-19T07:27:03.634Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":518},"message":"Starting enrollment to URL: https://af15cb7cb15d4a06bfbeb5b6426134e6.fleet.us-west2.gcp.elastic-cloud.com:443/","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"} |
Hi @cmacknz Thank you for looking into this issue. Observations:
Hence we are closing and marking this issue as QA:Validated. |
Kibana Build details:
Artifact: https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.15.1-darwin-x86_64.tar.gz
Host: MAC15
Preconditions:
Steps to reproduce:
--delay-enroll
.NOTE:
Expected Result:
Agent should come up on Fleet UI on reboot after running install command with
--delay-enroll
.Agent Directory:
curl -L -H 'Authorization: b480faf457fc2ab0' -o 'agent.zip' https://upload.elastic.co/d/fe08154ec7ce49a60f17ce26f5cceae7b372253a3430d8266c879b535cacf222
Related Ticket:
https://github.com/elastic/ingest-dev/issues/4032
The text was updated successfully, but these errors were encountered: