Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 : NPE with ldap healthcheck #111

Open
juwit opened this issue Aug 19, 2019 · 0 comments
Open

🐛 : NPE with ldap healthcheck #111

juwit opened this issue Aug 19, 2019 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@juwit
Copy link
Member

juwit commented Aug 19, 2019

Describe the bug
When gaia is connected to a LDAP server, spring-boot-actuator health performs LDAP healthcheck.

Workaround
Set the property management.health.ldap.enabled=false.
Wait to spring-ldap 2.3.3 to be released.

To Reproduce
Steps to reproduce the behavior:

  1. Connect Gaia to a LDAP server
  2. Go to {url}/admin/health
  3. See 503 error with DOWN status
  4. See exception in stacktrace

Expected behavior
Status should be UP with no exception

Stacktrace

2019-08-19 08:08:34.547 TRACE 1 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : GET "/admin/health", parameters={}, headers={masked} in DispatcherServlet 'dispatcherServlet'
2019-08-19 08:08:34.548 TRACE 1 --- [nio-8080-exec-1] o.s.w.m.support.InvocableHandlerMethod   : Arguments: [null]
2019-08-19 08:08:34.548 TRACE 1 --- [nio-8080-exec-1] o.s.w.m.support.InvocableHandlerMethod   : Arguments: [null, null]
2019-08-19 08:08:34.548 TRACE 1 --- [nio-8080-exec-1] .w.s.m.m.a.ServletInvocableHandlerMethod : Arguments: [SecurityContextHolderAwareRequestWrapper[ org.springframework.security.web.header.HeaderWriterFilter$HeaderWriterRequest@13782a45], null]
2019-08-19 08:08:34.550  WARN 1 --- [nio-8080-exec-1] o.s.b.actuate.ldap.LdapHealthIndicator   : LDAP health check failed

java.lang.NullPointerException: null
	at java.base/java.util.Hashtable.put(Hashtable.java:475) ~[na:na]
	at org.springframework.ldap.core.support.SimpleDirContextAuthenticationStrategy.setupEnvironment(SimpleDirContextAuthenticationStrategy.java:42) ~[spring-ldap-core-2.3.2.RELEASE.jar!/:2.3.2.RELEASE]
	at org.springframework.ldap.core.support.AbstractContextSource.setupAuthenticatedEnvironment(AbstractContextSource.java:194) ~[spring-ldap-core-2.3.2.RELEASE.jar!/:2.3.2.RELEASE]
	at org.springframework.ldap.core.support.AbstractContextSource.getAuthenticatedEnv(AbstractContextSource.java:582) ~[spring-ldap-core-2.3.2.RELEASE.jar!/:2.3.2.RELEASE]
	at org.springframework.ldap.core.support.AbstractContextSource.doGetContext(AbstractContextSource.java:134) ~[spring-ldap-core-2.3.2.RELEASE.jar!/:2.3.2.RELEASE]
	at org.springframework.ldap.core.support.AbstractContextSource.getReadOnlyContext(AbstractContextSource.java:158) ~[spring-ldap-core-2.3.2.RELEASE.jar!/:2.3.2.RELEASE]
	at org.springframework.ldap.core.LdapTemplate.executeReadOnly(LdapTemplate.java:802) ~[spring-ldap-core-2.3.2.RELEASE.jar

Desktop (please complete the following information):

  • OS: Centos 7.6
  • Browser : firefox
  • Version: 68.0.2

Additional context
Related to a spring-ldap issue : spring-projects/spring-ldap#473.

@juwit juwit added the 🐛 bug Something isn't working label Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant