Drone build doesn't start - shows hourglass

I’m testing Drone for CI/CD. I did the standard installation via Docker (drone:1.0.0-rc.1). I’m using Drone together with Gitea.

When I push to my git repository, Drone notices the push - but it doesn’t start the pipeline. Instead it shows a hourglass:

When I “cancel” the pipeline and do a “retry” it works.

Does anyone has an idea how to start the pipeline directly?

the hourglass indicates a worker has not picked up the build yet. there are two possible reasons that this would happen:

  1. no workers are available / are busy. when you configure drone (single-server) it will only run N concurrent builds. When you configure agents, each agent will only run N concurrent builds. If all workers are busy, the build sits in a pending state until a worker frees up
  2. agents connectivity problems. A build can sit in a pending state when agents are misconfigured and cannot connect to the Drone server to pull builds from the queue.

@bradrydzewski thanks for the reply.

It’s a single server setup with two concurrent builds. There are currently no other builds than the test one :confused: . If I cancel and “restart” by the button it works…

unfortunately I cannot reproduce this behavior. I recommend enabling debug logging to see if you can get any useful information.

I started it with debug logging. I got this one:

drone-server_1_3352391c05b5 | {"commit":"109ef3a634a6d97fcc21ad9cf99411ff046ee58f","event":"push","level":"debug","msg":"webhook parsed","name":"doc","namespace":"asd","time":"2018-11-30T19:27:19Z"}
drone-server_1_3352391c05b5 | {"commit":"109ef3a634a6d97fcc21ad9cf99411ff046ee58f","event":"push","level":"debug","msg":"trigger: received","ref":"refs/heads/master","repo":"asd/doc","time":"2018-11-30T19:27:19Z"}

Is it possible to query the current status (no. of available workers/pipeline capacities)?

I have the same question, if i restart this work i’ll get

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

but it run on v0.8.9.
my yml like this


  drone-agent:
    image: drone/agent:1.0.0-rc.1
    restart: always
    hostname: drone-agent
    depends_on:
      - drone-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_LOGS_DEBUG=true
      - DRONE_RUNNER_CAPACITY=4
      - DRONE_RPC_SECRET=$${mysecret}

@106062 please provide your full configuration (server and agent). Something looks wrong, because you do not provide the agent with DRONE_RPC_SERVER which would be required in order for an agent to connect with the server, which would in turn prevent builds from running.

Furthermore, it is also possible that you have configured your server to run in single-machine-mode (no agents) in which case mounting the volume into the server would be required.

Are you trying to run your server and agent on the same machine? If yes, you do not need an agent and should follow the single-machine setup instructions in the docs.

I’m sorry. that is all. Yes, They are running in the same machine.
I have the single-machine setup, but it not work like the v0.8.9 work. so I find another like to do.

version: '3'

services:
  drone-server:
    image: drone/drone:1.0.0-rc.1
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /var/lib/drone:/data
    restart: always
    environment:
      - DRONE_LOGS_DEBUG=true
      - DRONE_GIT_ALWAYS_AUTH=false
      - DRONE_GITEA=true
      - DRONE_GITEA_SERVER=$${giteahost}
      - DRONR_GITEA_PRIVATE_MODE=true
      - DRONE_OPEN=true
      - DRONE_RUNNER_CAPACITY=4
      - DRONE_RPC_SECRET=$${mysecret}
      - DRONE_SERVER_HOST=$${serverhost}
      - DRONE_SERVER_PROTO=http
      - DRONE_TLS_AUTOCERT=false
  drone-agent:
    image: drone/agent:1.0.0-rc.1
    restart: always
    hostname: drone-agent
    depends_on:
      - drone-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_LOGS_DEBUG=true
      - DRONE_RUNNER_CAPACITY=4
      - DRONE_RPC_SECRET=$${mysecret}

Your configuration is incorrect. Please read the single-machine guide here:
https://docs.drone.io/intro/gitea/single-machine/

Thanks a lot. It’s work now.
But, if i have a new commit, it still not start build until i cancel it,then rebuild.
Should I have another config to gitea or drone?

Facing the same issue here, if I cancel and restart by button it works else it doesn’t pick the build automatically

Edit:
I am running drone together with Gitlab and after enabling debug logs got this -

{“commit”:"",“error”:"",“event”:“push”,“level”:“warning”,“msg”:“trigger: cannot create status”,“ref”:“refs/heads/master”,“repo”:“group/project”,“time”:“2018-12-05T11:28:49Z”}

Not sure how can I fix this, but it looks like drone not able to send the status to agent. But surprisingly everything is perfect if we restart the build from UI, just happing for build triggered via webhook.