Connection failed error when accessing the Search app (Solr) from Hue
If you are using Solr with Hue to generate interactive dashboards and for indexing data, and if you have deployed two Solr services on your cluster and selected the second one as a dependency for Hue, then Cloudera Manager assigns the hostname of the first Solr service and the port number of the second Solr service resulting in an incorrect Solr URL in the search section of the hue.ini file. As a result, you may see a “Connection failed” error when you try to access the Search app from the Hue web UI.
For example, consider two Solr services with the following configuration:
Solr-1, hostname=solr1, port:2345
Solr-2, hostname=solr2, port=4567
[search] # URL of the Solr Server solr_url=http://solr2:2345/solr/
As a result, you may not be able to access the Search app from the Hue web UI. To resolve this issue:
- Log into Cloudera Manager as an administrator.
Go to Hue Service
Advanced Configuration Snippet (Safety Valve) for
and add the following lines in the
[search] # URL of the Solr Server solr_url=http://[***HOSTNAME***]:[***PORT***]/solr/
- Click Save Changes.
- Restart the Hue servie.