ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hari Sekhon (JIRA)" <j...@apache.org>
Subject [jira] [Created] (RANGER-216) Ranger UserSync property parsing errors
Date Tue, 13 Jan 2015 15:43:34 GMT
Hari Sekhon created RANGER-216:
----------------------------------

             Summary: Ranger UserSync property parsing errors
                 Key: RANGER-216
                 URL: https://issues.apache.org/jira/browse/RANGER-216
             Project: Ranger
          Issue Type: Bug
    Affects Versions: 0.4.0
         Environment: HDP 2.2
            Reporter: Hari Sekhon


In install.properties quoting the ldap url
{code}SYNC_LDAP_URL = "ldap://host.domain.com:389"{code}
results in the following Java exception in /var/log/ranger/usersync/usersync.log:
{code}java.lang.NumberFormatException: For input string: "389""
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:492)
        at java.lang.Integer.parseInt(Integer.java:527)
        at com.sun.jndi.toolkit.url.Uri.parse(Uri.java:232)
        at com.sun.jndi.toolkit.url.Uri.init(Uri.java:138)
        at com.sun.jndi.ldap.LdapURL.<init>(LdapURL.java:85)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:164)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:211)
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154)
        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:84)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
        at javax.naming.InitialContext.init(InitialContext.java:242)
        at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:153)
        at com.xasecure.ldapusersync.process.LdapUserGroupBuilder.createLdapContext(LdapUserGroupBuilder.java:121)
        at com.xasecure.ldapusersync.process.LdapUserGroupBuilder.updateSink(LdapUserGroupBuilder.java:185)
        at com.xasecure.usergroupsync.UserGroupSync.run(UserGroupSync.java:59)
        at java.lang.Thread.run(Thread.java:745)
{code}
Since xa_ldap_url in ranger-admin's install.properties is quoted in the example in that file
and seems to work it's natural that the next step of configuring usersync should also handle
quoted values and do basic stripping as standard.

Removing quotes around LDAP URL the next exception occurs as expected too:
{code}javax.naming.AuthenticationException: [LDAP: error code 32 - No Such Object]
        at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:293)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2740)
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:316)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:193)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:211)
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154){code}
At which point I removed all quotes from all settings to resolve these exceptions.

Regards,

Hari Sekhon
http://www.linkedin.com/in/harisekhon



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message