504 Gateway Timeout when login to grafana with keycloak

Hello, i’m using grafana with oauth integration the same config works for other environments but in my current environment I get 504 Gateway Timeout when I click on login, when I checked grafana logs I get this:
lvl=eror msg=login.OAuthLogin(NewTransportWithCode) logger=context userId=0 orgId=0 uname= error=“Post “http://my.domain.com/auth/realms/my-realm/protocol/openid-connect/token”: dial tcp x.x.x.x:80: connect: connection timed out”

grafana is running over nginx ingress this is my config :slight_smile :

GF_AUTH_BASIC_ENABLED: false
GF_SERVER_ROOT_URL: "%(protocol)s://%(domain)s:/grafana"
GF_AUTH_DISABLE_LOGIN_FORM: true
GF_AUTH_GENERIC_OAUTH_ENABLED: true
GF_AUTH_GENERIC_OAUTH_NAME: "Oauth"
GF_AUTH_GENERIC_OAUTH_EMAIL_ATTRIBUTE_NAME: "email:primary"
GF_AUTH_GENERIC_OAUTH_SCOPES: "openid profile email"
GF_AUTH_GENERIC_OAUTH_ALLOW_SIGN_UP: true
GF_AUTH_GENERIC_OAUTH_CLIENT_ID: "grafana"
GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
GF_AUTH_GENERIC_OAUTH_AUTH_URL: "http://my-domain.com/auth/realms/my-realm/protocol/openid-connect/auth"
GF_AUTH_GENERIC_OAUTH_TOKEN_URL: "http://my-domain.com/auth/realms/my-realm/protocol/openid-connect/token"
GF_AUTH_GENERIC_OAUTH_API_URL: "http://my-domain.com/auth/realms/my-realm/protocol/openid-connect/userinfo"
GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH: "contains(roles[*], 'admin') && 'Admin'
|| contains(roles[*], 'Editor') && 'Editor' || 'Viewer'"
GF_SERVER_DOMAIN: "my-domain.com"