Support Questions

Find answers, ask questions, and share your expertise

How to push Ambari use local repository on Hue installation

Rising Star

Hi,

 

I have HDP installed with Ambari using public repositories.

I wanted to add Hue to the ecosystem. Since Ambari didn't have Hue as a service to install, I went on with the guide here:

https://github.com/EsharEditor/ambari-hue-service

As far as I understand this guide adds Hue as a service in possible services that Ambari can install.
I think it (this guide) is for local repository installation as I've learned. 

My installation failed when it tried to download from public repository. It couldn't find hue server package.

 

## Error log start
2017-01-24 18:53:50,351 - Downloading Hue Service
2017-01-24 18:53:50,351 - Execute['cat /etc/yum.repos.d/HDP.repo | grep "baseurl" | awk -F '=' '{print $2"hue/hue-3.11.0.tgz"}' | xargs wget -O hue.tgz'] {}

Command failed after 1 tries
## Error log end

 

Then I wanted to try installing Hue manually


I followed the guide here:

http://gethue.com/hadoop-hue-3-on-hdp-installation-tutorial

Installation was successfull but my installation was not integrated with Ambari.

 

I wanted to try the first method, changing my OS repo files to local repository at first step.
I changed the contents of the files under /etc/yum.repos.d/ to local repository paths to make Ambari use local repository packages but Ambari displayed public-repository. I had tried to install over public repository before. Got the same shell command error this time again as I went on the the next step of ambari add service wizard:

 

After a short search I found following file and updated also that file with local repository paths:
/var/lib/ambari-server/resources/stacks/HDP/2.5/repos/repoinfo.xml
However, it didn't work either. Ambari was still trying to download from public repository.

 

I thougth maybe somebody here tried that before and can help me in some way.

Does anyone have a comment?

 

If I achieve using public repository problem, next step will be finding rpm packages of hue for 3.9.0 or 3.11.0 because my local HDP repository had 2.6 version.
Any help also for this will be appreciated.

 

OS: Centos 7

HDP: 2.5.3

Ambari: 2.4.2

Hue: 3.9.0

3 REPLIES 3

I believe only https://github.com/EsharEditor/ambari-hue-service would let
you have Hue show up in Ambari. You could contact the author by creating a
github issue there.

About installing Hue manually, it should work but won't be manageable with
Amabari.

Rising Star

I worked on this with a friend and we were able to overcome this.

 

I can't say it is the ideal answer but it is a workaround for my case:

 

The scripts under path

/var/lib/ambari-agent/cache/stacks/HDP/2.5/services/HUE/package/scripts

 

$ ls

common.py hue_server.py params.py setup_hue.py status_params.py

common.pyc hue_server.pyc params.pyc setup_hue.pyc status_params.pyc

 

 

were managing the Hue installation over Ambari.

 

The error message we received was due to a command in common.py

Although we couldn't find out how it overrides our local repository, we searched for pattern "public-repo" and found following files:

usr/lib/ambari-server/web/data/wizard/stack/HDP_versions.json

usr/lib/ambari-server/web/data/wizard/stack/HDP_version_definitions.json

usr/lib/ambari-server/web/data/stacks/HDP-2.1/operating_systems.json

 

Instead of replacing content of these files, we updated the "download_url" variable inside params.py file.

We hard-coded our local repository URL as value.

 

We executed the command that we received error from common.py (line 57)

We tried and received another error for the next command.

Then we also applied that command manually

and converted the manually applied command line to comment line

and we retried.

We had to use this apply-manually, comment, retry, receive-error thing for the next command as latest one (3 commands of common.py in total).

 

On the next retry, installation was successful and hue was up. Rest of is the normal procedure. We updated the hue.ini file.

 

Currently I am having errors on Hue page as the errors mentioned in this unanswered post 🙂

https://community.cloudera.com/t5/Web-UI-Hue-Beeswax/Hue-cannot-access-database-Failed-to-access-fil...

 

Good luck!

Awesome, and let's follow-up on the other post!
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.