After initial setup this Linux agent worked for a while and handled jobs, but after rebooting the machine, the bk-agent never gets further than “activating”.
Oh, that doesn’t sound good — sorry! What’s the full output of systemctl status buildkite-agent look like? Is there anything in the logs, journalctl -u buildkite-agent.service?
Yes, I can see it has the string “activating” in it, but the reason it’s still activating is that the process isn’t started, it’s exiting with exit code 1. Can you see the logs? They should contain some hint as to why it isn’t working.
Aug 22 12:47:49 paul-HP-ENVY-x360-Convertible systemd[1]: buildkite-agent.service: Service RestartSec=5s expired, scheduling restart.
Aug 22 12:47:49 paul-HP-ENVY-x360-Convertible systemd[1]: buildkite-agent.service: Scheduled restart job, restart counter is at 2459.
Aug 22 12:47:49 paul-HP-ENVY-x360-Convertible systemd[1]: Stopped Buildkite Agent.
Aug 22 12:47:49 paul-HP-ENVY-x360-Convertible systemd[1]: Started Buildkite Agent.
Aug 22 12:47:49 paul-HP-ENVY-x360-Convertible buildkite-agent[18329]: Missing build-path. See: buildkite-agent start --help
Aug 22 12:47:49 paul-HP-ENVY-x360-Convertible systemd[1]: buildkite-agent.service: Main process exited, code=exited, status=1/FAILURE
Aug 22 12:47:49 paul-HP-ENVY-x360-Convertible systemd[1]: buildkite-agent.service: Failed with result ‘exit-code’.
Aug 22 12:47:54 paul-HP-ENVY-x360-Convertible systemd[1]: buildkite-agent.service: Service RestartSec=5s expired, scheduling restart.
Aug 22 12:47:54 paul-HP-ENVY-x360-Convertible systemd[1]: buildkite-agent.service: Scheduled restart job, restart counter is at 2460.
Aug 22 12:47:54 paul-HP-ENVY-x360-Convertible systemd[1]: Stopped Buildkite Agent.
Aug 22 12:47:54 paul-HP-ENVY-x360-Convertible systemd[1]: Started Buildkite Agent.
Aug 22 12:47:54 paul-HP-ENVY-x360-Convertible systemd[1]: buildkite-agent.service: Main process exited, code=exited, status=1/FAILURE
Aug 22 12:47:54 paul-HP-ENVY-x360-Convertible systemd[1]: buildkite-agent.service: Failed with result ‘exit-code’.
OK, so I filled in more of the config, including items I though were optional because of defaults. Now I’m stuck on permissions on mkdir /usr/local/var/buildkite-agent/* which I think is because of a missing group ‘admin’. I’ll do some more reading.
OK I think I’m through it after a bunch more chowns and mkdirs to facilitate ‘first time’. Much for our own notes on BK agents, but that suggestion to review ‘build-path’ was the log-jam breaker - thanks.