Hello,
I do not have the commands with which I performed the installation.
The certificates are intact, only the agent was rewritten in the previous version when instead of updating I gave install, since this began to present the problem.
I need the agent that is in the fleet server to enroll again so that the other agents are online.
I generated a new service token
I share what I have executed and the errors that I see at the moment.
sudo /opt/elastic-agent-8.18.1-linux-x86_64/elastic-agent install \
--url="https://172.26.6.39:5601" \
--fleet-server-es="https://172.26.6.37:9200" \
--fleet-server-service-token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
--fleet-server-policy="fleet-server-policy" \
--fleet-server-es-ca-trusted-fingerprint="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
--fleet-server-host="172.26.6.41" \
--fleet-server-port=8220 \
--fleet-server-cert="/etc/certs/elacluster/fleetserver.crt" \
--fleet-server-cert-key="/etc/certs/elacluster/fleetserver.key"
Elastic Agent will be installed at /opt/Elastic/Agent and will run as a service. Do you want to continue? [Y/n]:Y
[=== ] Service Started [10s] Elastic Agent successfully installed, starting enrollment.
[====] Waiting For Enroll... [12s] {"log.level":"info","@timestamp":"2025-05-29T10:45:38.325-0500","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":495},"message":"Restarting agent daemon, attempt 0","ecs.version":"1.6.0"}
[ =] Waiting For Enroll... [14s] {"log.level":"info","@timestamp":"2025-05-29T10:45:40.330-0500","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.waitForFleetServer.func1","file.name":"cmd/enroll_cmd.go","file.line":809},"message":"Waiting for Elastic Agent to start Fleet Server","ecs.version":"1.6.0"}
[ ] Waiting For Enroll... [18s] {"log.level":"info","@timestamp":"2025-05-29T10:45:44.337-0500","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.waitForFleetServer.func1","file.name":"cmd/enroll_cmd.go","file.line":823},"message":"Fleet Server - Running on policy with Fleet Server integration: fleet-server-policy; missing config fleet.agent.id (expected during bootstrap process)","ecs.version":"1.6.0"}
[ =] Waiting For Enroll... [18s] {"log.level":"info","@timestamp":"2025-05-29T10:45:44.359-0500","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":532},"message":"Starting enrollment to URL: https://172.26.6.39:5601/","ecs.version":"1.6.0"}
[ ===] Waiting For Enroll... [18s] {"log.level":"info","@timestamp":"2025-05-29T10:45:44.597-0500","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":538},"message":"1st enrollment attempt failed, retrying enrolling to URL: https://172.26.6.39:5601/ with exponential backoff (init 5s, max 10m0s)","ecs.version":"1.6.0"}
{"log.level":"warn","@timestamp":"2025-05-29T10:45:44.597-0500","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":557},"message":"Enrollment failed: fail to execute request to fleet-server: status code: 404, fleet-server returned an error: Not Found, message: Not Found","ecs.version":"1.6.0"}
Error: fail to enroll: fail to execute request to fleet-server: status code: 404, fleet-server returned an error: Not Found, message: Not Found
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.18/fleet-troubleshooting.html
[====] Uninstalled [19s] Error uninstalling. Printing logs
2025-05-29T15:45:44.839Z DEBUG [install] Loaded configuration from /opt/elastic-agent-8.18.1-linux-x86_64/elastic-agent.yml
2025-05-29T15:45:44.839Z DEBUG [install] Merged configuration from /opt/elastic-agent-8.18.1-linux-x86_64/elastic-agent.yml into result
2025-05-29T15:45:44.839Z DEBUG [install] Merged all configuration files from [/opt/elastic-agent-8.18.1-linux-x86_64/elastic-agent.yml], no external input files
2025-05-29T15:45:44.927Z DEBUG [install] Loaded configuration from /opt/elastic-agent-8.18.1-linux-x86_64/elastic-agent.yml
2025-05-29T15:45:44.927Z DEBUG [install] Merged configuration from /opt/elastic-agent-8.18.1-linux-x86_64/elastic-agent.yml into result
2025-05-29T15:45:44.927Z DEBUG [install] Merged all configuration files from [/opt/elastic-agent-8.18.1-linux-x86_64/elastic-agent.yml], no external input files
2025-05-29T15:45:44.927Z DEBUG [install.composable] Starting controller for composable inputs
2025-05-29T15:45:44.927Z DEBUG [install.composable] Started controller for composable inputs
2025-05-29T15:45:44.927Z DEBUG [install.composable] Computing new variable state for composable inputs
2025-05-29T15:45:44.927Z DEBUG [install.composable] Stopping controller for composable inputs
2025-05-29T15:45:44.927Z DEBUG [install.composable] Stopped controller for composable inputs
Error: enroll command failed for unknown reason: exit status 1
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.18/fleet-troubleshooting.html