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 wont connect to server: rpc error #2575

Closed
5 tasks done
beatjaeckle opened this issue Oct 12, 2023 · 2 comments
Closed
5 tasks done

agent wont connect to server: rpc error #2575

beatjaeckle opened this issue Oct 12, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@beatjaeckle
Copy link

Component

agent

Describe the bug

I followed the guide from @6543: https://tube.tchncs.de/videos/watch/04ca97a3-bc01-47bd-9084-179135290693
I'm not used to docker. I'm still learnig.

I already fixed some settings, f.e. I set WOODPECKER_SERVER=172.23.0.2:9000

But now I'm stuck with following errorcode in the agent log:

rpc error: code = DeadlineExceeded desc = context deadline exceeded

and the agent wont connect to the server.

PS: In the OAth of my forgejo i had to specify the prt in the redirect url.

System Info

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"next-0623eefd3b"}

Additional context

# docker-compose.yml
version: '3'

services:
  woodpecker-server:
    image: woodpeckerci/woodpecker-server:next
    ports:
      - 8000:8000
    volumes:
      - woodpecker-server-data:/var/lib/woodpecker/
    environment:
      - WOODPECKER_OPEN=true
      - WOODPECKER_HOST=${WOODPECKER_HOST}
      - WOODPECKER_GITEA=true
      - WOODPECKER_GITEA_URL=${WOODPECKER_GITEA_URL}
      - WOODPECKER_GITEA_CLIENT=${WOODPECKER_GITEA_CLIENT}
      - WOODPECKER_GITEA_SECRET=${WOODPECKER_GITEA_SECRET}
      - WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
      - WOODPECKER_ADMIN=${WOODPECKER_ADMIN}
      - WOODPECKER_GRPC_ADDR=:9000

  woodpecker-agent:
    image: woodpeckerci/woodpecker-agent:next
    command: agent
    restart: always
    depends_on:
      - woodpecker-server
    volumes:
      - woodpecker-agent-config:/etc/woodpecker
      - /var/run/docker.sock:/var/run/docker
    environment:
      - WOODPECKER_SERVER=172.23.0.2:9000
      - WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
      - WOODPECKER_BACKEND=docker

volumes:
  woodpecker-server-data:
  woodpecker-agent-config:
# .env
WOODPECKER_GITEA_CLIENT=***
WOODPECKER_HOST=https://ci.example.com:443
WOODPECKER_GITEA_SECRET=***
WOODPECKER_GITEA_URL=https://git.example.com:443
WOODPECKER_ADMIN=test
WOODPECKER_AGENT_SECRET=***

Validations

  • Read the Contributing Guidelines.
  • 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]
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server or the Matrix room.
@beatjaeckle beatjaeckle added the bug Something isn't working label Oct 12, 2023
@qwerty287
Copy link
Contributor

I'm also not an expert in docker/compose, but if I look at our documentation the WOODPECKER_SERVER var is set to woodpecker-server:9000.
Did you try this? You can also tale a look at other parts that are different in the docs.

@beatjaeckle
Copy link
Author

I'm also not an expert in docker/compose, but if I look at our documentation the WOODPECKER_SERVER var is set to woodpecker-server:9000. Did you try this? You can also tale a look at other parts that are different in the docs.

Thank you. It works now!

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