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

agent connection seems broken, rpc access token expired #4144

Open
3 tasks done
mortbauer opened this issue Sep 26, 2024 · 1 comment
Open
3 tasks done

agent connection seems broken, rpc access token expired #4144

mortbauer opened this issue Sep 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mortbauer
Copy link

Component

server, agent

Describe the bug

Setup a woordpecker server and agent via 2 docker containers with a shared WOODPECKER_AGENT_SECRET
Everything works fine at first, but after a couple of hours the communication between server and agent fails.
The logs from the agent are:

 ERR src/agent/rpc/client_grpc.go:461 > grpc error: report_health(): code: Unauthenticated error="rpc error: code = Unauthenticated desc = access token is invalid: invalid token: token has invalid claims: token is expired"
5:40PM ERR src/cmd/agent/core/agent.go:251 > failed to report health error="rpc error: code = Unauthenticated desc = access token is invalid: invalid token: token has invalid claims: token is expired"

The server doesn't log anything relevant about it I think.
So since this is so basic, I really hesitated to report that bug, believing I made some mistake, so I actually recreated my real setup with the most basic setup just locally and it is the same problem.

Steps to reproduce

  1. start server with:
docker run --rm -it -p 8000:8000 -p 9000:9000 -v ./datatest:/var/lib/woodpecker -e WOODPECKER_HOST=http://localhost:8000 -e WOODPECKER_AGENT_SECRET=ADFI34YAKMIGSNKK55IPCKVVJWNULOBQY2QRIBJ42X527NY7GLTQ===1 -v /var/run/docker.sock:/var/run/docker.sock -e WOODPECKER_LOG_LEVEL=debug -e WOODPECKER_GITEA=true -e WOODPECKER_GITEA_CLIENT=... -e WOODPECKER_GITEA_SECRET=...-e WOODPECKER_GITEA_URL=... -e WOODPECKER_OPEN=true -e WOODPECKER_ADMIN=martin --name woodpecker-server-test woodpeckerci/woodpecker-server:v2.7.1-alpine
  1. start agent with:
docker run --rm -it --network host -e WOODPECKER_SERVER=localhost:9000 -e WOODPECKER_AGENT_SECRET=ADFI34YAKMIGSNKK55IPCKVVJWNULOBQY2QRIBJ42X527NY7GLTQ===1 -v /var/run/docker.sock:/var/run/docker.sock -e WOODPECKER_LOG_LEVEL=debug  --name woodpecker-runner-test woodpeckerci/woodpecker-agent:v2.7.1-alpine
  1. check it works
  2. wait for a day and you will see the error in the agent logs, server doesn't report anything related i think

Expected behavior

No response

System Info

* woodpeckerci/woodpecker-server:v2.7.1-alpine
* woodpeckerci/woodpecker-agent:v2.7.1-alpine

Additional context

No response

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
@mortbauer mortbauer added the bug Something isn't working label Sep 26, 2024
@pat-s
Copy link
Contributor

pat-s commented Oct 8, 2024

Can confirm this (on next). Didn't encounter it yet with 2.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants