3

I've got a working solr server, however my drupal always fails to connect, what am I doing wrong?

When adding my server and clicking on the solr server url it takes me to my server (so my path is correct), yet I keep getting a message: The Solr server could not be reached.

I am hosting apache solr on a server (not locally).

  • Host: Server IP address

  • Port: 8983

  • Instance: /solr

Can anyone help me out ?

  • 1
    Can you connect to that server / port from your workstation using telnet? Can you do the same from the machine that hosts your Drupal? Do you see Welcome to Solr banner in response to GET /solr/? If answer is "no", you have hosting question, not Drupal one. – Mołot Nov 26 '13 at 13:21
  • I'm able to configure the solr server through ssh, I've copied the scheme.xml (and the other ones) from the search api module to my server, it all shows well on my control panel. I don't get why drupal is rejecting my connection. As for the machine hosting my drupal, I'll have to ask access to that server and test it, but from my work station I have no trouble at all. – Yassin Tahtah Nov 26 '13 at 13:23
  • 2
    I'm not asking if you can configure it. I'm asking if you can connect to it. It's not Drupal that rejects your connection, it's solr server that rejects Drupal's. And I doubt if it's caused by Drupal misconfiguration - could you verify this using telnet? Please put telnet outputs from both machines (http server machine and workstation) into question :) - without it no one can verify if it's Drupal. Unless you will make a dev environment of your Drupal on your workstation. – Mołot Nov 26 '13 at 13:25
  • It turned out to be that the server hosting drupal was unable to access the solr server because they were on different networks, you were right. Thanks a lot for helping me figure this out! – Yassin Tahtah Nov 26 '13 at 13:41
3

@see "Your site was unable to contact the Apache Solr server"

I follow this article https://www.lullabot.com/blog/article/installing-solr-use-drupal ,some day comes this errors after I reconfig of my site& apache. but I sloved like thisenter image description here

enter image description here

0

I was experiencing the same problem: Drupal 7.41 Tomcat 8 Solr 4.10.4

So my work around was: Step 1: Solr path config - enter :/solr/. This caused the SOLR and Drupal to be able to communicate.

However, the index fails because the URL cannot be used for the httpPost or httpGet. The following error will surface: SearchApiException while deleting items from server : "400" Status: HTTP method POST is not supported by this URL: HTTP method POST is not supported by this URL

Step 2: Remove '#/~cores/' The correct URI is the path listed in SOLR w/o the extra characters. Surprisingly, once I ran cron and restarted tomcat - the servers were still able to communicate and the index ran as designed.

NOTE: I had to delete the index configuration that failed and reconfigure AFTER making these changes. It seems there's some type of weird caching that 'remembers' the configuration ::shrug:::

Worked for me. And I hope it works for you. It took me a couple of hours to figure it out.

/r

0

For some reason, in my case, the following string worked: /solr/#/drupal

So, the full URI: http://127.0.0.1:8983/solr/#/drupal

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.