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
开发者_JAVA百科
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..
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/
For me, this was happening because I failed to start Solr (running in the background) while attempting to load the data... DUH!
just check that your solr server is up or not ..
if is is not running then run the solr server ..
and in the other
cmd run this C:\apache-solr-3.2.0\example\exampledocs>java -jar post.jar *.xml
精彩评论