Timeout when authenticating with Github (oauth)

Today I could not log in to my Drone CI instance which has been running successfully for many months.

In the browser I simply see “oauth_error”.

Looking at the docker logs I see:

time="2018-01-10T14:54:52Z" level=error msg="cannot authenticate user. Post https://github.com/login/oauth/access_token: dial tcp: lookup github.com on 127.0.0.11:53: read udp 127.0.0.1:48404->127.0.0.11:53: i/o timeout" 

Would this indicate a timeout with the Github API, or something else?

Yes, it would indicate that your host machine was unable to reach the GitHub server. According to status.github.com they are currently experiencing a service outage.

Thanks, I saw the github status, supposedly it had been resolved.

If I remove the github oauth application for Drone from my personal github account (the one I login with) Drone does show the page which asks for permissions to access the repos and email address etc.

I’ll try again tomorrow :slight_smile:

If I remove the github oauth application for Drone from my personal github account (the one I login with) Drone does show the page which asks for permissions to access the repos and email address etc.

As part of the oauth flow, you are redirected from Drone to GitHub. Please note that this is a client-side redirect, which means the redirect is happening in your browser, on your laptop. It would not, therefore, confirm the server’s ability to reach GitHub.

Once you authorize access, GitHub will redirect you back to the Drone server. The Drone server will then make an API call to github.com and request an oauth access token. Based on your error message, we can see that this API call is failing.

The error message indicates your Drone server is unable to reach github.com with an i/o timeout. This is a low level network error coming from the tcp package in the Go standard library. If the Go standard library cannot establish a TCP connection, we can be reasonably sure there is a network issue somewhere in your stack.

If you continue to experience issues, you could run the drone/drone:0.8-alpine image, which supports a bash command prompt, and exec into the container and try to curl the github.com endpoint and attempt to reproduce connectivity issues.

Hope that helps!

Thanks for the explanation, appreciated. I still can’t log in today, same error.

From the server I can curl github from the server (not the docker server image, but the host machine).

I’ll look at upgrading, thanks.

So I tried restarting docker service, service docker restart, and all is good again!