Drone-server EE vs CE

I’ve exhausted the 5K builds limit on my drone server, so I decided to switch to CE. I have successfully (? , not so sure at the moment) built the CE image, and have ran some builds on it, then the runner-server chain eventually broke down with bunch of errors in runner:

level=error msg="cannot ping the remote server" error="404 page not found\n"

and these are errors the runner is getting on POST /rpc/v2/ping requests.
The thing is - I’ve set up the drone chain in a swarm stack, so if I’m doing one singe change - if I switch CE to EE using the image line in the yaml manifest - everything is back to normal.

So, why is the runner unable to ping the drone server when the server is running CE image ?

Thanks.

Hello @drook

It will be difficult to troubleshoot a docker image you have built yourself, but let’s give it a shot…

When you built the image, had you checked out a specific tag? If so, did the tag match the version of the drone EE docker image you are running that works?

I actually did - I’ve checked out the v2.9.1. However, - you’re totally right- I’m running tagless latest GA image for EE.

I also did some other weird stuff - I mean, we all have some Dunning-Kruger stuff going on, and I’m pretty sure this did not affect the entire logic of what’s happening, bit this may be just it.

Things that went south during the build and how I’ve fixed them:

  • the binary has been built just flawlessly (god bless the go/make stuff authors, and may they live long and prosper)
  • then I assumed that I’m not the smartest guy around, and there’s definitely have to be some Dockerfiles around, or some script stuff that developers use to build the images; and there was a bunch of both
  • I found ./scripts and ./docker directories; found not much use of the first, but the second was quite useful
  • however (and this fact I don’t understand) the provided amd64 server Dockerfile based on alpine was totally unable to use the drone-server glibc-built binary, so I had to slightly modify the Dockerfile, so the final image was able to run the binary:
--- Dockerfile.server.linux.amd64       2022-03-31 22:45:01.555382097 +0500
+++ Dockerfile  2022-04-01 00:51:00.038061613 +0500
@@ -1,10 +1,9 @@
-# docker build --rm -f docker/Dockerfile -t drone/drone .
-
 FROM alpine:3.11 as alpine
+
 RUN apk add -U --no-cache ca-certificates

 FROM alpine:3.11
-EXPOSE 80 443
+
 VOLUME /data

 RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
@@ -22,5 +21,13 @@

 COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

-ADD release/linux/amd64/drone-server /bin/
-ENTRYPOINT ["/bin/drone-server"]
\ No newline at end of file
+ADD ./drone-server /bin/
+
+RUN apk --no-cache add ca-certificates wget
+RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
+RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk
+RUN apk add glibc-2.28-r0.apk
+
+EXPOSE 80 443
+
+ENTRYPOINT ["/bin/drone-server"]

That’s actually the end of it, I would be happy to hear how does one really build the drone CE docker image. And yeah, that Dunning-Kruger stuff still makes me doubt that my modifications somehow jeopardized the ping logic - after all, it’s the same binary that was built without errors, right ?

Furthermore, I spent some time observing the drone-runner logic - seems like when working with the EE image it doesn’t ping the server that much/of all.