"Your site was unable to contact the Apache Solr server" We have been using Drupal 6 for 2 years and we wanted to use SOLR to have a better search and index more documents.

I have did everything right with Apache Solr as per the documentation, my Solr was working fine but I am able to access it on http://localhost/solr/admin.

I have different Solr in different servers, and none work with this Drupal. So I think there is an inherent problem within Drupal, which makes drupal not to find the solr properly.

Previously, I had encountered this issue several times configuring different servers, I am used to reinstall Drupal which made solr work fine but I cant do it to this one because its been running for long with lot of content.

Can anyone help me?
There a  lot of apache solr variables set. Can you uninstall the solr module, remove the variables if left over and re-install. Sometimes, when you do a wrong config and it can't connect, it presists this in variable. Un-installing and re-installing should help.