Weird 404 error on runners with RPC v2 not with v1


I am new to Drone, so please excuse any ignorant assumptions I might make on the service :). I have been trying to set up a small CI/CD on Raspberry Pi with Drone + Gitea + Docker private registry. Hereby are my details and the errors I am getting:

  • System: ARM v7, Debian buster, kernel 4.19.75-v7, Docker 19.03.6

  • Drone Docker: I am using a home-built container (based on golang:1.14-buster image), as I have been experiencing issues similar to this topic.
    –> I basically built the binary following the community edition instructions
    –> golang version 1.11~1+b6

Hereby the way I launch the container:

      - "8080:80"
        [local domain].local: ""
        DRONE_OPEN: 'true' # changed to true as a test
        DRONE_AGENTS_ENABLED: 'true' # added this later as a test
        DRONE_GITEA_SERVER: http://[local domain].local:3000
        DRONE_GITEA_CLIENT_ID: 01010101010010101
        DRONE_GITEA_CLIENT_SECRET: some_secret
        DRONE_RPC_SECRET: generated with openssl
        DRONE_GIT_ALWAYS_AUTH: 'false'
        DRONE_SERVER_PROTO: 'http'
        DRONE_SERVER_HOST: [local domain].local:8080
        DRONE_TLS_AUTOCERT: 'false'
        DRONE_LOGS_DEBUG: 'true'
  • Drone runner Docker:
    –> I have used the docker-runner-docker:1 image recommended in the Gitea installation
docker run -d \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -e DRONE_RPC_PROTO=http \
  -e DRONE_RPC_HOST=drone-server:80 \
  -e DRONE_RPC_SECRET=same as the one generated with openssl for the server \
  --link drone-server \
  --add-host [local domain].local: \
  --restart always \
  --name runner \

The errors I am currently getting are the following:

HTTP/1.1 404 Not Found
Content-Length: 19
Content-Type: text/plain; charset=utf-8
Date: Sun, 15 Mar 2020 12:30:22 GMT
X-Content-Type-Options: nosniff

404 page not found
time="2020-03-15T12:30:22Z" level=error msg="cannot ping the remote server" error="404 page not found\n"
POST /rpc/v2/ping HTTP/1.1
Host: drone-server:80
User-Agent: Go-http-client/1.1
Content-Length: 0
X-Drone-Token: <generated with openssl>
Accept-Encoding: gzip

As you can see, there a couple of important points of my setup:
–> for now, both the runner and the server run on the same server
–> I am using the Docker DNS to reach the server
–> I also use the .local domain for my Raspberry Pi
–> for now, none of them runs behind a proxy currently

The strangest thing is that I can arrive from the runner to the server on the RPC v1 routes:

curl -I http://drone-server
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Content-Type: text/html; charset=UTF-8
Expires: Thu, 01 Jan 1970 01:00:00 CET
Pragma: no-cache
X-Accel-Expires: 0
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block
Date: Sun, 15 Mar 2020 12:24:02 GMT
Content-Length: 786

/ # curl -I http://drone-server/rpc
HTTP/1.1 200 OK
Date: Sun, 15 Mar 2020 12:24:05 GMT

/ # curl -I http://drone-server/rpc/v2/ping
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Sun, 15 Mar 2020 12:24:08 GMT
Content-Length: 19

/ # curl -I http://drone-server/rpc/v2/
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Sun, 15 Mar 2020 12:24:10 GMT
Content-Length: 19

/ # curl -I http://drone-server/rpc/v1
HTTP/1.1 200 OK
Date: Sun, 15 Mar 2020 12:24:11 GMT

/ # curl -I http://drone-server/rpc/v1/ping
HTTP/1.1 200 OK
Date: Sun, 15 Mar 2020 12:24:13 GMT

/ # curl -I http://drone-server/rpc/v1/request
HTTP/1.1 200 OK
Date: Sun, 15 Mar 2020 12:25:09 GMT

/ # curl -I http://drone-server/rpc/v2/request
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Sun, 15 Mar 2020 12:25:13 GMT
Content-Length: 19

Other than that, the RPC secret seems to be fine, I have double checked it is the same.

Do you know what can be the issue here? I can also provide the docker inspect of both containers as I didn’t want to make the post any longer.

Thanks a lot!

Hi, does anyone know what can be happening in this case? Is there any information missing?

The Community Edition uses an embedded runner only. You might need to add DRONE_AGENTS_ENABLED=false to enable the embedded runner.

Great, tnx for the answer @ashwilliams1. I will certainly try that :). I actually tried to add runners after installing only the server and seeing my builds we being kept in “pending” state, so I read it can be due to lack of runners…

Is there somewhere i can find this in the docs? I was not aware. The runners pages don’t say anything about differences between the editions and the server config reference also does not list such an option. Even more: if I search for “agent”, there is only one real result in the gogs section, which seems like it should be “runner”. Are they the same as agents?

And why does ...AGENTS_ENABLED=false(e.g. “disabled”) enable the internal runner?

Ok, I realise that this might be outdated by now. I’ll create a new post (I also have a 404 problem)