Server side error OAuthLogin

I am trying to setup google Google QAuth and getting the above error.
Grafana version: 4.6.3 (docker)
OS: ubuntu 16.04
indent preformatted text by 4 spaces
##Google Client ID for Web application##
Authorized JavaScript origins =
Authorized redirect URIs =

protocol = http
http_port = 3000
domain =
enforce_domain = false
root_url =
router_logging = false
static_root_path = public

enabled = true
allow_sign_up = false
client_id = secret
client_secret = secret
scopes =
auth_url =
token_url = ""
api_url = ""
allowed_domains =


t=2018-02-06T22:01:37+0000 lvl=info msg="Initializing HTTP Server" logger=http.server address= protocol=http subUrl= socket=
t=2018-02-06T22:01:44+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/login/google status=302 remote_addr=46.555.133.83 time_ms=0 size=458 referer=
t=2018-02-06T22:01:48+0000 lvl=eror msg=login.OAuthLogin(NewTransportWithCode) logger=context userId=0 orgId=0 uname= error="oauth2: cannot fetch token: 404 Not Found\nResponse: Not Found"
t=2018-02-06T22:01:48+0000 lvl=eror msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/login/google status=500 remote_addr=46.555.133.83 time_ms=67 size=1140 referer=
    indent preformatted text by 4 spaces
1 Like

I wonder if it is because of the double quotes around the token url (and the API url). The 404 error seems to be for the token url.

Issue is related to Grafana running as a container. When installing it manually it worked as expected. Do you know any specific parameters that are required when running it as a container?

I suppose if the same settings work on a local Grafana then it is not a typo somewhere.

  • Does your container have access to from your container?

  • Is the root_url correct?

This is the full URL used to access Grafana from a web browser. This is important if you use Google or GitHub OAuth authentication (for the callback URL to be correct).

I just verified.

  • The container has access to

  • The root_url is the DNS name and when I ping the DNS it from the host or from the container I get the same IP.

This error is from Google oauth and not from Grafana. Can you turn on debug logging in the ini file so that we can see the debug logging for Grafana oauth:

level = debug