Drone kubernetes runner cannot ping the remote server 301 Moved Permanently

I was using drone in kubernetes and everything was working fine.

  • I have installed drone with helm
  • I configured drone and runner on http protocol.

Everything was working good. Then I decided to move drone protocol from http to https. I changed the environment variables and upgrade the helm. Then it started giving me this error

time=“2021-08-25T20:32:14Z” level=error msg=“cannot ping the remote server” error=“301 Moved Permanently<body bgcolor=“white”>301 Moved Permanentlynginx/1.14.0 (Ubuntu)”

These are the env variables i am passing
DRONE_RPC_HOST: “drone.stage.mywebsite.com
DRONE_SERVER_PROTO: https
DRONE_RPC_SECRET: “*****”
DRONE_RUNNER_CAPACITY: “2”
DRONE_NAMESPACE_DEFAULT: “drone”
DRONE_LOGS_TRACE: “true”

Status code 301 tells that drone runner is still using http protocol for pinging the drone server. And the ping request is redirected to https from nginx.
Any suggestion how can I resolve this issue ??

I cannot speak to your nginx configuration, but if you want the runner to use https, you need to set DRONE_RPC_PROTO=https

Thanks bradrydzewski
It was my typo mistake, I was using DRONE_SERVER_PROTO env variable instead of DRONE_RPC_PROTO for drone runner.