Hello,
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:
[...]
ports:
- "8080:80"
extra_hosts:
[local domain].local: "192.168.1.110"
env:
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_RUNNER_CAPACITY: '2'
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 \
-e DRONE_RUNNER_CAPACITY=2 \
-e DRONE_RUNNER_NAME=${HOSTNAME} \
-e DRONE_RPC_DUMP_HTTP=true \
-e DRONE_RPC_DUMP_HTTP_BODY=true \
--link drone-server \
--add-host [local domain].local:192.168.1.110 \
--restart always \
--name runner \
drone-runner-docker:1
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!