0

I have setup Apache Solr version 5.5 and it runs fine when I test through my browser at http://localhost:8983/solr/ but when I try to connect Drupal to this it throws the error:

enter image description here

I am getting some 404's in my logs also:

enter image description here

I don't know what is going wrong here, My Solr set up is fine so I just can't figure out why it doesn't connect to the Apache Solr Server.

  • Did you block ip's (or anly allowed 127.0.0.1)? In that case it might be that you need to allow ::1 as well, or connect explicitly to the ipv4 version 127.0.0.1. – Neograph734 Mar 22 '16 at 13:10
1

There can be two things which I can think of.

  1. Most SOLR installation guides advise you to edit IPAccessHandler in server/etc/jetty.xml to whitelist certain IP addresses. Often this is 127.0.0.1, but that would prevent access from localhost via IPv6. So you maybe should also white label the IPv6 localhost address ::1, or connect explicitly via IPv4 127.0.0.1.
  2. Since SOLR 4.x you should also include your core name in the url. Search API Solr clearly states this. It might apply to Apache Solr module as well. This would mean your should enter a URL like: http://localhost:8983/solr/<core name>.
  • For solution 1 - I do not have any IPAccessHandler in my jetty.xml file, there are no ip addresses in this file either. For solution 2 - Adding my core name on the end results in a 404 – user3574492 Mar 22 '16 at 14:06
0

I found the solution.

I had to add my core name on the end of the path so like this:

http://localhost:8983/solr/core_name

It then connected to my Solr Server.

You also have to of-course ensure you have added a core from the Apache Solr interface by browsing to http://localhost:8983/solr > Core Admin > Add Core.

  • Isn't that exaclty what I proposed in #2? – Neograph734 Mar 22 '16 at 15:38
  • @Neograph734 Yes it was – user3574492 Mar 24 '16 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.