tailscale / github-action

A GitHub Action to connect your workflow to your Tailscale network.
BSD 3-Clause "New" or "Revised" License
532 stars 80 forks source link

Action stopped working #36

Closed milanaleksic closed 2 years ago

milanaleksic commented 2 years ago

I have noticed that the action doesn't work any more on my public GH repository

Logs:

Run tailscale/github-action@v1
Run MINOR=$(echo $VERSION | awk -F '.' {'print $2'})
  MINOR=$(echo $VERSION | awk -F '.' {'print $2'})
  if [ $((MINOR % 2)) -eq 0 ]; then
    URL="https://pkgs.tailscale.com/stable/tailscale_${VERSION}_amd64.tgz"
  else
    URL="https://pkgs.tailscale.com/unstable/tailscale_${VERSION}_amd64.tgz"
  fi
  curl $URL -o tailscale.tgz
  tar -C ${HOME} -xzf tailscale.tgz
  rm tailscale.tgz
  TSPATH=${HOME}/tailscale_${VERSION}_amd64
  sudo mv "${TSPATH}/tailscale" "${TSPATH}/tailscaled" /usr/bin
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    GOROOT: /opt/hostedtoolcache/go/1.1[8](https://github.com/milanaleksic/thoughttrain/runs/6433880369?check_suite_focus=true#step:10:8).1/x64
    VERSION: 1.14.0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0 14.2M    0 81[9](https://github.com/milanaleksic/thoughttrain/runs/6433880369?check_suite_focus=true#step:10:9)20    0     0   159k      0  0:01:31 --:--:--  0:01:31  159k
[10](https://github.com/milanaleksic/thoughttrain/runs/6433880369?check_suite_focus=true#step:10:10)0 14.2M  100 14.2M    0     0  [12](https://github.com/milanaleksic/thoughttrain/runs/6433880369?check_suite_focus=true#step:10:12).0M      0  0:00:01  0:00:01 --:--:-- 12.0M
Run sudo tailscaled 2>~/tailscaled.log &
  sudo tailscaled 2>~/tailscaled.log &
  HOSTNAME="github-$(cat /etc/hostname)"
  until sudo tailscale up --authkey ${TAILSCALE_AUTHKEY} --hostname=${HOSTNAME} --accept-routes
  do
    sleep 0.5
  done
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    GOROOT: /opt/hostedtoolcache/go/1.[18](https://github.com/milanaleksic/thoughttrain/runs/6433880369?check_suite_focus=true#step:10:18).1/x64
    TAILSCALE_AUTHKEY: ***
failed to connect to local tailscaled (which appears to be running). Got error: Get "http://local-tailscaled.sock/localapi/v0/status": dial unix /var/run/tailscale/tailscaled.sock: connect: no such file or directory
Error: The operation was canceled.
DentonGentry commented 2 years ago

Authkeys expire after 90 days. Did the authkey expire?

milanaleksic commented 2 years ago

Hi @DentonGentry

yes, that was the reason, thank you. I refreshed the token and didn't have an issue any more. Sorry for the issue, it just wasn't clear what was the cause and I totally forgot the key expiration. It would be nice if there's a mechanism to notify when keys expire used or at least log something instead of getting stuck and timing out.

That being said, it is clear to me what happened and I will just close the issue. Thank you