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

Fiat health is always down due to LDAP health check NPE #4346

Closed
dibyom opened this issue Apr 26, 2019 · 1 comment · Fixed by spinnaker/fiat#405
Closed

Fiat health is always down due to LDAP health check NPE #4346

dibyom opened this issue Apr 26, 2019 · 1 comment · Fixed by spinnaker/fiat#405

Comments

@dibyom
Copy link
Member

dibyom commented Apr 26, 2019

Issue Summary:

After the spring boot2 upgrade, the fiat health checks always report status DOWN. This is due to an LDAP health check failing with a NullPointer exception.

Not sure why the LDAP health check is run even when LDAP is not the role provider being used.

Description:

Steps to Reproduce:

  1. Start Fiat: ./gradlew
  2. curl 0:7003/health

Additional Details:

2019-04-26 17:27:12.232  WARN 164148 --- [0.1-7003-exec-2] o.s.b.actuate.ldap.LdapHealthIndicator   : LDAP health check failed                           
                
java.lang.NullPointerException: null                  
        at java.util.Hashtable.put(Hashtable.java:460) ~[na:1.8.0_181-google-v7]  
        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:2.3.2.RELEASE]
        at org.springframework.boot.actuate.ldap.LdapHealthIndicator.doHealthCheck(LdapHealthIndicator.java:50) ~[spring-boot-actuator-2.1.4.RELEASE.jar:2.1.4.RELEASE]
        at org.springframework.boot.actuate.health.AbstractHealthIndicator.health(AbstractHealthIndicator.java:84) ~[spring-boot-actuator-2.1.4.RELEASE.jar:2.1.4.RELEASE]
        at org.springframework.boot.actuate.health.CompositeHealthIndicator.health(CompositeHealthIndicator.java:98) [spring-boot-actuator-2.1.4.RELEASE.jar:2.1.4.RELEASE]
        at org.springframework.boot.actuate.health.HealthEndpoint.health(HealthEndpoint.java:50) [spring-boot-actuator-2.1.4.RELEASE.jar:2.1.4.RELEASE]
        at org.springframework.boot.actuate.health.HealthEndpointWebExtension.health(HealthEndpointWebExtension.java:54) [spring-boot-actuator-2.1.4.RELEASE.jar:2.1.4.RELEASE]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181-google-v7]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181-google-v7]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43
@dibyom
Copy link
Member Author

dibyom commented Apr 26, 2019

I think we might be running into the issue described here:https://stackoverflow.com/questions/46916921/spring-boot-actuator-ldap-health-endpoint-throwing-npe

There is a fix but its not released yet: spring-projects/spring-ldap#473

The suggested workaround works. Health check passes if I set this in fiat-local.yml:
management.health.ldap.enabled=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant