[solved] Builds in pending status

Hi,
I have a drone server on my VPS.

docker run
–volume=/var/lib/drone:/data
–env=DRONE_GITHUB_CLIENT_ID=GITHUB_KEY
–env=DRONE_LOGS_DEBUG=true
–env=DRONE_LOGS_TRACE=true
–env=DRONE_GITHUB_CLIENT_SECRET=GITHUB_SECRET
–env=DRONE_RPC_SECRET=RPC_SECRET
–env=DRONE_SERVER_HOST=VPS_IP:8080
–env=DRONE_SERVER_PORT=:8080
–env=DRONE_SERVER_PROTO=https
–publish=8080:8080
–restart=always
–detach=true
–name=drone
drone/drone:1

And a drone agent (on my PC)

docker run -d
-e DRONE_RPC_PROTO=http
-e DRONE_RPC_HOST=VPS_IP:8080
-e DRONE_RPC_SECRET=RPC_SECRET
-e DRONE_LOGS_TRACE=true
-e DRONE_RPC_DUMP_HTTP=true
-e DRONE_RPC_DUMP_HTTP_BODY=true
-e DRONE_RUNNER_NAME=runner_1
-e DRONE_RUNNER_CAPACITY=2
–restart always
–name runner
drone/drone-runner-ssh

Git repo YML file:

kind: pipeline
type: docker
name: default

steps:

  • name: hello
    image: alpine
    commands:
    • echo hi

I have a webhook on Github ( http://VPS_IP:8080/hook).

When i push a new commit to the repo, the build status stuck in “pending”.

Server logs:

license: “”
authn:
endpoint: “”
secret: “”
skipverify: false
agent:
disabled: false
azureblob:
containername: “”
storageaccountname: “”
storageaccesskey: “”
convert:
extension: “”
endpoint: “”
secret: “”
skipverify: false
timeout: 1m0s
cleanup:
disabled: false
interval: 24h0m0s
running: 24h0m0s
pending: 24h0m0s
cron:
disabled: false
interval: 30m0s
cloning:
alwaysauth: false
username: “”
password: “”
image: “”
pull: IfNotExists
database:
driver: sqlite3
datasource: /data/database.sqlite
secret: “”
legacybatch: false
datadog:
enabled: true
endpoint: https://stats.drone.ci/api/v1/series
token: “”
docker:
config: “”
http:
allowedhosts:
hostsproxyheaders:
sslredirect: false
ssltemporaryredirect: false
sslhost: “”
sslproxyheaders: {}
stsseconds: 0
stsincludesubdomains: false
stspreload: false
forcestsheader: false
browserxssfilter: true
framedeny: true
contenttypenosniff: false
contentsecuritypolicy: “”
referrerpolicy: “”
jsonnet:
enabled: false
logging:
debug: true
trace: true
color: false
pretty: false
text: false
prometheus:
enableanonymousaccess: false
proxy:
addr: https://VPS_IP:8080
host: VPS_IP:8080
proto: https
registration:
closed: false
registries:
endpoint: “”
password: “”
skipverify: false
repository:
filter:
visibility: “”
trusted: false
ignore:
runner:
local: false
image: drone/controller:1
platform: linux/amd64
os: linux
arch: amd64
kernel: “”
variant: “”
machine: 21f30d4d5f56
capacity: 2
labels: {}
volumes:
networks:
devices:
privileged:
environ: {}
limits:
memswaplimit: 0
memlimit: 0
shmsize: 0
cpuquota: 0
cpushares: 0
cpuset: “”
nomad:
enabled: false
datacenters:

  • dc1
    namespace: “”
    region: “”
    prefix: drone-job-
    image: “”
    imagepull: false
    memory: 1024
    labels: {}
    cpu: 500
    kube:
    enabled: false
    namespace: “”
    path: “”
    url: “”
    ttl: 300
    serviceaccountname: “”
    pullpolicy: Always
    image: “”
    rpc:
    server: “”
    secret: SECRET
    debug: false
    host: VPS_IP:8080
    proto: https
    s3:
    bucket: “”
    prefix: “”
    endpoint: “”
    pathstyle: false
    secrets:
    endpoint: “”
    password: “”
    skipverify: false
    server:
    addr: https://VPS_IP:8080
    host: VPS_IP:8080
    port: :8080
    proto: https
    pprof: false
    acme: false
    email: “”
    cert: “”
    key: “”
    session:
    timeout: 720h0m0s
    secret: SECRET
    secure: false
    mappingfile: “”
    status:
    disabled: false
    name: “”
    users:
    create:
    username: “”
    machine: false
    admin: false
    token: “”
    filter:
    minage: 0s
    validate:
    endpoint: “”
    secret: “”
    skipverify: false
    timeout: 1m0s
    webhook:
    events:
    endpoint:
    secret: “”
    skipverify: false
    yaml:
    endpoint: “”
    secret: “”
    skipverify: false
    timeout: 1m0s
    bitbucket:
    clientid: “”
    clientsecret: “”
    skipverify: false
    debug: false
    gitea:
    server: “”
    clientid: “”
    clientsecret: “”
    skipverify: false
    scope:
  • repo
  • repo:status
  • user:email
  • read:org
    debug: false
    github:
    server: github_server
    apiserver: github_api
    clientid: ID
    clientsecret: SECRET
    skipverify: false
    scope:
  • repo
  • repo:status
  • user:email
  • read:org
    ratelimit: 0
    debug: false
    gitlab:
    server: gitlab
    clientid: “”
    clientsecret: “”
    skipverify: false
    debug: false
    gogs:
    server: “”
    skipverify: false
    debug: false
    stash:
    server: “”
    consumerkey: “”
    consumersecret: “”
    privatekey: “”
    skipverify: false
    debug: false
    {“level”:“info”,“msg”:“main: internal scheduler enabled”,“time”:“2020-11-12T12:31:29Z”}
    {“build.limit”:5000,“expires”:“0001-01-01T00:00:00Z”,“kind”:“trial”,“level”:“debug”,“msg”:“main: license loaded”,“repo.limit”:0,“time”:“2020-11-12T12:31:29Z”,“user.limit”:0}
    {“interval”:“30m0s”,“level”:“info”,“msg”:“starting the cron scheduler”,“time”:“2020-11-12T12:31:29Z”}
    {“interval”:“24h0m0s”,“level”:“info”,“msg”:“starting the zombie build reaper”,“time”:“2020-11-12T12:31:29Z”}
    {“acme”:false,“host”:“VPS_IP:8080”,“level”:“info”,“msg”:“starting the http server”,“port”:“:8080”,“proto”:“https”,“time”:“2020-11-12T12:31:29Z”,“url”:“https://VPS_IP:8080”}
    {“level”:“debug”,“msg”:“events: stream opened”,“request-id”:“SOME_ID”,“time”:“2020-11-12T12:31:29Z”}
    {“arch”:“”,“kernel”:“”,“kind”:“pipeline”,“level”:“debug”,“msg”:“manager: request queue item”,“os”:“”,“time”:“2020-11-12T12:31:34Z”,“type”:“ssh”,“variant”:“”}
    {“arch”:“”,“kernel”:“”,“kind”:“pipeline”,“level”:“debug”,“msg”:“manager: request queue item”,“os”:“”,“time”:“2020-11-12T12:31:34Z”,“type”:“ssh”,“variant”:“”}
    {“commit”:“b10e9f46234423bd4f2835a184df6301322cd525”,“event”:“push”,“level”:“debug”,“msg”:“webhook parsed”,“name”:“repo_name”,“namespace”:“user_name”,“time”:“2020-11-12T12:31:44Z”}
    {“commit”:“b10e9f46234423bd4f2835a184df6301322cd525”,“event”:“push”,“level”:“debug”,“msg”:“trigger: received”,“ref”:“refs/heads/master”,“repo”:“user_name/repo_name”,“time”:“2020-11-12T12:31:44Z”}
    {“fields.time”:“2020-11-12T12:31:44Z”,“latency”:513598197,“level”:“debug”,“method”:“POST”,“msg”:“”,“remote”:“140.82.115.250:62739”,“request”:“/hook”,“request-id”:“SOME_ID”,“time”:“2020-11-12T12:31:44Z”}
    {“level”:“debug”,“msg”:“api: read access granted”,“name”:“repo_name”,“namespace”:“user_name”,“request-id”:“SOME_ID”,“time”:“2020-11-12T12:31:49Z”,“visibility”:“public”}
    {“level”:“debug”,“msg”:“api: read access granted”,“name”:“repo_name”,“namespace”:“user_name”,“request-id”:“SOME_ID”,“time”:“2020-11-12T12:31:49Z”,“visibility”:“public”}
    {“level”:“debug”,“msg”:“api: guest access”,“request-id”:“SOME_ID”,“time”:“2020-11-12T12:31:49Z”}
    {“fields.time”:“2020-11-12T12:31:49Z”,“latency”:2523576,“level”:“debug”,“method”:“GET”,“msg”:“”,“remote”:“37.142.5.223:53774”,“request”:“/api/repos/user_name/repo_name”,“request-id”:“SOME_ID”,“time”:“2020-11-12T12:31:49Z”}
    {“level”:“debug”,“msg”:“api: guest access”,“request-id”:“SOME_ID”,“time”:“2020-11-12T12:31:49Z”}
    {“fields.time”:“2020-11-12T12:31:49Z”,“latency”:2437897,“level”:“debug”,“method”:“GET”,“msg”:“”,“remote”:“37.142.5.223:53772”,“request”:“/api/repos/user_name/repo_name/builds?page=1”,“request-id”:“SOME_ID”,“time”:“2020-11-12T12:31:49Z”}

Runner log:

time=“2020-11-12T12:31:33Z” level=info msg=“starting the server” addr=“:3000”
POST /rpc/v2/ping HTTP/1.1
Host: VPS_IP:8080
User-Agent: Go-http-client/1.1
Content-Length: 0
X-Drone-Token: token
Accept-Encoding: gzip

HTTP/1.1 200 OK
Content-Length: 0
Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Date: Thu, 12 Nov 2020 12:31:34 GMT
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Pragma: no-cache
X-Accel-Expires: 0

time=“2020-11-12T12:31:34Z” level=info msg=“successfully pinged the remote server”
time=“2020-11-12T12:31:34Z” level=info msg=“polling the remote server” capacity=2 endpoint=“http://VPS_IP:8080” kind=pipeline type=ssh
POST /rpc/v2/stage HTTP/1.1
Host: VPS_IP:8080
User-Agent: Go-http-client/1.1
Content-Length: 76
X-Drone-Token: token
Accept-Encoding: gzip

{“kind”:“pipeline”,“type”:“ssh”,“os”:“”,“arch”:“”,“variant”:“”,“kernel”:“”}
POST /rpc/v2/stage HTTP/1.1
Host: VPS_IP:8080
User-Agent: Go-http-client/1.1
Content-Length: 76
X-Drone-Token: token
Accept-Encoding: gzip

{“kind”:“pipeline”,“type”:“ssh”,“os”:“”,“arch”:“”,“variant”:“”,“kernel”:“”}
HTTP/1.1 204 No Content
Content-Length: 0
Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Date: Thu, 12 Nov 2020 12:32:04 GMT
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Pragma: no-cache
X-Accel-Expires: 0

HTTP/1.1 204 No Content
Content-Length: 0
Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Date: Thu, 12 Nov 2020 12:32:04 GMT
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Pragma: no-cache
X-Accel-Expires: 0

POST /rpc/v2/stage HTTP/1.1
Host: VPS_IP:8080
User-Agent: Go-http-client/1.1
Content-Length: 76
X-Drone-Token: token
Accept-Encoding: gzip

{“kind”:“pipeline”,“type”:“ssh”,“os”:“”,“arch”:“”,“variant”:“”,“kernel”:“”}
POST /rpc/v2/stage HTTP/1.1
Host: VPS_IP:8080
User-Agent: Go-http-client/1.1
Content-Length: 76
X-Drone-Token: token
Accept-Encoding: gzip

{“kind”:“pipeline”,“type”:“ssh”,“os”:“”,“arch”:“”,“variant”:“”,“kernel”:“”}
HTTP/1.1 204 No Content
Content-Length: 0
Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Date: Thu, 12 Nov 2020 12:32:44 GMT
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Pragma: no-cache
X-Accel-Expires: 0

HTTP/1.1 204 No Content
Content-Length: 0
Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Date: Thu, 12 Nov 2020 12:32:44 GMT
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Pragma: no-cache
X-Accel-Expires: 0

POST /rpc/v2/stage HTTP/1.1
Host: VPS_IP:8080
User-Agent: Go-http-client/1.1
Content-Length: 76
X-Drone-Token: token
Accept-Encoding: gzip

{“kind”:“pipeline”,“type”:“ssh”,“os”:“”,“arch”:“”,“variant”:“”,“kernel”:“”}
POST /rpc/v2/stage HTTP/1.1
Host: VPS_IP:8080
User-Agent: Go-http-client/1.1
Content-Length: 76
X-Drone-Token: token
Accept-Encoding: gzip

{“kind”:“pipeline”,“type”:“ssh”,“os”:“”,“arch”:“”,“variant”:“”,“kernel”:“”}

Thanks in advance.

You have installed the ssh runner which executes ssh pipelines, however, your yaml file is defined as a docker pipeline which can only be executed by a docker runner. Drone supports different types of yamls and runners. You can learn more about them here.

Perfect,
It’s working now…
Thanks