lucidworks / hive-solr

Code to index Hive tables to Solr and Solr indexes to Hive
Apache License 2.0
47 stars 34 forks source link

Error accesing solr with kerber #41

Open jalongar opened 6 years ago

jalongar commented 6 years ago

Hi, We had created a external table accesing solr with kerberos active with this script

CREATE EXTERNAL TABLE job_solr (gms STRING, cliente STRING, job STRING,job_descripcion STRING) STORED BY 'com.lucidworks.hadoop.hive.LWStorageHandler' LOCATION '/apps/hive/warehouse/datos/jobs_solr' TBLPROPERTIES('solr.zkhost' = 'xxxxxxxx:2181/solr', 'solr.collection' = 'MSSearch1', 'solr.query' = ':', 'lww.jaas.file' = '/app/lucicworks/hive-solr/hive_solr_jaas.conf', 'lww.jaas.appname' = 'Client');

When we try to access the table from hive raise an error as it was not able to authenticate with kerberos

org.apache.hive.service.cli.HiveSQLException: java.io.IOException: shaded.org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://xxxxxxxxxxxxxxx:8983/solr/MSSearch1_shard1_replica2: Expected mime type application/octet-stream but got text/html.

Error 401 Authentication required

HTTP ERROR 401

Problem accessing /solr/M.. What could be the problem? Regards

acesar commented 6 years ago

@jalongar I think the query should be something like:'solr.query' = '*:*', (looks like a typo).

Please try to add the kerberos properties at the hive shell level.

hive> add jar /path/to/lucidworks-hive-serde.jar;
hive> set lww.jaas.file=/opt/lucidworks/conf/login.conf;
hive> set lww.jaas.appname=Client;
jalongar commented 6 years ago

Hi Cesar, When I tried to execute from hive shell the command set lww.jaas.file='.... ' raise an exception:

Error: Error while processing statement: Cannot modify lww.jaas.file at runtime. It is not in list of params that are allowed to be modified at runtime (state=42000,code=1)

Regards