Skip to content

Instantly share code, notes, and snippets.

@douglasmiranda
Created July 19, 2018 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglasmiranda/73a56f51ea50749e0802100cf469c2d8 to your computer and use it in GitHub Desktop.
Save douglasmiranda/73a56f51ea50749e0802100cf469c2d8 to your computer and use it in GitHub Desktop.
Drone agent loses connection when deployed with Docker Swarm

Solution:

In your Drone server set the environment variable:

DRONE_KEEPALIVE_MIN_TIME: 5s

In your Drone agent set the environment variables:

DRONE_KEEPALIVE_TIME: 20s
DRONE_KEEPALIVE_TIMEOUT: 20s

This is an issue for Drone 0.8.5, as I write this in 2018-07-19.

With Kubernetes it seems to be a problem too.

Your Drone agent could show logs like:

grpc error: done(): code: Unavailable: rpc error: code = Unavailable desc = grpc: the connection is unavailable

grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup drone-server on 127.0.0.11:53: no such host"; Reconnecting to {drone-server:9000 <nil>}

This thread mentions possible fixes in progress and some alternative fixes:

https://discourse.drone.io/t/0-8-1-agent-loses-connection-overnight/864/23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment