So it's been a few months since I played with a Kerberized Livy cluster but
I'll see if I can help. First what version of Livy are you using?
Authentication was updated in Livy 0.4 and it may change how to address
this. ( https://github.com/apache/incubator-livy/pull/15 ) GET and POST
calls can have different levels of auth depending on how it's set up and
that may be why you're seeing the difference. In 0.4 GET calls check
livy.server.access-control.view-users and POST calls check
livy.server.access-control.modify-users. Also I'm a bit foggy on it, but
IIRC Kerberos auth is used on all calls, so if you're getting responses on
GETS its should not Kerberos causing the issue on the POSTs.

Hopefully that give you a launching point at trouble shooting.

                                                                                
   
 Alex Bozarth                                                                   
   
 Software Engineer                                                              
   
 Spark Technology Center                                                        
   
                                                                                
   
                                                                                
     
                                                                                
     
                                                                                
     
 E-mail: [email protected]                                                    
     
 GitHub: github.com/ajbozarth                                                   
     
                                                                   505 Howard 
Street 
                                                             San Francisco, CA 
94105 
                                                                       United 
States 
                                                                                
     








From:   "Partridge, Lucas (GE Aviation)" <[email protected]>
To:     "[email protected]"
            <[email protected]>
Date:   10/23/2017 08:27 AM
Subject:        Livy GET requests work but POST requests fail with "401
            Authentication required"



I’ve written a Java client for parts of Livy’s REST API at
https://github.com/apache/incubator-livy/blob/master/docs/rest-api.md#response-body
 . The client uses Spring’s RestTemplate class and the Livy server is
secured with Kerberos.

Get /sessions and GET /batches requests work fine. But both POST /sessions
and POST /batches requests fail with:
org.springframework.web.client.HttpClientErrorException: 401 Authentication
required

Has anyone else seen something like this where the GET requests work but
POST requests don’t?  Does my username need adding to some Livy config
setting perhaps, e.g., to livy.server.access_control.users as described at
http://henning.kropponline.de/2016/11/06/connecting-livy-to-a-secured-kerberized-hdp-cluster/
 ?

Thanks, Lucas.


Reply via email to