Hi everyone~
I am installing Knox and facing some null pointer exception when testing beeline using jdbc or testing Yarn Examples via cURL.
There first show HTTP 500, and then I found some null exception in knox log.
ps. Knox for WebHDFS is work fine by the way.
This is my jdbc Connection :
!connect jdbc:hive2://hdpgateway1.local:8443/;ssl=true;sslTrustStore=/etc/knox/knox-0.4.0/data/security/keystores/gateway.jks;trustStorePassword=passwd?hive.server2.transport.mode=http;hive.server2.thrift.http.path=gateway/hdp/hive william william-passwd
This is my testing yarn via cURL:
curl -ikv -u william:william-passwd -X GET 'https://hdpgateway1.local:8443/gateway/hdp/resourcemanager/v1/cluster'
I think I must missing something. Thanks in advance.
Here is the null exception message from gateway.log
INFO hadoop.gateway (KnoxLdapRealm.java:getUserDn(479)) - Computed userDn: uid=william,ou=people,dc=test,dc=com using dnTemplate for principal: william
ERROR hadoop.gateway (AbstractGatewayFilter.java:doFilter(69)) - Failed to execute filter: java.lang.NullPointerException
ERROR hadoop.gateway (AbstractGatewayFilter.java:doFilter(66)) - Failed to execute filter: javax.servlet.ServletException: java.lang.NullPointerException
ERROR hadoop.gateway (AbstractGatewayFilter.java:doFilter(66)) - Failed to execute filter: javax.servlet.ServletException: org.apache.shiro.subject.ExecutionException: java.security.PrivilegedActionException: javax.servlet.ServletException: java.lang.NullPointerException
ERROR hadoop.gateway (GatewayFilter.java:doFilter(135)) - Failed to execute filter: javax.servlet.ServletException: org.apache.shiro.subject.ExecutionException: java.security.PrivilegedActionException: javax.servlet.ServletException: java.lang.NullPointerException
ERROR hadoop.gateway (GatewayServlet.java:service(122)) - Failed to execute filter: javax.servlet.ServletException: org.apache.shiro.subject.ExecutionException: java.security.PrivilegedActionException: javax.servlet.ServletException: java.lang.NullPointerException
for more detail this is the ShiroProvider part in my topology xml:
<provider>
<role>authentication</role>
<name>ShiroProvider</name>
<enabled>true</enabled>
<param>
<name>main.ldapRealm</name>
<value>org.apache.shiro.realm.ldap.JndiLdapRealm</value>
</param>
<param>
<name>main.ldapRealm.contextFactory.authenticationMechanism</name>
<value>simple</value>
</param>
<param>
<name>main.ldapRealm.contextFactory.url</name>
<value>ldap://ldapserver:389</value>
</param>
<param>
<name>main.ldapRealm.userDnTemplate</name>
<value>uid={0},ou=people,dc=test,dc=com</value>
</param>
<param>
<name>urls./**</name>
<value>authcBasic</value>
</param>
</provider>