<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Knox to MIT KDC, socket closed in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119848#M82626</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12513/jknulst.html" nodeid="12513"&gt;@Jasper&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The first thing I see that is probably incorrect is your UTL for the main.ldapRealm.contextFactory.url. You specify port 88 of the URL. LDAP listens on port 389 by default (636 for LDAPS).&lt;/P&gt;&lt;P&gt;Change:&lt;/P&gt;&lt;PRE&gt; &amp;lt;value&amp;gt;ldap://xxxxxxxxxxxxx:88&amp;lt;/value&amp;gt;&lt;/PRE&gt;&lt;P&gt;to &lt;/P&gt;&lt;PRE&gt; &amp;lt;value&amp;gt;ldap://xxxxxxxxxxxxx:389&amp;lt;/value&amp;gt;&lt;/PRE&gt;&lt;P&gt;That should get you along the way.&lt;/P&gt;</description>
    <pubDate>Sat, 08 Oct 2016 09:13:37 GMT</pubDate>
    <dc:creator>emaxwell</dc:creator>
    <dc:date>2016-10-08T09:13:37Z</dc:date>
    <item>
      <title>Knox to MIT KDC, socket closed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119847#M82625</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Trying to get a Know gateway up and running. Know will not connect to local MIT KDC. On checking with the CLI utils (knoxcli.sh system-user-auth-test &amp;amp;  user-auth-test ) we get following error :&lt;/P&gt;&lt;PRE&gt;/usr/hdp/2.4.2.0-258/knox/bin&amp;gt; ./knoxcli.sh --d system-user-auth-test --cluster default

org.apache.shiro.authc.AuthenticationException: LDAP naming error while attempting to authenticate user. 10.xxx.xxx.x1:88; socket closed
org.apache.shiro.authc.AuthenticationException: LDAP naming error while attempting to authenticate user.
        at org.apache.shiro.realm.ldap.JndiLdapRealm.doGetAuthenticationInfo(JndiLdapRealm.java:303)
        at org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm.doGetAuthenticationInfo(KnoxLdapRealm.java:177)    at org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:568)
        at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doSingleRealmAuthentication(ModularRealmAuthenticator.java:180)
        at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:267) at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198)
        at org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106)
        at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:270)
        at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:256)
        at org.apache.hadoop.gateway.util.KnoxCLI$LDAPCommand.authenticateUser(KnoxCLI.java:1037)
        at org.apache.hadoop.gateway.util.KnoxCLI$LDAPCommand.testSysBind(KnoxCLI.java:1139)
        at org.apache.hadoop.gateway.util.KnoxCLI$LDAPSysBindCommand.execute(KnoxCLI.java:1446)
        at org.apache.hadoop.gateway.util.KnoxCLI.run(KnoxCLI.java:138)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        at org.apache.hadoop.gateway.util.KnoxCLI.main(KnoxCLI.java:1643)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.gateway.launcher.Invoker.invokeMainMethod(Invoker.java:70)
        at org.apache.hadoop.gateway.launcher.Invoker.invoke(Invoker.java:39)
        at org.apache.hadoop.gateway.launcher.Command.run(Command.java:101)
        at org.apache.hadoop.gateway.launcher.Launcher.run(Launcher.java:69)
        at org.apache.hadoop.gateway.launcher.Launcher.main(Launcher.java:46)
Caused by: javax.naming.ServiceUnavailableException: 10.xxx.xxx.x1:88; socket closed
        at com.sun.jndi.ldap.Connection.readReply(Connection.java:454)
        at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:365)
        at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:214)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2788)
        at com.sun.jndi.ldap.LdapCtx.&amp;lt;init&amp;gt;(LdapCtx.java:319)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:192)
        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:210)
        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:153)
        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:83)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
        at javax.naming.InitialContext.init(InitialContext.java:244)
        at javax.naming.ldap.InitialLdapContext.&amp;lt;init&amp;gt;(InitialLdapContext.java:154)
        at org.apache.shiro.realm.ldap.JndiLdapContextFactory.createLdapContext(JndiLdapContextFactory.java:508) at org.apache.shiro.realm.ldap.JndiLdapContextFactory.getLdapContext(JndiLdapContextFactory.java:495)    at org.apache.shiro.realm.ldap.JndiLdapRealm.queryForAuthenticationInfo(JndiLdapRealm.java:375)
        at org.apache.shiro.realm.ldap.JndiLdapRealm.doGetAuthenticationInfo(JndiLdapRealm.java:295)
        ... 23 more
Unable to successfully bind to LDAP server with topology credentials. Are your parameters correct?
&lt;/PRE&gt;&lt;P&gt;Socket is definitely open and reachable, since we can get to it with netcat and telnet. Knox system user used can login to kadmin without problems.&lt;/P&gt;&lt;P&gt;Any idea's ?&lt;/P&gt;&lt;P&gt;topology is below:&lt;/P&gt;&lt;PRE&gt;&amp;lt;topology&amp;gt;
    &amp;lt;gateway&amp;gt;
        &amp;lt;provider&amp;gt;
            &amp;lt;role&amp;gt;authentication&amp;lt;/role&amp;gt;
            &amp;lt;name&amp;gt;ShiroProvider&amp;lt;/name&amp;gt;
            &amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;sessionTimeout&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;30&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;!-- changes for AD/user sync --&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapContextFactory&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;org.apache.hadoop.gateway.shirorealm.KnoxLdapContextFactory&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;!-- main.ldapRealm.contextFactory needs to be placed before other main.ldapRealm.contextFactory* entries  --&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm.contextFactory&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;$ldapContextFactory&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;!-- AD url --&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm.contextFactory.url&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;ldap://xxxxxxxxxxxxx:88&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;!-- system user --&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm.contextFactory.systemUsername&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;CN=admin,DC=HADOOP,DC=COM&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;!-- pass in the password using the alias created earlier --&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm.contextFactory.systemPassword&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;#####&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
      &amp;lt;!--      &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm.contextFactory.authenticationMechanism&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;kerberos&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt; --&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;urls./**&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;authcBasic&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;!--  AD groups of users to allow --&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm.searchBase&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;DC=HADOOP,DC=COM&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm.userObjectClass&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;person&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm.userSearchAttributeName&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;sAMAccountName&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;!-- changes needed for group sync--&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm.authorizationEnabled&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm.groupSearchBase&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;DC=HADOOP,DC=COM&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm.groupObjectClass&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;group&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
            &amp;lt;param&amp;gt;
                &amp;lt;name&amp;gt;main.ldapRealm.groupIdAttribute&amp;lt;/name&amp;gt;
                &amp;lt;value&amp;gt;cn&amp;lt;/value&amp;gt;
            &amp;lt;/param&amp;gt;
        &amp;lt;/provider&amp;gt;
        &amp;lt;provider&amp;gt;
            &amp;lt;role&amp;gt;identity-assertion&amp;lt;/role&amp;gt;
            &amp;lt;name&amp;gt;Default&amp;lt;/name&amp;gt;
            &amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;
        &amp;lt;/provider&amp;gt;
        &amp;lt;provider&amp;gt;
            &amp;lt;role&amp;gt;authorization&amp;lt;/role&amp;gt;
            &amp;lt;name&amp;gt;XASecurePDPKnox&amp;lt;/name&amp;gt;
            &amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;
        &amp;lt;/provider&amp;gt;
    &amp;lt;/gateway&amp;gt;
    &amp;lt;service&amp;gt;
        &amp;lt;role&amp;gt;NAMENODE&amp;lt;/role&amp;gt;
        &amp;lt;url&amp;gt;hdfs://{{namenode_host}}:{{namenode_rpc_port}}&amp;lt;/url&amp;gt;
    &amp;lt;/service&amp;gt;
    &amp;lt;service&amp;gt;
        &amp;lt;role&amp;gt;JOBTRACKER&amp;lt;/role&amp;gt;
        &amp;lt;url&amp;gt;rpc://{{rm_host}}:{{jt_rpc_port}}&amp;lt;/url&amp;gt;
    &amp;lt;/service&amp;gt;
    &amp;lt;service&amp;gt;
        &amp;lt;role&amp;gt;WEBHDFS&amp;lt;/role&amp;gt;
        &amp;lt;url&amp;gt;http://{{namenode_host}}:{{namenode_http_port}}/webhdfs&amp;lt;/url&amp;gt;
    &amp;lt;/service&amp;gt;
    &amp;lt;service&amp;gt;
        &amp;lt;role&amp;gt;WEBHCAT&amp;lt;/role&amp;gt;
        &amp;lt;url&amp;gt;http://{{webhcat_server_host}}:{{templeton_port}}/templeton&amp;lt;/url&amp;gt;
    &amp;lt;/service&amp;gt;
    &amp;lt;service&amp;gt;
        &amp;lt;role&amp;gt;OOZIE&amp;lt;/role&amp;gt;
        &amp;lt;url&amp;gt;http://{{oozie_server_host}}:{{oozie_server_port}}/oozie&amp;lt;/url&amp;gt;
    &amp;lt;/service&amp;gt;
    &amp;lt;service&amp;gt;
        &amp;lt;role&amp;gt;WEBHBASE&amp;lt;/role&amp;gt;
        &amp;lt;url&amp;gt;http://{{hbase_master_host}}:{{hbase_master_port}}&amp;lt;/url&amp;gt;
    &amp;lt;/service&amp;gt;
    &amp;lt;service&amp;gt;
        &amp;lt;role&amp;gt;HIVE&amp;lt;/role&amp;gt;
        &amp;lt;url&amp;gt;http://{{hive_server_host}}:{{hive_http_port}}/{{hive_http_path}}&amp;lt;/url&amp;gt;
    &amp;lt;/service&amp;gt;
    &amp;lt;service&amp;gt;
        &amp;lt;role&amp;gt;RESOURCEMANAGER&amp;lt;/role&amp;gt;
        &amp;lt;url&amp;gt;http://{{rm_host}}:{{rm_port}}/ws&amp;lt;/url&amp;gt;
    &amp;lt;/service&amp;gt;
&amp;lt;service&amp;gt;
    &amp;lt;role&amp;gt;YARNUI&amp;lt;/role&amp;gt;
    &amp;lt;url&amp;gt;http://{{rm_host}}:{{rm_port}}&amp;lt;/url&amp;gt;
  &amp;lt;/service&amp;gt;
&amp;lt;/topology&amp;gt;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Oct 2016 21:27:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119847#M82625</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2016-10-07T21:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Knox to MIT KDC, socket closed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119848#M82626</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12513/jknulst.html" nodeid="12513"&gt;@Jasper&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The first thing I see that is probably incorrect is your UTL for the main.ldapRealm.contextFactory.url. You specify port 88 of the URL. LDAP listens on port 389 by default (636 for LDAPS).&lt;/P&gt;&lt;P&gt;Change:&lt;/P&gt;&lt;PRE&gt; &amp;lt;value&amp;gt;ldap://xxxxxxxxxxxxx:88&amp;lt;/value&amp;gt;&lt;/PRE&gt;&lt;P&gt;to &lt;/P&gt;&lt;PRE&gt; &amp;lt;value&amp;gt;ldap://xxxxxxxxxxxxx:389&amp;lt;/value&amp;gt;&lt;/PRE&gt;&lt;P&gt;That should get you along the way.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2016 09:13:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119848#M82626</guid>
      <dc:creator>emaxwell</dc:creator>
      <dc:date>2016-10-08T09:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Knox to MIT KDC, socket closed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119849#M82627</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/98/emaxwell.html" nodeid="98"&gt;@emaxwell&lt;/A&gt; we checked the processes and ports listening on the KDC host, but this surely seemed to be the KDC. 389/636 were not there. I think these can be altered to something non default. But will check it again. &lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2016 13:57:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119849#M82627</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2016-10-08T13:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Knox to MIT KDC, socket closed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119850#M82628</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/98/emaxwell.html" nodeid="98"&gt;@emaxwell&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Some extra info about the environment:&lt;/P&gt;&lt;P&gt;We are trying to go directly against the KDC here. :88 is the default port for that. OpenLdap is not available. So can Knox be configured to do just that, without OpenLDAP as middleware? &lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2016 23:27:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119850#M82628</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2016-10-08T23:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Knox to MIT KDC, socket closed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119851#M82629</link>
      <description>&lt;P&gt;Shiro Provider is used to authenticate users, when they enter user-name/password against an LDAP store. See &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.4.7/bk_Knox_Gateway_Admin_Guide/content/setting_up_ldap_authentication.html"&gt;here&lt;/A&gt; for details. "main.ldapRealm.contextFactory.url" must be $protocol :// $ldaphost : $port, where $protocol is ldap or ldaps pointing to a node which provides LDAP service like OpenLDAP, AD, FreeIPA, or the test LDAP server bundled with Knox, running on port 33389. KDC doesn't provide LDAP service.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Oct 2016 08:39:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119851#M82629</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2016-10-09T08:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Knox to MIT KDC, socket closed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119852#M82630</link>
      <description>&lt;P&gt;Turns out Knox can not be set up easily when you have installed just the local MIT KDC for kerberizing the cluster as per this &lt;A href="http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.0/bk_Security_Guide/content/install-kdc.html"&gt;doc&lt;/A&gt; . Or you would have to at least install additional services on top like &lt;A rel="user" href="https://community.cloudera.com/users/177/pminovic.html" nodeid="177"&gt;@Predrag Minovic&lt;/A&gt; mentioned.&lt;/P&gt;&lt;P&gt;That is the very reason why Knox ships with the example demo LDAP that you can start at the Ambari Knox service config Service Actions &amp;gt; Start Demo LDAP.  &lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 00:48:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Knox-to-MIT-KDC-socket-closed/m-p/119852#M82630</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2016-10-11T00:48:26Z</dc:date>
    </item>
  </channel>
</rss>

