Builds stuck in pending state

Hi!

I just installed drone 1.0.0 on a raspberry pi in single machine mode together with gitea using the guide https://docs.drone.io/intro/gitea/single-machine/

It picks up commits, but all builds are stuck in pending state. Any idea what I might be doing wrong?

I suggest the following threads which may a) help you resolve the issue or b) provide you with additional instructions for enabling debug and trace logging, and provides a list of additional information we generally require in order to efficiently help you debug issues (server and agent configuration, etc).

Thank you.

I enabled debug log, here’s how I run drone:

docker run \
  --volume=/var/run/docker.sock:/var/run/docker.sock \
  --volume=/var/lib/drone:/data \
  --env=DRONE_GITEA_SERVER=${DRONE_GITEA_SERVER} \
  --env=DRONE_GIT_ALWAYS_AUTH=false \
  --env=DRONE_RUNNER_CAPACITY=2 \
  --env=DRONE_SERVER_HOST=${DRONE_SERVER_HOST} \
  --env=DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO} \
  --env=DRONE_TLS_AUTOCERT=false \
  --env=DRONE_LOGS_DEBUG=true \
  --publish=8001:80 \
  --publish=4431:443 \
  --restart=always \
  --detach=true \
  --name=drone \
  drone/drone:1.0.0-rc.5

Here’s the log when I push a commit:

Feb 01 09:30:09 testserver docker[30251]: {"commit":"14d9e8979dbe2f9be927a816b35b9cb4167e5da5","event":"push","level":"debug","msg":"webhook parsed","name":"indium","namespace":"nico","time":"2019-02-01T08:30:09Z"}
Feb 01 09:30:09 testserver docker[30251]: {"commit":"14d9e8979dbe2f9be927a816b35b9cb4167e5da5","event":"push","level":"debug","msg":"trigger: received","ref":"refs/heads/drone","repo":"nico/indium","time":"2019-02-01T08:30:09Z"}
Feb 01 09:30:09 testserver docker[30251]: {"fields.time":"2019-02-01T08:30:09Z","latency":512576734,"level":"debug","method":"POST","msg":"","remote":"172.17.0.1:44294","request":"/hook?secret=xxxxs","request-id":"1GZOm73ts6luygTeUYFRaZRT4s3","time":"2019-02-01T08:30:09Z"}
Feb 01 09:30:09 testserver docker[30251]: {"commit":"14d9e8979dbe2f9be927a816b35b9cb4167e5da5","event":"pull_request","level":"debug","msg":"webhook parsed","name":"indium","namespace":"nico","time":"2019-02-01T08:30:09Z"}
Feb 01 09:30:09 testserver docker[30251]: {"commit":"14d9e8979dbe2f9be927a816b35b9cb4167e5da5","event":"pull_request","level":"debug","msg":"trigger: received","ref":"refs/pull/1/head","repo":"nico/indium","time":"2019-02-01T08:30:09Z"}
Feb 01 09:30:09 testserver docker[30251]: {"fields.time":"2019-02-01T08:30:09Z","latency":112546601,"level":"debug","method":"POST","msg":"","remote":"172.17.0.1:44294","request":"/hook?secret=xxxxs","request-id":"1GZOm5ilIEWiM0xvEub0St9bb3M","time":"2019-02-01T08:30:09Z"}

ah, if you are running on raspberry pi make sure you set the architecture of your pipeline. The default architecture is amd64. If unspecified on an arm 32 machine, it will result in your build sitting in a queue waiting indefinitely for an amd64 runner. Syntax for specifying architecture below:

kind: pipeline
name: default

platform:
  os: linux
  arch: arm

steps: ...

Thanks, that indeed was the issue.

I now face another error, and the build errors with the following log:

Feb 01 11:04:54 testserver docker[30251]: {"level":"debug","machine":"b1cd1bf6e005","msg":"manager: accept stage","stage-id":11,"time":"2019-02-01T10:04:54Z"}
Feb 01 11:04:54 testserver docker[30251]: {"level":"debug","machine":"b1cd1bf6e005","msg":"manager: stage accepted","stage-id":11,"time":"2019-02-01T10:04:54Z"}
Feb 01 11:04:54 testserver docker[30251]: {"level":"debug","msg":"manager: fetching stage details","step-id":11,"time":"2019-02-01T10:04:54Z"}
Feb 01 11:04:54 testserver docker[30251]: {"arch":"arm","level":"debug","machine":"b1cd1bf6e005","msg":"runner: polling queue","os":"linux","time":"2019-02-01T10:04:54Z"}
Feb 01 11:04:54 testserver docker[30251]: {"arch":"arm","kernel":"","level":"debug","msg":"manager: request queue item","os":"linux","time":"2019-02-01T10:04:54Z","variant":""}
Feb 01 11:04:54 testserver docker[30251]: {"arch":"arm","build":11,"level":"info","machine":"b1cd1bf6e005","msg":"runner: start execution","os":"linux","pipeline":"default","repo":"nico/indium","stage":1,"time":"2019-02-01T10:04:54Z"}
Feb 01 11:04:54 testserver docker[30251]: {"arch":"arm","build":11,"level":"debug","machine":"b1cd1bf6e005","msg":"runner: watch for kill signal","os":"linux","pipeline":"default","repo":"nico/indium","stage":1,"time":"2019-02-01T10:04:54Z"}
Feb 01 11:04:54 testserver docker[30251]: {"arch":"arm","build":11,"error":"Error response from daemon: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network","level":"info","machine":"b1cd1bf6e005","msg":"runner: execution failed","os":"linux","pipeline":"default","repo":"nico/indium","stage":1,"time":"2019-02-01T10:04:54Z"}

Here’s the .drone.yml file:

kind: pipeline
name: default

platform:
  os: linux
  arch: arm

steps:
- name: test
  image: alpine
  commands:
  - apk add emacs nodejs
  - make dependencies
  - make test
  - make lint

This error comes from the Docker daemon and not from Drone, so you may need to consult the Docker community to try and resolve this. You may also have some luck on Stackoverflow. https://stackoverflow.com/questions/43720339/docker-error-could-not-find-an-available-non-overlapping-ipv4-address-pool-am

hi, i ran drone in single server mode, now i get the same problem, that drone stuck on pending, i’ve turned on debug, and the webhook pushed to drone correctly. follow your article ‘Nothing happens when i push code’, no issues match your suggestions.

follow your article ‘Nothing happens when i push code’, no issues match your suggestions.

have you tried searching discourse for additional threads that may be useful, such as Builds are Stuck in Pending Status