我想實現這個示例「https://github.com/abajwa-hw/ambari-nifi-service」,但有一些不同:我在本地計算機上有一個Nifi實例和一個Solr版本(LucidWorks)在包含Hortonworks Sandbox的VM中。當我嘗試連接到從NiFi Solr的服務器,我不幸得到這個錯誤:如何連接到來自NiFi的遠程Solr:例如將推文流式傳輸到solr
PutSolrContentStream[id=f6327477-fb7d-4af0-ec32-afcdb184e545] Failed to send StandardFlowFileRecord[uuid=03c2b3f5-43d8-47fa-ab6e-ad41e0e22f81,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1487148463852-14, container=default, section=14], offset=660541, length=6857],offset=0,name=103053148756602.json,size=6857] to Solr due to org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: http://172.17.0.2:8983/solr/tweets_shard1_replica1; routing to connection_failure: org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: http://172.17.0.2:8983/solr/tweets_shard1_replica1
我的主機在虛擬機文件是一樣的,如下:
127.0.0.1 localhost
::1 localhost ip6-localhost
ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.2 sandbox.hortonworks.com
,當我嘗試
bin/solr status
它給了我
Found 1 Solr nodes:
Solr process 11364 running on port 8983
{
"solr_home":"/opt/lucidworks-hdpsearch/solr/server/solr/",
"version":"5.2.1 1684708 - shalin - 2015-06-10 23:20:13",
"startTime":"2017-02-14T05:24:44.191Z",
"uptime":"0 days, 3 hours, 36 minutes, 37 seconds",
"memory":"101.6 MB (%20.7) of 490.7 MB",
"cloud":{
"ZooKeeper":"localhost:2181",
"liveNodes":"1",
"collections":"2"}}
,當我嘗試
bin/solr healthcheck -c tweets -z localhost:2181
它給
{
"collection":"tweets",
"status":"healthy",
"numDocs":1,
"numShards":1,
"shards":[{
"shard":"shard1",
"status":"healthy",
"replicas":[{
"name":"core_node1",
"url":"http://172.17.0.2:8983/solr/tweets_shard1_replica1/",
"numDocs":1,
"status":"active",
"uptime":"0 days, 3 hours, 37 minutes, 5 seconds",
"memory":"27.4 MB (%5.6) of 490.7 MB",
"leader":true}]}]}
我該如何解決呢?
謝謝, Shanghoosh