Skip to content
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

Problem with installing Elastic Agent 8.17 on raspberry pi (Arm64) #6517

Open
pl853 opened this issue Jan 12, 2025 · 1 comment
Open

Problem with installing Elastic Agent 8.17 on raspberry pi (Arm64) #6517

pl853 opened this issue Jan 12, 2025 · 1 comment

Comments

@pl853
Copy link

pl853 commented Jan 12, 2025

Dear Elastic,

When installing elastic 8.17 on my raspberry pi, i get the following error:

sudo ./elastic-agent install --url=https://<>:8220 --enrollment-token=TOKEN --insecure
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  [1m16s] Elastic Agent successfully installed, starting enrollment.
[  ==] Waiting For Enroll...  [1m17s] {"log.level":"warn","@timestamp":"2025-01-12T14:48:32.628+0100","log.logger":"tls","log.origin":{"function":"github.com/elastic/elastic-agent-libs/transport/tlscommon.(*TLSConfig).ToConfig","file.name":"tlscommon/tls_config.go","file.line":107},"message":"SSL/TLS verifications disabled.","ecs.version":"1.6.0"}
[  ==] Waiting For Enroll...  [1m17s] {"log.level":"info","@timestamp":"2025-01-12T14:48:32.658+0100","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).enrollWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":520},"message":"Starting enrollment to URL: https://10.38.50.6:8220/","ecs.version":"1.6.0"}
[   =] Waiting For Enroll...  [1m17s] {"log.level":"warn","@timestamp":"2025-01-12T14:48:33.324+0100","log.logger":"tls","log.origin":{"function":"github.com/elastic/elastic-agent-libs/transport/tlscommon.(*TLSConfig).ToConfig","file.name":"tlscommon/tls_config.go","file.line":107},"message":"SSL/TLS verifications disabled.","ecs.version":"1.6.0"}
[  ==] Waiting For Enroll...  [1m18s] {"log.level":"info","@timestamp":"2025-01-12T14:48:34.221+0100","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":483},"message":"Restarting agent daemon, attempt 0","ecs.version":"1.6.0"}
[  ==] Waiting For Enroll...  [1m18s] {"log.level":"error","@timestamp":"2025-01-12T14:48:34.223+0100","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":497},"message":"Restart attempt 0 failed: 'rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial unix /opt/Elastic/Agent/elastic-agent.sock: connect: no such file or directory\"'. Waiting for 2s","ecs.version":"1.6.0"}
[==  ] Waiting For Enroll...  [1m20s] {"log.level":"info","@timestamp":"2025-01-12T14:48:36.224+0100","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":483},"message":"Restarting agent daemon, attempt 1","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2025-01-12T14:48:36.225+0100","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":497},"message":"Restart attempt 1 failed: 'rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial unix /opt/Elastic/Agent/elastic-agent.sock: connect: no such file or directory\"'. Waiting for 4s","ecs.version":"1.6.0"}
[==  ] Waiting For Enroll...  [1m24s] {"log.level":"info","@timestamp":"2025-01-12T14:48:40.225+0100","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":483},"message":"Restarting agent daemon, attempt 2","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2025-01-12T14:48:40.227+0100","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":497},"message":"Restart attempt 2 failed: 'rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial unix /opt/Elastic/Agent/elastic-agent.sock: connect: no such file or directory\"'. Waiting for 8s","ecs.version":"1.6.0"}
[==  ] Waiting For Enroll...  [1m32s] {"log.level":"info","@timestamp":"2025-01-12T14:48:48.228+0100","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":483},"message":"Restarting agent daemon, attempt 3","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2025-01-12T14:48:48.229+0100","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":497},"message":"Restart attempt 3 failed: 'rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial unix /opt/Elastic/Agent/elastic-agent.sock: connect: no such file or directory\"'. Waiting for 16s","ecs.version":"1.6.0"}
[==  ] Waiting For Enroll...  [1m48s] {"log.level":"info","@timestamp":"2025-01-12T14:49:04.229+0100","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":483},"message":"Restarting agent daemon, attempt 4","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2025-01-12T14:49:04.231+0100","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).daemonReloadWithBackoff","file.name":"cmd/enroll_cmd.go","file.line":497},"message":"Restart attempt 4 failed: 'rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial unix /opt/Elastic/Agent/elastic-agent.sock: connect: no such file or directory\"'. Waiting for 32s","ecs.version":"1.6.0"}
[==  ] Waiting For Enroll...  [2m20s] {"log.level":"error","@timestamp":"2025-01-12T14:49:36.234+0100","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.(*enrollCmd).Execute","file.name":"cmd/enroll_cmd.go","file.line":297},"message":"Elastic Agent might not be running; unable to trigger restart: could not reload agent's daemon, all retries failed. Last error: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial unix /opt/Elastic/Agent/elastic-agent.sock: connect: no such file or directory\"","ecs.version":"1.6.0"}
Something went wrong while enrolling the Elastic Agent: could not reload agent's daemon, all retries failed. Last error: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /opt/Elastic/Agent/elastic-agent.sock: connect: no such file or directory"
Error: could not reload agent daemon, unable to trigger restart: could not reload agent's daemon, all retries failed. Last error: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /opt/Elastic/Agent/elastic-agent.sock: connect: no such file or directory"
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.17/fleet-troubleshooting.html
[  ==] Uninstalled  [2m21s] Error uninstalling. Printing logs
2025-01-12T13:49:36.408Z        DEBUG   [install]       Loaded configuration from /home/c-user/Downloads/elastic-agent-8.17.0-linux-arm64/elastic-agent.yml
2025-01-12T13:49:36.408Z        DEBUG   [install]       Merged configuration from /home/c-user/Downloads/elastic-agent-8.17.0-linux-arm64/elastic-agent.yml into result
2025-01-12T13:49:36.408Z        DEBUG   [install]       Merged all configuration files from [/home/c-user/Downloads/elastic-agent-8.17.0-linux-arm64/elastic-agent.yml], no external input files
2025-01-12T13:49:36.409Z        DEBUG   [install.composable]    Starting controller for composable inputs
2025-01-12T13:49:36.409Z        DEBUG   [install.composable]    Started controller for composable inputs
2025-01-12T13:49:36.409Z        DEBUG   [install.composable]    Variable state changed for composable inputs; debounce started
2025-01-12T13:49:36.410Z        DEBUG   [install.composable]    kubernetes_secrets provider skipped, unable to connect: unable to build kube config due to error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
2025-01-12T13:49:36.410Z        DEBUG   [install.composable]    Kubernetes leaderelection provider skipped, unable to connect: unable to build kube config due to error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
2025-01-12T13:49:36.410Z        DEBUG   [install.composable.providers.kubernetes]       Kubernetes provider for resource pod skipped, unable to connect: unable to build kube config due to error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
2025-01-12T13:49:36.410Z        DEBUG   [install.composable.providers.kubernetes]       Kubernetes provider for resource node skipped, unable to connect: unable to build kube config due to error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
2025-01-12T13:49:36.425Z        DEBUG   [install.composable.providers.docker]   Start docker containers scanner
2025-01-12T13:49:36.425Z        DEBUG   [install.composable.providers.docker]   List containers
2025-01-12T13:49:36.426Z        DEBUG   [install.composable.providers.docker]   Fetching events since 2025-01-12 14:49:36.426614141 +0100 CET m=+146.155934922
2025-01-12T13:49:36.510Z        DEBUG   [install.composable]    Computing new variable state for composable inputs
2025-01-12T13:49:36.510Z        DEBUG   [install.composable]    Stopping controller for composable inputs
2025-01-12T13:49:36.510Z        DEBUG   [install.composable.providers.docker]   Watcher stopped
2025-01-12T13:49:36.611Z        DEBUG   [install.composable]    Stopped controller for composable inputs
2025-01-12T13:49:37.042Z        DEBUG   [install]       Loaded configuration from /home/c-user/Downloads/elastic-agent-8.17.0-linux-arm64/elastic-agent.yml
2025-01-12T13:49:37.042Z        DEBUG   [install]       Merged configuration from /home/c-user/Downloads/elastic-agent-8.17.0-linux-arm64/elastic-agent.yml into result
2025-01-12T13:49:37.042Z        DEBUG   [install]       Merged all configuration files from [/home/c-user/Downloads/elastic-agent-8.17.0-linux-arm64/elastic-agent.yml], no external input files
Error: enroll command failed for unknown reason: exit status 1

I'm 100% sure that the connectivity is correct, since it worked before and the fleet status etc. is healthy. I've installed a lot of agents in the time ive been using elastic, but never ran into this error. I hope you guys can tell me what the problem is. Thanks in advance!

Debian version on p1:
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"nt-8.17.0-linux-arm64 $
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/

@pl853 pl853 changed the title Problem with installing Elastic Agent 8.17 on raspberry pi (Arm64) not working, Problem with installing Elastic Agent 8.17 on raspberry pi (Arm64) Jan 12, 2025
@cmacknz
Copy link
Member

cmacknz commented Jan 13, 2025

Your agent service likely isn't actually running when it is installed, so the enroll failed.

Try doing ./elastic-agent install followed by elastic-agent enroll ..., the reason being it won't uninstall the agent when the enroll fails and you'll be able to look at the agent logs to see what is going on, assuming some exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants