Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

SOLR server connection refused

avatar
Super Collaborator

my SOLR server is up and running but when ranger tries to connect to it I get error :

iam not sure if the ranger audit url I am using is correct since its unreachable "http://hadoop1:8983/solr/ranger_audits" ?

if I try to go to this url I get the error

HTTP ERROR 404
Problem accessing /solr/ranger_audits. Reason:
    Not Found
2016-12-01 22:25:03,511 [http-bio-6080-exec-5] ERROR org.apache.ranger.solr.SolrUtil (SolrUtil.java:78) - Error from Solr server.
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://hadoop1:8983/solr/ranger_audits: Expected mime type application/octet-stream but got text/html. <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/ranger_audits/select. Reason:
<pre>    Not Found</pre></p>
</body>
</html>

the SOLR console is reachable

10034-capture.jpg

1 ACCEPTED SOLUTION

avatar
Super Collaborator

@Sami Ahmad - You've got a couple of things going on. It looks like you are not using the Ambari Infra Solr installation. To use an external Solr, follow these instructions. You'll be using scripts rather than the UI to create the collection.

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.3/bk_security/content/solr_ranger_configure_s...

The version of Solr you as using may not work with Ambari. You should use 5.2.1 or 5.5.2 to be consistent with what's released with HDP. If you go to 6.x, being a major release, you may encounter significatn issues. Also note that $SOLR/server/lib is not the directory where your config files wold belong with Solr anyway. Normally you'll put them into a "config" directory somewhere. They cannot be in a directory with binary files or you will definitely encounter issues when it tries to load the directory into Zookeeper and then you have a bigger mess to clean up.

View solution in original post

13 REPLIES 13

avatar
Super Collaborator

I noticed there are no cores available in SOLR admin , so do I have to create a core before I can connect with the above url ? if yes can you please guide me on how to do that ?

10035-capture.jpg

avatar

@Sami Ahmad which version of hadoop are you using ?

is this secure solr ?

if it is secure solr then we need to perform some extra steps , can you just confirm ?

avatar
Super Collaborator

I am on HDP2.5 , I am not sure if its secure SOLR or not , how can I find out ?

I couldn't find any document from Hortonworks about how to setup SOLR for Ranger , can you point me to one?

avatar
Super Collaborator

I am not fi nding anywhere in these links where the following screen is explained , please help

10035-capture.jpg

avatar
Super Collaborator

ok I copied the solrconfig.xml and schema.xml files into the /root/solr-6.3.0/server/lib folder but now I am getting this error :

10078-capture.jpg

avatar
Super Collaborator

@Sami Ahmad - You've got a couple of things going on. It looks like you are not using the Ambari Infra Solr installation. To use an external Solr, follow these instructions. You'll be using scripts rather than the UI to create the collection.

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.3/bk_security/content/solr_ranger_configure_s...

The version of Solr you as using may not work with Ambari. You should use 5.2.1 or 5.5.2 to be consistent with what's released with HDP. If you go to 6.x, being a major release, you may encounter significatn issues. Also note that $SOLR/server/lib is not the directory where your config files wold belong with Solr anyway. Normally you'll put them into a "config" directory somewhere. They cannot be in a directory with binary files or you will definitely encounter issues when it tries to load the directory into Zookeeper and then you have a bigger mess to clean up.

avatar
Super Collaborator

A.so, to install the right version of Solr, I'd recommend this page: https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.3/bk_security/content/installing_external_sol...

avatar
Super Collaborator

can you guide me on how to install Ambari Infra Solr installation as I didnt find it in the add services ?