0

I'm running drone CI. I have a build that just wont stop. It's status is running but I cant stop it because Cannot cancel a non-running build. Here are the exact commands.

sheena@ci:~$ drone build info waxd/waxed_backend 302
Number: 302
Status: running
Event: push
Commit: 511afb747007b9712a0bd00c663369de4ae81188
Branch: dev
Ref: refs/heads/dev
Message: xxxxxxxxxxxxxx

Author: Sheena

sheena@ci:~$ drone build stop waxd/waxed_backend 302
client error 400: Cannot cancel a non-running build

The only solution I can see right now is to delete drone's database and then re-create all secrets etc. But that is something I would very much like to avoid.

On the up side, this "running" build isn't blocking other builds. Even on the same repo.

Sheena
  • 15,590
  • 14
  • 75
  • 113
  • this usually happens when you unexpectedly lose an agent while the build is running (like you restart the server, upgrade the agent, etc). It gets stuck in a zombie state. It can also be a symptom of larger problems with your install such as network issues between the agent and server (often seen when you have a proxy or load balancer between the agent and server) – Brad Rydzewski Dec 14 '17 at 23:03

2 Answers2

1

delete the build container manually,, every time the drone build start, it would automatically create a container based on your .drone.yml .. so if you take a look at your server using docker ps you will see the running container,, stop it using docker stop $containerID or docker kill $containerID

Fendi jatmiko
  • 2,567
  • 1
  • 9
  • 15
1

Fixed it usin the drone CLI. Something like:

> drone build info  org/repo
Number: 292
Status: running
Event: push
Commit: 226d553fd3bfa74199e6eb77dd18c65a62b72
...
> drone build kill  org/repo 292
Force killing build org/repo#292
Sheena
  • 15,590
  • 14
  • 75
  • 113