Welcome to the Cloudera Community

Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Who agreed with this topic

message:Unauthorized for Solr After Kerberos Enabled

avatar

Hi Team,

 

I used Cloudera Quick VM and enabled kerberos ,  therefore worked with HDFS, HIVE, HBASE. Need to work with SOLR which is kerberos enabled in Cloudera Quick VM.

 Could You please anyone  guide me to work with solr enabled kerberos ??

 

I have written a sample standalone code which giving the following exception

 

		File file=new File("/home/cloudera/Desktop/FTP.pptx");
		System.setProperty("java.security.auth.login.config", "/etc/solr/jaas.conf");
		HttpClientUtil.setConfigurer(new HttpClientConfigurer());

		UserGroupInformation.loginUserFromKeytab("solr/quickstart.cloudera@CLOUDERA",
				"/etc/solr/conf/solr.keytab");
		
		solrServer = new HttpSolrServer("http://quickstart.cloudera:8983/solr/new_core");
		solrServer.getBinder();

		SolrPingResponse pingResponse	=	solrServer.ping();
		String 	pingStatus =	(String)pingResponse.getResponse().get("status");

and giving the following exception 

 

org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Server at http://quickstart.cloudera:8983/solr/new_core returned non ok status:401, message:Unauthorizedfinallly
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:385)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:180)
at org.apache.solr.client.solrj.request.SolrPing.process(SolrPing.java:69)
at org.apache.solr.client.solrj.SolrServer.ping(SolrServer.java:293)
at com.solix.fileattributes.FileAttributes.test(FileAttributes.java:80)
at com.solix.fileattributes.FileAttributes.main(FileAttributes.java:42)

 

Thank you in advance 

 

 

Thanks & Regards,

Sai Pavan G

 

Who agreed with this topic