title: how to connect to a remote Solr from NiFi: for example streaming of tweets to solr
body: <p>I am trying to implement this example "<a href="https://github.com/abajwa-hw/ambari-nifi-service" rel="nofollow noreferrer">https://github.com/abajwa-hw/ambari-nifi-service</a>" with some differences: I have a Nifi instance in my local machine and a Solr version (LucidWorks) in my VM that contains Hortonworks Sandbox. when I try to connect to Solr server from NiFi, I unfortunately get this error:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>My hosts file in VM is the same as below:</p>
  
  <pre><code>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 
  </code></pre>
  
  <p>And when I try</p>
  
  <p><code>bin/solr status</code></p>
  
  <p>It gives me</p>
  
  <pre><code>    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"}}
  </code></pre>
  
  <p>and when I try</p>
  
  <pre><code>bin/solr healthcheck -c tweets -z localhost:2181
  </code></pre>
  
  <p>It gives</p>
  
  <pre><code> {                                   
    "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}]}]} 
  </code></pre>
  
  <p>How can I solve it?</p>
  
  <p>Thanks,
  Shanghoosh</p>