Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache SimplePostTool:致命:尝试索引时Solr中出现连接错误_Apache_Tomcat_Solr - Fatal编程技术网

Apache SimplePostTool:致命:尝试索引时Solr中出现连接错误

Apache SimplePostTool:致命:尝试索引时Solr中出现连接错误,apache,tomcat,solr,Apache,Tomcat,Solr,我是Solr新手,当我在Solr中为xml文档编制索引时,我遇到了这个错误 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.x

我是Solr新手,当我在Solr中为xml文档编制索引时,我遇到了这个错误

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
然后我意识到我的情况下,本地主机的端口号是7788,所以我这样做了:-

java -Durl=localhost:7788/solr/update -jar post.jar solr.xml
然后我得到了这个错误

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

如果您有任何建议,我们将不胜感激。

我不确定post.jar是否理解-Durl(希望如此),但如果该参数得到遵守,则可能应该这样使用它:

java -Durl=http://localhost:7788/solr/update -jar post.jar solr.xml
啊,刚刚找到了这个参考,这表明这个参数是值得尊重的:

对我来说,发生这种情况是因为我在尝试加载数据时未能启动Solr(在后台运行)。。。哼

只需检查solr服务器是否已启动

如果未运行,则运行solr服务器

另一方面


cmd运行这个C:\apache-solr-3.2.0\example\exampledocs>java-jar post.jar*.xml

谢谢@Abhishek,这是我们在开发模式下运行solr时经常犯的错误。谢谢你的指点!