Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SimplePostTool: FATAL: Connection error in Solr when trying to index

I am new to Solr and when I was indexing xml document in my solr, then I got this error.

C:\apache-solr-3.2.0\example\exampledocs>java -jar post.jar *.xml
SimplePostTool: version 1.3
SimplePostTool: POSTing files to http://localhost:8983/solr/update..
SimplePostTool: POSTing file gb18030-example.xml
SimplePostTool: FATAL: IOException while posting data: java.net.ConnectException
: Connection refused: connect

then I realized that my port number in my case is 7788 for localhost so I did this:-

java -Durl=localhost:7788/solr/update -jar post.jar solr.xml

then I am getting this error

C:\apache-solr-3.2.0\example\exampledocs>java -Durl=localhost:7788/solr/update -
jar post.jar *.xml
SimplePostTool: version 1.3
SimplePostTool: FATAL: System Property 'url' is not a valid URL: null

Any suggestions will be appreciated..

like image 423
arsenal Avatar asked Jun 23 '11 19:06

arsenal


1 Answers

I am not sure that -Durl is understood by the post.jar (hope it is) but if that parameter is honoured, then it should probably be used like this:

java -Durl=http://localhost:7788/solr/update -jar post.jar solr.xml

ah, just found this reference, which suggests that the parameter is honoured: http://borort.wordpress.com/2008/11/19/solr-postjar-post-to-deferent-solr-port-other-than-8983/

like image 57
mkro Avatar answered Sep 20 '22 17:09

mkro