Solr start示例:连接拒绝错误

时间:2015-04-05 05:16:26

标签: java solr lucene

我正在关注来自this page的快速入门示例,使用带有Yosemite的Mac和最新版本的Java 7。

当我尝试使用“bin / solr start -e cloud -noprompt”启动Solr时,出现以下错误:

Welcome to the SolrCloud example!


Starting up 2 Solr nodes for your example SolrCloud cluster.
Creating Solr home directory /Users/jg/Downloads/solr-5.0.0/example/cloud/node1/solr
Cloning Solr home directory /Users/jg/Downloads/solr-5.0.0/example/cloud/node1 into /Users/jg/Downloads/solr-5.0.0/example/cloud/node2

Starting up SolrCloud node1 on port 8983 using command:

solr start -cloud -s example/cloud/node1/solr -p 8983   


Waiting to see Solr listening on port 8983 [/]  
Started Solr server on port 8983 (pid=7672). Happy searching!



Starting node2 on port 7574 using command:

solr start -cloud -s example/cloud/node2/solr -p 7574 -z localhost:9983   


Waiting to see Solr listening on port 7574 [/]  
Started Solr server on port 7574 (pid=7763). Happy searching!

Connecting to ZooKeeper at localhost:9983
Uploading /Users/jg/Downloads/solr-5.0.0/server/solr/configsets/data_driven_schema_configs/conf for config gettingstarted to ZooKeeper at localhost:9983
WARN  - 2015-04-05 01:13:01.940; org.apache.solr.util.SolrCLI; Request to http://192.168.1.217:8983/solr/admin/collections?action=list failed due to: Connection refused, sleeping for 5 seconds before re-trying the request ...

Creating new collection 'gettingstarted' using command:
http://192.168.1.217:8983/solr/admin/collections?action=CREATE&name=gettingstarted&numShards=2&replicationFactor=2&maxShardsPerNode=2&collection.configName=gettingstarted

WARN  - 2015-04-05 01:13:06.973; org.apache.solr.util.SolrCLI; Request to http://192.168.1.217:8983/solr/admin/collections?action=CREATE&name=gettingstarted&numShards=2&replicationFactor=2&maxShardsPerNode=2&collection.configName=gettingstarted failed due to: Connection refused, sleeping for 5 seconds before re-trying the request ...

ERROR: Connection refused

似乎从未实际创建过“gettingstarted”集合,因为我的“云”屏幕是空白的。任何想法如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

在Mac上,检查hosts文件并确保文件包含这些行

127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost