myoung34 / docker-github-actions-runner

This will run the new self-hosted github actions runners with docker-in-docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to restart after initial registration

jylin opened this issue · comments

commented

After a few hours pass, I can't restart the runner container safely. It seems to try to re-register and fails to do so. These are logs:

# Authentication

Http response code: NotFound from 'POST https://api.github.com/actions/runner-registration'
{"message":"Not Found","documentation_url":"https://docs.github.com/rest"}
Response status code does not indicate success: 404 (Not Found).
An error occurred: Not configured. Run config.(sh/cmd) to configure the runner.
An error occurred: Not configured. Run config.(sh/cmd) to configure the runner.

I have tried setting DISABLE_AUTOMATIC_DEREGISTRATION=false too, but it didn't help.

I always dislike closing issues without a lot to add, but unfortunately this is an issue with github actions and you'll want to open an issue there. There's nothing in this repo that would cause the 404, it only handles the initial registration

commented

I think I ended up resolving by playing with CONFIGURED_ACTIONS_RUNNER_FILES_DIR.
Maybe that should be mentioned more prominently in docs, and you should suggest mounting a volume to persist those files (it also requires manually creating the folder if it doesn't exit). I think if you don't write those files to disk, then Github won't let you re-login the runner with the same RUNNER_TOKEN.

This is new to me. is that different from RUNNER_WORKDIR in this repo?

commented

The RUNNER_WORKDIR is actually not very important. It's just a temp dir, so it's even fine not to have a volume for it.
CONFIGURED_ACTIONS_RUNNER_FILES_DIR seems to contain things like ".credentials" files, which I assume are needed to re-login the same worker.

If you want to draft up something for the wiki in a PR id be happy to take over if you can get some of the initial phrasing down (this is news to me and good info to share)