Login with Providers (google,facebook) ERROR

Hey everyone,
Sometimes I get this error when auth with a provider,
sometimes work, sometimes no.
Anyone have any ideia what is happening ?

14:38:07,012 WARN [org.keycloak.events] (default task-73) type=LOGIN_ERROR, realmId=Dev, clientId=null, userId=null, ipAddress=****, error=identity_provider_login_failure

ERROR [org.keycloak.broker.oidc.AbstractOAuth2IdentityProvider] (default task-73) Failed to make identity provider oauth callback: java.net.UnknownHostException: oauth2.googleapis.com: Name or service not known

ERROR [org.keycloak.broker.oidc.AbstractOAuth2IdentityProvider] (default task-73) Failed to make identity provider oauth callback: java.net.UnknownHostException: graph.facebook.com: Name or service not known

Update:

just only google return me a error:
Failed to make identity provider oauth callback: java.net.UnknownHostException: oauth2.googleapis.com: Name or service not known

@edianogama

were you able to solve this issue?

I’m hitting the same problem.

Check if your keycloak server can resolve those URL.

Name or service not known points definitely to a network problem. That means java could not resolve (turn the hostname into an IP) before doing a request to those services. You should check the dns resolution on the machine where keycloak is running.

If keycloak is running in a vm, try logging into that VM and ping oauth2.googleapis.com

If it’s a container, try execin a bash into it and pinging.