Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

adding sandbox.hortonworks.com to /etc/hosts does not seem to make a difference and that seems to be a problem for Banana

avatar
New Contributor

Hello. I have been going through the Analyzing Twitter Data With Apache NiFi and HDP Search tutorial using Sandbox VM I downloaded a couple of weeks ago.

I did run 'echo 127.0.0.1 sandbox.hortonworks.com >> /etc/hosts' (I am assuming the partial quotation marks in 'echo "127.0.0.1 sandbox.hortonworks.com >> /etc/hosts' in the instructions are a typo), and my /etc/hosts file now looks like this:

127.0.0.1 localhost.localdomain localhost 10.0.2.15 sandbox.hortonworks.com sandbox ambari.hortonworks.com 127.0.0.1 sandbox.hortonworks.com

However, the following links never work:

http://sandbox.hortonworks.com:4200 http://sandbox.hortonworks.com:9090/nifi http://sandbox.hortonworks.com:8983/solr/

So, I replace 'http://sandbox.hortonworks.com' with '127.0.0.1' and NiFi and Solr seem to work fine, based on my limited understanding. However, when I get to starting Banana, and, go to '127.0.0.1:8983/solr/banana/index.html' (I am assuming that leaving out 'index.html' from 'http://sandbox.hortonworks.com:8983/solr/banana/' in the instructions is just an oversight, since without it we just see contents of the directory), I do get the basic Banana dashboard layout with black/gray background and buttons and rows and headers, but no data. I get the following two errors:

'Error Could not contact Solr at http://sandbox.hortonworks.com:8983/solr/. Please ensure that Solr is reachable from your system.' 'Error Could not retrieve collections from Solr (error status = 0)'

I thought, perhaps, if I replaced 'http://sandbox.hortonworks.com' with '127.0.0.1' in the 'default.json' file I downloaded from github earlier in the tutorial that might fix the problem, but Banana still saw no data, even though the error messages have changed slightly:

'Error Collection not found at 127.0.0.1:8983/solr/tweets. Please check your configuration or create the collection. If you are using a proxy ensure it is configured correctly.' 'Error Could not retrieve collections from Solr (error status = 404)'

The 'tweets' collection DOES exist, from what I can tell. If I enter the command we are given to create it, I am told it already exists. I can delete it and create it again, but that does not seem to make a difference for Banana.

Why does adding 'sandbox.hortonworks.com' to /etc/hosts not seem to work for me, does that mess anything else up besides Banana that I perhaps do not realize, and is there a workaround?

Many thanks!

1 ACCEPTED SOLUTION

avatar
Expert Contributor

This may not have been specified but you should add "sandbox.hortonworks.com" to your HOST machine. This is not the sandbox. It is the machine which you have installed virtualbox/vmware on

On a windows machine you'll find your hosts file at

%systemroot%\system32\drivers\etc\hosts

If you are using *nix system or Mac OS X it is simply

/etc/hosts

After editing the correct file on the host machine it should work

View solution in original post

11 REPLIES 11

avatar
Expert Contributor

@Ali Bajwa I will see that I get this incorporated into the tutorial.

avatar

Sounds good!