From 1c85051e0b9ec5d760b4744ff5d72e5a169615cc Mon Sep 17 00:00:00 2001 From: andotorg Date: Tue, 15 Jun 2021 20:16:38 +0800 Subject: [PATCH] add ldap print error log (#6068) --- .../console/security/nacos/LdapAuthenticationProvider.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/console/src/main/java/com/alibaba/nacos/console/security/nacos/LdapAuthenticationProvider.java b/console/src/main/java/com/alibaba/nacos/console/security/nacos/LdapAuthenticationProvider.java index 1749dc395..11a36fccb 100644 --- a/console/src/main/java/com/alibaba/nacos/console/security/nacos/LdapAuthenticationProvider.java +++ b/console/src/main/java/com/alibaba/nacos/console/security/nacos/LdapAuthenticationProvider.java @@ -138,7 +138,11 @@ public class LdapAuthenticationProvider implements AuthenticationProvider { try { ctx = new InitialLdapContext(env, null); } catch (CommunicationException e) { + LOG.error("LDAP Service connect timeout:{}", e.getMessage()); throw new RuntimeException("LDAP Service connect timeout"); + } catch (javax.naming.AuthenticationException e) { + LOG.error("login error:{}", e.getMessage()); + throw new RuntimeException("login error!"); } catch (Exception e) { LOG.warn("Exception cause by:{}", e.getMessage()); return false;