Tasks are always in "default: Pending" status

I’m trying to setup droneci with docker pipeline on RPI arm64. Here’re my files:

.env

DRONE_GITHUB_CLIENT_ID=XXXXX
DRONE_GITHUB_CLIENT_SECRET=XXXXXXXXXX
DRONE_RPC_SECRET=XXXXXXXXXXXXXXXXXXXX
DRONE_SERVER_HOST=drone.pychat.org
DRONE_SERVER_PROTO=http
DRONE_USER_CREATE=username:akoidan,admin:true
DRONE_RPC_HOST=drone
DRONE_RPC_PROTO=http
DRONE_RUNNER_CAPACITY=2
DRONE_RUNNER_NAME=drone-runner-1
DRONE_LOGS_DEBUG=true
DRONE_LOGS_TRACE=true

docker-compose.yml

version: '3'
services:
  drone:
    image: drone/drone:1
    networks:
      - rpc
    volumes:
      - /var/lib/drone:/data
    ports:
      - 8066:80
    env_file:
      - ./.env

  runner:
    image: drone/drone-runner-docker:1
    networks:
      - rpc
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    env_file:
      - ./.env
networks:
  rpc:

As you see communication between drone server and runners go directly by http via rpc network. My drone server (web UI) is located behind nginx with SSL proxy if it matters:

/etc/nginx/sites-enabled/drone.conf:

server {
       listen         80;
       server_name    drone.pychat.org;
       return         301 https://$server_name$request_uri;
}

server {
    listen 443 ssl http2;
    server_name drone.pychat.org;
    ssl_certificate /etc/letsencrypt/live/drone.pychat.org/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/drone.pychat.org/privkey.pem; # managed by Certbot


    location / {
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;

        proxy_pass http://localhost:8066;
        proxy_redirect off;
        proxy_http_version 1.1;
        proxy_buffering off;

        chunked_transfer_encoding off;
    }

}

And project with drone config:

.drone.yml

---
kind: pipeline
type: docker
name: default


platform:
  os: linux
  arch: arm64

steps:
  - name: greeting
    commands:
      - echo hello world
trigger:
  event:
    exclude:
      - pull_request

logs

WARNING: Found orphan containers (drone_server_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Starting drone_drone_1  ... done
Starting drone_runner_1 ... done
Attaching to drone_drone_1, drone_runner_1
runner_1  | time="2020-09-29T18:03:37Z" level=debug msg="successfully pinged the docker daemon"
runner_1  | time="2020-09-29T18:03:37Z" level=info msg="starting the server" addr=":3000"
runner_1  | time="2020-09-29T18:03:37Z" level=error msg="cannot ping the remote server" error="Post http://drone/rpc/v2/ping: dial tcp 172.18.0.2:80: connect: connection refused"
drone_1   | license: ""
drone_1   | authn:
drone_1   |   endpoint: ""
drone_1   |   secret: ""
drone_1   |   skipverify: false
drone_1   | agent:
drone_1   |   disabled: false
drone_1   | azureblob:
drone_1   |   containername: ""
drone_1   |   storageaccountname: ""
drone_1   |   storageaccesskey: ""
drone_1   | convert:
drone_1   |   extension: ""
drone_1   |   endpoint: ""
drone_1   |   secret: ""
drone_1   |   skipverify: false
drone_1   |   timeout: 1m0s
drone_1   | cleanup:
drone_1   |   disabled: false
drone_1   |   interval: 24h0m0s
drone_1   |   running: 24h0m0s
drone_1   |   pending: 24h0m0s
drone_1   | cron:
drone_1   |   disabled: false
drone_1   |   interval: 30m0s
drone_1   | cloning:
drone_1   |   alwaysauth: false
drone_1   |   username: ""
drone_1   |   password: ""
drone_1   |   image: ""
drone_1   |   pull: IfNotExists
drone_1   | database:
drone_1   |   driver: sqlite3
drone_1   |   datasource: /data/database.sqlite
drone_1   |   secret: ""
drone_1   |   legacybatch: false
drone_1   | datadog:
drone_1   |   enabled: true
drone_1   |   endpoint: https://stats.drone.ci/api/v1/series
drone_1   |   token: ""
drone_1   | docker:
drone_1   |   config: ""
drone_1   | http:
drone_1   |   allowedhosts: []
drone_1   |   hostsproxyheaders: []
drone_1   |   sslredirect: false
drone_1   |   ssltemporaryredirect: false
drone_1   |   sslhost: ""
drone_1   |   sslproxyheaders: {}
drone_1   |   stsseconds: 0
drone_1   |   stsincludesubdomains: false
drone_1   |   stspreload: false
drone_1   |   forcestsheader: false
drone_1   |   browserxssfilter: true
drone_1   |   framedeny: true
drone_1   |   contenttypenosniff: false
drone_1   |   contentsecuritypolicy: ""
drone_1   |   referrerpolicy: ""
drone_1   | jsonnet:
drone_1   |   enabled: false
drone_1   | logging:
drone_1   |   debug: true
drone_1   |   trace: true
drone_1   |   color: false
drone_1   |   pretty: false
drone_1   |   text: false
drone_1   | prometheus:
drone_1   |   enableanonymousaccess: false
drone_1   | proxy:
drone_1   |   addr: http://drone.pychat.org
drone_1   |   host: drone.pychat.org
drone_1   |   proto: http
drone_1   | registration:
drone_1   |   closed: false
drone_1   | registries:
drone_1   |   endpoint: ""
drone_1   |   password: ""
drone_1   |   skipverify: false
drone_1   | repository:
drone_1   |   filter: []
drone_1   |   visibility: ""
drone_1   |   trusted: false
drone_1   |   ignore: []
drone_1   | runner:
drone_1   |   local: false
drone_1   |   image: drone/controller:1
drone_1   |   platform: linux/amd64
drone_1   |   os: linux
drone_1   |   arch: arm64
drone_1   |   kernel: ""
drone_1   |   variant: ""
drone_1   |   machine: drone-runner-1
drone_1   |   capacity: 2
drone_1   |   labels: {}
drone_1   |   volumes: []
drone_1   |   networks: []
drone_1   |   devices: []
drone_1   |   privileged: []
drone_1   |   environ: {}
drone_1   |   limits:
drone_1   |     memswaplimit: 0
drone_1   |     memlimit: 0
drone_1   |     shmsize: 0
drone_1   |     cpuquota: 0
drone_1   |     cpushares: 0
drone_1   |     cpuset: ""
drone_1   | nomad:
drone_1   |   enabled: false
drone_1   |   datacenters:
drone_1   |   - dc1
drone_1   |   namespace: ""
drone_1   |   region: ""
drone_1   |   prefix: drone-job-
drone_1   |   image: ""
drone_1   |   imagepull: false
drone_1   |   memory: 1024
drone_1   |   labels: {}
drone_1   |   cpu: 500
drone_1   | kube:
drone_1   |   enabled: false
drone_1   |   namespace: ""
drone_1   |   path: ""
drone_1   |   url: ""
drone_1   |   ttl: 300
drone_1   |   serviceaccountname: ""
drone_1   |   pullpolicy: Always
drone_1   |   image: ""
drone_1   | rpc:
drone_1   |   server: ""
drone_1   |   secret: 1ggz3psifyr88q3jx6t7r47i2vg2kpar
drone_1   |   debug: false
drone_1   |   host: drone
drone_1   |   proto: http
drone_1   | s3:
drone_1   |   bucket: ""
drone_1   |   prefix: ""
drone_1   |   endpoint: ""
drone_1   |   pathstyle: false
drone_1   | secrets:
drone_1   |   endpoint: ""
drone_1   |   password: ""
drone_1   |   skipverify: false
drone_1   | server:
drone_1   |   addr: http://drone.pychat.org
drone_1   |   host: drone.pychat.org
drone_1   |   port: :80
drone_1   |   proto: http
drone_1   |   pprof: false
drone_1   |   acme: false
drone_1   |   email: ""
drone_1   |   cert: ""
drone_1   |   key: ""
drone_1   | session:
drone_1   |   timeout: 720h0m0s
drone_1   |   secret: DFlxYHaB9ufH5zFvUs3kdpjWirPnve8Z
drone_1   |   secure: false
drone_1   |   mappingfile: ""
drone_1   | status:
drone_1   |   disabled: false
drone_1   |   name: ""
drone_1   | users:
drone_1   |   create:
drone_1   |     username: akoidan
drone_1   |     machine: false
drone_1   |     admin: true
drone_1   |     token: ""
drone_1   |   filter: []
drone_1   |   minage: 0s
drone_1   | validate:
drone_1   |   endpoint: ""
drone_1   |   secret: ""
drone_1   |   skipverify: false
drone_1   |   timeout: 1m0s
drone_1   | webhook:
drone_1   |   events: []
drone_1   |   endpoint: []
drone_1   |   secret: ""
drone_1   |   skipverify: false
drone_1   | yaml:
drone_1   |   endpoint: ""
drone_1   |   secret: ""
drone_1   |   skipverify: false
drone_1   |   timeout: 1m0s
drone_1   | bitbucket:
drone_1   |   clientid: ""
drone_1   |   clientsecret: ""
drone_1   |   skipverify: false
drone_1   |   debug: false
drone_1   | gitea:
drone_1   |   server: ""
drone_1   |   clientid: ""
drone_1   |   clientsecret: ""
drone_1   |   skipverify: false
drone_1   |   scope:
drone_1   |   - repo
drone_1   |   - repo:status
drone_1   |   - user:email
drone_1   |   - read:org
drone_1   |   debug: false
drone_1   | github:
drone_1   |   server: https://github.com
drone_1   |   apiserver: https://api.github.com
drone_1   |   clientid: de72685f1960362ecec3
drone_1   |   clientsecret: 78667710e1c44c75e17e336b47cf3a2e8d9db5dc
drone_1   |   skipverify: false
drone_1   |   scope:
drone_1   |   - repo
drone_1   |   - repo:status
drone_1   |   - user:email
drone_1   |   - read:org
drone_1   |   ratelimit: 0
drone_1   |   debug: false
drone_1   | gitlab:
drone_1   |   server: https://gitlab.com
drone_1   |   clientid: ""
drone_1   |   clientsecret: ""
drone_1   |   skipverify: false
drone_1   |   debug: false
drone_1   | gogs:
drone_1   |   server: ""
drone_1   |   skipverify: false
drone_1   |   debug: false
drone_1   | stash:
drone_1   |   server: ""
drone_1   |   consumerkey: ""
drone_1   |   consumersecret: ""
drone_1   |   privatekey: ""
drone_1   |   skipverify: false
drone_1   |   debug: false
drone_1   |
drone_1   | {"level":"info","msg":"main: internal scheduler enabled","time":"2020-09-29T18:03:37Z"}
drone_1   | {"build.limit":5000,"expires":"0001-01-01T00:00:00Z","kind":"trial","level":"debug","msg":"main: license loaded","repo.limit":0,"time":"2020-09-29T18:03:37Z","user.limit":0}
drone_1   | {"admin":true,"level":"debug","login":"akoidan","machine":false,"msg":"bootstrap: create account","time":"2020-09-29T18:03:37Z","token":""}
drone_1   | {"admin":true,"level":"debug","login":"akoidan","machine":false,"msg":"bootstrap: updating account","time":"2020-09-29T18:03:37Z","token":""}
drone_1   | {"admin":true,"level":"debug","login":"akoidan","machine":false,"msg":"bootstrap: account already up-to-date","time":"2020-09-29T18:03:37Z","token":""}
drone_1   | {"interval":"30m0s","level":"info","msg":"starting the cron scheduler","time":"2020-09-29T18:03:37Z"}
drone_1   | {"acme":false,"host":"drone.pychat.org","level":"info","msg":"starting the http server","port":":80","proto":"http","time":"2020-09-29T18:03:37Z","url":"http://drone.pychat.org"}
drone_1   | {"interval":"24h0m0s","level":"info","msg":"starting the zombie build reaper","time":"2020-09-29T18:03:37Z"}
runner_1  | time="2020-09-29T18:03:38Z" level=info msg="successfully pinged the remote server"
runner_1  | time="2020-09-29T18:03:38Z" level=info msg="polling the remote server" arch=arm64 capacity=2 endpoint="http://drone" kind=pipeline os=linux type=docker
runner_1  | time="2020-09-29T18:03:38Z" level=debug msg="poller: request stage from remote server" thread=1
runner_1  | time="2020-09-29T18:03:38Z" level=debug msg="poller: request stage from remote server" thread=2
drone_1   | {"arch":"arm64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-09-29T18:03:38Z","type":"docker","variant":""}
drone_1   | {"arch":"arm64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2020-09-29T18:03:38Z","type":"docker","variant":""}
drone_1   | {"arch":"arm64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: context canceled","os":"linux","time":"2020-09-29T18:04:08Z","type":"docker","variant":""}
runner_1  | time="2020-09-29T18:04:08Z" level=trace msg="http: no content returned: re-connect and re-try"
drone_1   | {"arch":"arm64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: context canceled","os":"linux","time":"2020-09-29T18:04:08Z","type":"docker","variant":""}
runner_1  | time="2020-09-29T18:04:08Z" level=trace msg="http: no content returned: re-connect and re-try"

GET: https://drone.pychat.org/api/repos/akoidan/drone-test/builds/8

{
   "id":51,
   "repo_id":56,
   "trigger":"@hook",
   "number":8,
   "status":"pending",
   "event":"push",
   "action":"",
   "link":"https://github.com/akoidan/drone-test/compare/872e01ec7a8f...2b1980c355c6",
   "timestamp":0,
   "message":"a",
   "before":"872e01ec7a8f4bf42add70ff24f194d59c40ef55",
   "after":"2b1980c355c6588afc07b398b9cec2bc770e88ab",
   "ref":"refs/heads/master",
   "source_repo":"",
   "source":"master",
   "target":"master",
   "author_login":"akoidan",
   "author_name":"akoidan",
   "author_email":"deathangel908@gmail.com",
   "author_avatar":"https://avatars0.githubusercontent.com/u/1336703?v=4",
   "sender":"akoidan",
   "started":0,
   "finished":0,
   "created":1601402379,
   "updated":1601402379,
   "version":1,
   "stages":[
      {
         "id":51,
         "repo_id":56,
         "build_id":51,
         "number":1,
         "name":"default",
         "kind":"pipeline",
         "type":"docker",
         "status":"pending",
         "errignore":false,
         "exit_code":0,
         "os":"linux",
         "arch":"arm64",
         "started":0,
         "stopped":0,
         "created":1601402379,
         "updated":1601402379,
         "version":1,
         "on_success":true,
         "on_failure":false,
         "labels":{
            "runner":"rpi"
         }
      }
   ]
}

But the task is always in pending status

Please see http://discuss.harness.io/t/builds-are-stuck-in-pending-status/4437

edit: response from gitter channel included below

The node section defines a list of key / value labels that are used to assign a pipeline to a runner. The node labels must match the runner labels exactly. In your example, DRONE_RUNNER_LABELS is being set to runner:rpi but in your yaml you set the node labels to runner:drone-runner-1. This mismatch is the reason the pipeline is not being assigned and is sitting in a pending status. To resolve, change the node section in your yaml to match the runner labels:

node:
-  runner: drone-runner-1
+  runner: rpi
1 Like