Spinnaker: Fiat health is always down due to LDAP health check NPE

Created on 26 Apr 2019  路  1Comment  路  Source: spinnaker/spinnaker

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
bug componenfiat

Most helpful comment

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: https://github.com/spring-projects/spring-ldap/issues/473

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

>All comments

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: https://github.com/spring-projects/spring-ldap/issues/473

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

Was this page helpful?
0 / 5 - 0 ratings