You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Charles Hedrick (JIRA)" <ji...@apache.org> on 2018/06/04 19:58:00 UTC

[jira] [Created] (AMBARI-24029) ldap sync with one user doesn't work

Charles Hedrick created AMBARI-24029:
----------------------------------------

             Summary: ldap sync with one user doesn't work
                 Key: AMBARI-24029
                 URL: https://issues.apache.org/jira/browse/AMBARI-24029
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.6.0
            Reporter: Charles Hedrick


Tried to do 

ambari-server sync-ldap --users=users.txt

with the file containing one line. Got error

LdapSyncEventResourceProvider:460 - Caught exception running LDAP sync.
java.lang.NullPointerException
 at org.apache.ambari.server.security.ldap.AmbariLdapDataPopulator.getFilteredLdapUsers(AmbariLdapDataPopulator.java:675)
 at org.apache.ambari.server.security.ldap.AmbariLdapDataPopulator.getFilteredLdapUsers(AmbariLdapDataPopulator.java:652)
 at org.apache.ambari.server.security.ldap.AmbariLdapDataPopulator.getLdapUsers(AmbariLdapDataPopulator.java:456)
 at org.apache.ambari.server.security.ldap.AmbariLdapDataPopulator.synchronizeLdapUsers(AmbariLdapDataPopulator.java:283)

According to documentation, processor.getCookie() should aways return non-null. At the end, processor.getCookie().getCookie() should be null. However in fact processor.getCookie()  apparently returned null. Using

} while (configuration.getLdapServerProperties().isPaginationEnabled()
 && processor.getCookie() != null && processor.getCookie().getCookie() != null);

worked, at least for this case. I should note that actually building this thing was a bit of a challenge.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)