0

I have been struggling with setting up Carrot2 for use PHP, on a local machine. The plan is to have Carrot2 retrieve cluster from Solr populated by Nutch. Currently Solr and Nutch are correctly configured and I have been able to access the information via Carrot2 Workbench. Carrot2-dcs-3.10.0 has been set up what I believed to be correctly deployed through the tomcat6 manager although the documentation on setting this up is horrible vague and incomplete. Changes to source-solr-attributes.xml were made according to https://sites.google.com/site/profileswapnilkulkarni/tech-talk/howtoconfigureandruncarrot2webapplicationwithsolrdocumentsource . Tomcat is set up on port 8080. The Carrot2 DCS php example example.php works and displays the test output correctly. Although, when I try to perform a cluster using localIPAddress:8080/carrot2-dcs/index.html I run into a problem. When I set document source to Solr and the query to : then click cluster I get the following error message.

HTTP Status 500 - Could not perform processing: org.apache.http.conn.HttpHostConnectException: Connection to localhost:8983 refused

type Status report

message Could not perform processing: org.apache.http.conn.HttpHostConnectException: Connection to localhost:8983 refused

description The server encountered an internal error that prevented it from fulfilling this request.

I have searched everywhere in the deployed webapp folder for carrot2 and can't find where it is getting localhost:8983 from.

Any assistance would be appreciated, thank you.

James
  • 101
  • 11
  • I had to remove the Http:// from in front of the localhosts in the error message as it wouldn't let me post with them present. – James Sep 16 '14 at 22:04
  • can you find the solr server side logs and check what exceptions are there? Is your solr instance up and running and accessible to your client? – D_K Sep 17 '14 at 08:10
  • The Solr instance is up and running and I am able to make connections to it via carrot2 workbench. There is nothing in the solr logs. Solr is on port 8080, but carrot is trying to reach it at 8983 as mentioned above. – James Sep 17 '14 at 13:24
  • you saying, that both solr and carrot run on port 8080. What bugs me is how could they both run on the same port on the same machine? Do they both run in the same tomcat on port 8080? – D_K Sep 17 '14 at 13:45
  • Yes they are both deployed on the same tomcat on port 8080 – James Sep 17 '14 at 13:53
  • Ok. After you have made changes to SolrDocumentSource.serviceUrlBase to point to 8080, did you restart the tomcat? – D_K Sep 17 '14 at 15:00
  • in the tomcat6 logs for carrot2-dcs it shows attempts to connect to 127.0.0.1:8983 and the connection was refused, which is understandable because it is the wrong port. – James Sep 17 '14 at 15:14
  • It has been restarted many times, just to make sure I didn't miss anything which file would that be in to make sure. – James Sep 17 '14 at 15:16
  • In source-solr-attributes.xml SolrDocumentSource.serviceUrlBase vlaue is set to the local ip at port 8080. Is there another location for it? – James Sep 17 '14 at 16:01
  • source-solr-attributes.xml SolrDocumentSource.serviceUrlBase in the DCS' WAR is the right location for the configuration. I've just verified that the setting works by changing the default Solr port and using the same port number in the configuration of the DCS deployed to Tomcat. One possibility that springs to my mind is that maybe Tomcat somehow caches the old unpacked WAR somewhere and still uses the default Solr source configuration? Would you be able to search your Tomcat's home and temp dir for "SolrDocumentSource.serviceUrlBase"? – Stanislaw Osinski Sep 18 '14 at 07:20

1 Answers1

0

It turns out that the source-solr-attributes.xml file had an extra overridden-attributes. one was before the default block comment with the example parameters and the second was added in by me with the parameters needed for my config. Deleting one of the line so there was only one corrected the problem. Apparently with two of those it ignores the server settings and uses default values instead.

James
  • 101
  • 11