Created 02-13-2017 08:07 AM
I am trying to connect to a remote solr but I faced with this error on server
can not find: /configs/tweets/admin-extra.html
and also faced to this error
org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: http://172.17.0.2:8983/solr
when I tried to connect to Solr from NiFi
thank you guys
Created on 02-13-2017 01:17 PM - edited 08-18-2019 03:36 AM
Hi Shanghoosh,
Your English is fine 🙂
HTTP/1.1 302 Found is a good response showing that it can connect to the remote HTTP endpoint. Sorry I should have add a trailing '/' then you should have a result with 'HTTP/1.1 200 OK'.
Are you referring to a tutorial or an example? If so, would you share the link with us?
I tried this example, started a Solr Cloud and I was able to connect PutSolrContentStream to it with following configuration:
https://cwiki.apache.org/confluence/display/solr/Getting+Started+with+SolrCloud
Created on 02-13-2017 01:17 PM - edited 08-18-2019 03:36 AM
Hi Shanghoosh,
Your English is fine 🙂
HTTP/1.1 302 Found is a good response showing that it can connect to the remote HTTP endpoint. Sorry I should have add a trailing '/' then you should have a result with 'HTTP/1.1 200 OK'.
Are you referring to a tutorial or an example? If so, would you share the link with us?
I tried this example, started a Solr Cloud and I was able to connect PutSolrContentStream to it with following configuration:
https://cwiki.apache.org/confluence/display/solr/Getting+Started+with+SolrCloud
Created 02-13-2017 01:17 PM
Hello @Ali Mohammadi Shanghoshabad
The error message on Solr server might be this Solr issue, if so, it's ok to ignore based on the JIRA.
https://issues.apache.org/jira/browse/SOLR-6688
Could you confirm that the Solr HTTP endpoint is accessible from NiFi server? For example using cURL command? To rule out networking issue:
# from NiFi server terminal curl -i http://172.17.0.2:8983/solr
Thank you,
Koji
Created 02-13-2017 01:17 PM
Hello @kkawamura
First of all, I am new in Solr.
When I tried the curl command "curl -i http://172.17.0.2:8983/solr " in VM (sandbox), I got a message as below:
HTTP/1.1 302 Found Location: http://172.17.0.2:8983/solr/ Content-Length: 0
but when I try in the local machine (ubuntu 16), I don't get any messages.
Also, when I try "curl -i localhost:8983/solr" locally, I get a message as follows:
HTTP/1.1 302 Found Location: http://localhost:8983/solr/ Content-Length: 0
Actually, I use PutSolrContentStream processor for sending tweets to a remote Solr (lucidworks) in a VM (sandbox). I set Solr type= cloud and Solr Location= localhost:2181. NiFi is in my local machin. Unfortunately, I get an error as follows:
PutSolrContentStream[id=f6327477-fb7d-4af0-e990-512eebdb1c1c] Failed to send StandardFlowFileRecord[uuid=c478c4dc-f16e-4ae7-814e-a7de0985985e,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1486893589035-10, container=default, section=10], offset=612767, length=7103],offset=0,name=77207261802126.json,size=7103] 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
Excuse me for my poor English.
Thanks a Million,
Shanghoosh
Created on 02-14-2017 08:11 AM - edited 08-18-2019 03:35 AM
Hi Koji
thank you 🙂
Yes, I want to try this example " https://github.com/abajwa-hw/ambari-nifi-service ", with a difference: my Nifi is in my local machine and I want to connect to a remote lucidworks locally. The lucidworks(solr) is in a VM(with sandbox).
screenshot-from-2017-02-14-11-36-39.png(128.3 kB)
I am trying to add tweets in solr.
Created 02-14-2017 09:17 AM
Another thing, When I try
bin/solr status
It gives me
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"}}
and when I try
bin/solr healthcheck -c tweets -z localhost:2181
It gives
{ "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}]}]}
but when I try
bin/solr healthcheck -c tweets
It gives
ERROR: java.util.concurrent.TimeoutException: Could not connect to ZooKeeper localhost:9983 within 10000 ms
what is the default port of zookeeper ?
Is it possible solr nodes can't to communicate with zookeeper?
Created 02-15-2017 01:08 AM
Hi @Ali Mohammadi Shanghoshabad,
Thanks for the updates and details. I understand the situation.
You are running a NiFi locally trying to connect a zookeeper on localhost:2181, that is actually running on the sandbox vm, but 2181 is exposed by port forwarding. And after NiFi connects to Zk, Zk returns a Solr endpoint URL as "http://172.17.0.2:8983/solr/tweets_shard1_replica1/". But 172.17.0.2:8983 is not accessible directly from NiFi running on your local machine.
The tutorial you're referring is designed to use a NiFi running in the sandbox, which can be accessed using http://sandbox.hortonworks.com:9090/nifi
You also need to add an entry for sandbox.hortonworks.com in the hosts file on your local machine, as written in the tutorial.
A possible solution would alter VM network configuration, but it can be difficult since sandbox is basically designed to work on an assumption to run everything within itself..
Created 02-15-2017 09:33 AM
Thank you @kkawamura for nice summarization.
I tried any case in hosts files locally and also in VM, but it didn't work.
Are there any other processors in NiFi to help me? I mean, Can I work with Solr with another processor?
Created 02-16-2017 12:13 AM
I'm not aware of other processors to work with Solr, basically if your local NiFi can't access to the Solr instance in the sandbox VM, any other processor wouldn't work.
To access a NiFi running on the VM, you need to edit local hosts file, with the VM ip-address, please double check that you use VM ip-address.
The tutorial says:
192.168.191.241 sandbox.hortonworks.com sandbox
Created 02-18-2017 04:42 AM
Hi @kkawamura
Finally I solved it. I installed Solr by using ambari (befor, Solr was in VM but it was not in sandbox) and after that I set "localhost:2181/solr " to PutSolrContentStream processor. Now I am working with Banana,Solr,Nifi and Hive so comfortable.
Thanks Koji a million.