Hi,I have followed the procedure given on this blog to setup the solr

Below is my code. I am trying to index the data but I am not able to connect
to server and getting authentication error.


HttpClient client=new HttpClient();
client.getState().setCredentials(new AuthScope("localhost", 80,
AuthScope.ANY_SCHEME),
                new UsernamePasswordCredentials("admin", "admin"));

Can you please let me know what may be the problem.

The other problem which I am facing is using Load Banlancing
SolrServer lbHttpSolrServer = new LBHttpSolrServer("
http://localhost:8080/solr","http://localhost:8983/solr";);

Now the problem is the first server is down then I will get an error. If I
swap the server in constructor by giving port 8983 server as first and 8080
as second it works fine. The thing

Problem is If only the last server which is set is active and the rest of
other are down then Solr throws and exception and search is not performed.

Regards,
Allahbaksh

Reply via email to