Drone running on GCP timing out 60% of the time

Hi, I’ve read multiple threads about a similar issue, but none of the solutions worked in my case. I’m using a 8core/64GB VM in Google Cloud Platform and deployed Drone 1.0 using Docker Swarm.

Almost every time I deployed a build, it gets stuck in the clone step and ends up timing out against github:

|1|Initialized empty Git repository in /drone/src/.git/|
| --- | --- |
|2|+ git fetch origin +refs/heads/dev/6.x.x:|
|3|fatal: unable to access 'https://github.com/companyrepo/riot-core-ui.git/': Failed to connect to github.com port 443: Operation timed out|

sometimes it works and from the server I don’t have any connectivity issue with GitHub. Any ideas on how to troubleshoot?

I can say with certainty this is a networking issue, perhaps with dns or perhaps with outbound firewall configuration on your instance, but not an issue specific to Drone itself.

If we break down this error, we observe the git command line utility cannot connect to public the github address from inside a docker container, where the docker container is attached to a user-defined network.

I would not be surprised if you could reproduce the problem running pure docker commands:

docker network create foo
docker run --network=foo -t -i alpine ping -c 1 github.com
1 Like

yeah, I’ve escalated this to my gcp partner. Indeed, there are connectivity issues between my instance and github. Thanks for the response!