Hello,
I have trouble getting the docker runner to work on my Raspberry Pi.
When I try to start a build I only get the error “Cannot accept stage” with error detail saying “400: Bad Request”.
I have checked my configuration multiple times but I don’t see anything wrong with it. The only thing I’m doing differently from the docs is that I use docker-compose with both services in the same file, but I don’t see why that wouldn’t work.
My server+runner docker-compose configuration:
version: '3'
services:
drone:
image: "drone/drone:1"
restart: always
ports:
- "3001:80"
environment:
DRONE_GITEA_CLIENT_ID: <omitted>
DRONE_GITEA_CLIENT_SECRET: <omitted
DRONE_GITEA_SERVER: <omitted>
DRONE_RPC_SECRET: <omitted>
DRONE_SERVER_HOST: <omitted>
DRONE_SERVER_PROTO: https
DRONE_TLS_AUTOCERT: "false"
DRONE_AGENTS_ENABLED: "false"
DRONE_DATABASE_DRIVER: postgres
DRONE_DATABASE_DATASOURCE: <omitted>
DRONE_LOGS_TRACE: "true"
volumes:
- /var/lib/drone:/data
drone-docker-runner:
image: "drone/drone-runner-docker:1"
restart: always
depends_on:
- drone
ports:
- "5000:3000"
links:
- drone
environment:
DRONE_RPC_PROTO: http
DRONE_RPC_HOST: drone:80
DRONE_RPC_SECRET: <omitted>
DRONE_RUNNER_CAPACITY: 1
DRONE_RUNNER_NAME: Raspberry Pi
DRONE_UI_USERNAME: Sunner
DRONE_UI_PASSWORD: <omitted>
DRONE_LOGS_TRACE: "true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
I have omitted some values for security reasons, but I can safely say that the secrets match.
I also don’t seem to have any networking issues, as the server and runner appear to connect successfully. Since they are on the same docker network, there also shouldn’t be any proxy issues here.
My pipeline configuration looks like this (just a test repo for testing the runner):
kind: pipeline
type: docker
name: drone-test
platform:
os: linux
arch: arm
steps:
- name: test
image: alpine:3.10
commands:
- echo "Hallo Drone CI"
My server logs:
...
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
{"arch":"arm","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-01-30T18:57:00Z","type":"docker","variant":""}
My runner logs:
...
time="2020-01-30T18:58:21Z" level=debug msg="poller: request stage from remote server" thread=1
time="2020-01-30T18:58:21Z" level=debug msg="stage received" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=error msg="cannot accept stage" error="400 Bad Request" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=debug msg="poller: request stage from remote server" thread=1
time="2020-01-30T18:58:21Z" level=debug msg="stage received" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=error msg="cannot accept stage" error="400 Bad Request" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=debug msg="poller: request stage from remote server" thread=1
time="2020-01-30T18:58:21Z" level=debug msg="stage received" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=error msg="cannot accept stage" error="400 Bad Request" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=debug msg="poller: request stage from remote server" thread=1
time="2020-01-30T18:58:21Z" level=debug msg="stage received" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=error msg="cannot accept stage" error="400 Bad Request" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=debug msg="poller: request stage from remote server" thread=1
time="2020-01-30T18:58:21Z" level=debug msg="stage received" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=error msg="cannot accept stage" error="400 Bad Request" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=debug msg="poller: request stage from remote server" thread=1
time="2020-01-30T18:58:21Z" level=debug msg="stage received" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=error msg="cannot accept stage" error="400 Bad Request" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=debug msg="poller: request stage from remote server" thread=1
time="2020-01-30T18:58:21Z" level=debug msg="stage received" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=error msg="cannot accept stage" error="400 Bad Request" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=debug msg="poller: request stage from remote server" thread=1
time="2020-01-30T18:58:21Z" level=debug msg="stage received" stage.id=83 stage.name=drone-test stage.number=1 thread=1
time="2020-01-30T18:58:21Z" level=error msg="cannot accept stage" error="400 Bad Request" stage.id=83 stage.name=drone-test stage.number=1 thread=1
Is there anything wrong here?