[ https://issues.apache.org/jira/browse/HIVE-24083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17564223#comment-17564223 ]
Anmol Sundaram edited comment on HIVE-24083 at 7/8/22 10:35 AM: ---------------------------------------------------------------- I was able to get it run by the following (temporary?) fix : {code:java} diff --git a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java index d183b2e61b..5e5c4132f4 100644 — a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java +++ b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java @@ -38,6 +38,8 @@ import org.apache.hadoop.hive.shims.Utils; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.authentication.client.PseudoAuthenticator; +import org.apache.hadoop.security.authentication.server.AuthenticationFilter; +import org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler; import org.apache.hadoop.security.authentication.server.PseudoAuthenticationHandler; import org.apache.hadoop.security.SecurityUtil; import org.apache.hadoop.util.GenericOptionsParser; @@ -269,6 +271,11 @@ public FilterHolder makeAuthFilter() throws IOException { authFilter.setInitParameter("dfs.web.authentication.kerberos.keytab", conf.kerberosKeytab()); } + + authFilter.setInitParameter(AuthenticationFilter.AUTH_TYPE, UserGroupInformation.isSecurityEnabled() ? + KerberosAuthenticationHandler.TYPE : + PseudoAuthenticationHandler.TYPE); + return authFilter; }{code} was (Author: JIRAUSER288438): I was able to get it run by the following (temporary?) fix : diff --git a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java index d183b2e61b..5e5c4132f4 100644 --- a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java +++ b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java @@ -38,6 +38,8 @@ import org.apache.hadoop.hive.shims.Utils; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.authentication.client.PseudoAuthenticator; +import org.apache.hadoop.security.authentication.server.AuthenticationFilter; +import org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler; import org.apache.hadoop.security.authentication.server.PseudoAuthenticationHandler; import org.apache.hadoop.security.SecurityUtil; import org.apache.hadoop.util.GenericOptionsParser; @@ -269,6 +271,11 @@ public FilterHolder makeAuthFilter() throws IOException \{ authFilter.setInitParameter("dfs.web.authentication.kerberos.keytab", conf.kerberosKeytab()); } + + authFilter.setInitParameter(AuthenticationFilter.AUTH_TYPE, UserGroupInformation.isSecurityEnabled() ? + KerberosAuthenticationHandler.TYPE : + PseudoAuthenticationHandler.TYPE); + return authFilter; } > hcatalog error in Hadoop 3.3.0: authentication type needed > ---------------------------------------------------------- > > Key: HIVE-24083 > URL: https://issues.apache.org/jira/browse/HIVE-24083 > Project: Hive > Issue Type: Bug > Components: HCatalog > Affects Versions: 3.1.2 > Reporter: Javier J. Salmeron Garcia > Priority: Minor > > Using Hive 3.1.2, webhcat fails to start in Hadoop 3.3.0 with the following > error: > ``` > javax.servlet.ServletException: Authentication type must be specified: > simple|kerberos > ``` > I tried in Hadoop 3.2.1 with the exact settings and it starts without issues: > > ``` > webhcat: /tmp/hadoop-3.2.1//bin/hadoop jar > /opt/bitnami/hadoop/hive/hcatalog/sbin/../share/webhcat/svr/lib/hive-webhcat-3.1.2.jar > org.apache.hive.hcatalog.templeton.Main > webhcat: starting ... started. > webhcat: done > ``` > > I can provide more logs if needed. Detected authentication settings: > > ``` > hadoop.http.authentication.simple.anonymous.allowed=true > hadoop.http.authentication.type=simple > hadoop.security.authentication=simple > ipc.client.fallback-to-simple-auth-allowed=false > yarn.timeline-service.http-authentication.simple.anonymous.allowed=true > yarn.timeline-service.http-authentication.type=simple > ``` > -- This message was sent by Atlassian Jira (v8.20.10#820010)