Reply
New Contributor
Posts: 3
Registered: ‎02-27-2017
Accepted Solution

401 Unauthorized Error Livy+ Hue

Hi Team, I recently configured Hue 3.11 with all backend configuration for Hive / WebHDFS etc. However while configuring Spaky/ Livy connectivity on Hue, I am getting 401 unauthorized under "Notebook" section on Hue and also while fetching session data through curl command. Below is the error that I am getting on command line: # curl  http://localhost:8998/sessions <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" /> Error 401 HTTP ERROR: 401

Problem accessing /sessions. Reason:

    Authentication required

Powered by Jetty:// Below is the error from Hue: <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" /> Error 401 HTTP ERROR: 401

Problem accessing /sessions. Reason:

 Authentication required

Powered by Jetty:// (error 401) Note : Cluster is kerberized.            Livy is configured with spnego kerberos principal /keytab as well as livy kerberos princial /keytab           Can someone help on this ? Regards Ajay Rathod

Cloudera Employee
Posts: 716
Registered: ‎07-30-2013

Re: 401 Unauthorized Error Livy Hue

Could you confirm on http://groups.google.com/a/cloudera.org/group/livy-user
if Livy supports Kerberos?
Cloudera Employee
Posts: 716
Registered: ‎07-30-2013

Re: 401 Unauthorized Error Livy Hue

New Contributor
Posts: 3
Registered: ‎02-27-2017

Re: 401 Unauthorized Error Livy Hue

Thanks Romain,

This helped me in fixing the issue.

Regards
Ajay Rathod
Explorer
Posts: 14
Registered: ‎01-29-2018

Re: 401 Unauthorized Error Livy Hue

Hi @Romainr, in which section/configuration file I should set this parameter ( self._client.set_kerberos_auth() ) into Hue Service? Many thanks! Alex
Posts: 919
Topics: 1
Kudos: 213
Solutions: 114
Registered: ‎04-22-2014

Re: 401 Unauthorized Error Livy Hue

@AlexPQ,

 

Based on the referenced Jira, kerberos auth is now configurable.

 

In CDH 5.11.0 and higher, you can enable kerberos auth in hue.ini:

 

[spark]

security_enabled=true

 

 

Explorer
Posts: 14
Registered: ‎01-29-2018

Re: 401 Unauthorized Error Livy Hue

Hi @bgooley,

Thanks a lot for the information!

Regards,

Alex
Highlighted
Expert Contributor
Posts: 67
Registered: ‎09-14-2017

Re: 401 Unauthorized Error Livy Hue

[ Edited ]

The parameter:
[spark]
security_enabled=true

 

need to be added in Cloudera Manager Hue configuration to the below section:
Hue Service Advanced Configuration Snippet (Safety Valve) for hue_safety_valve.ini

 

However it still gave an error: Unable to authenticate . The Hue Admin screen showed a misconfiguration in Spark: The app wont work without a running Livy Spark Server. 

Also in  /var/log/hue/error.log below message was present:

GSSError: (('Unspecified GSS failure.  Minor code may provide more information', 851968), ('Server HTTP/localhost@EXAMPLE.COM not found in Kerberos database', -1765328377))

 

These errors were resolved by adding the line to the to the Hue Safety valve above:

[spark]

security_enabled=true

livy_server_host=yourlivyhostfqdn

 

Announcements