Support Questions

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

Switching to local repo (artifactory) is causing the error: No package found for hadoop-${stack_version}-client(hadoop-(\d|-)+-client$)

avatar
Contributor

Due to changes in our networking and firewall requirements we had to switch from the hortonworks public repositories to the local repositories (artifactory).
After making this change we are seeing the following exception when we try to "Start All" (from Ambari) Which triggers the installation of the client packages and they are failing with the following exception.

Essentially similar error is thrown when we try to install any new package after this change.

OS: Ubuntu 16.04


No package found for hadoop-${stack_version}-client(hadoop-(\d|-)+-client$)
2019-05-29 15:47:30,684 - The repository with version 2.6.5.0-292 for this command has been marked as resolved. It will be used to report the version of the component which was installed

Command failed after 1 tries
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Bala Kolla

What is the exact ambari version that you are using?

One of the reason may be due to change in the repository. Looks like some of the packages might be installed from a different repo.


May be you can try checking if there are some packages installed from multiple HDP repositories?

# repoquery -a --installed --qf "%{ui_from_repo} %{name}" | grep -i '^@hdp'


Also if the you just changed the REPO url (not the actual HDP version) then may be you can try this. (Not sure what is your Ambari version , and hence can not tell for sure if the following may work or not)


1. On the ambari agent node where the client installation is failing try to search for the file "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py"


2. Then try to comment a line in this file which is setting package_version = None

Example:

# grep 'package_version = None'  /usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py
    package_version = None



3. After commenting out that line your file grep output should look like following:

# grep 'package_version = None'  /usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py
    # package_version = None


4. Remove the "script.pyo and script.pyc" files. (or move it to /tmp or some other directory)

# rm -f /usr/lib/ambari-agent/lib/resource_management/libraries/script/script.pyc
# rm -f /usr/lib/ambari-agent/lib/resource_management/libraries/script/script.pyo


5. Restart ambari-agent on that node.

# ambari-agent restart.


6. Try starting component on this node from ambari UI and then see if it still fails?


If it still fails then it will require further investigation.



View solution in original post

4 REPLIES 4

avatar
Contributor

Hi @Jay Kumar SenSharma and @subhash parise Looks like you are the SME's about the repository related issues.. Can you please advise on what I should do to fix this issue?

avatar

The above was originally posted in the Community Help Track. On Mon Jun 3 17:43 UTC 2019, a member of the HCC moderation staff moved it to the Security track. The Community Help Track is intended for questions about using the HCC site itself.

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Master Mentor

@Bala Kolla

What is the exact ambari version that you are using?

One of the reason may be due to change in the repository. Looks like some of the packages might be installed from a different repo.


May be you can try checking if there are some packages installed from multiple HDP repositories?

# repoquery -a --installed --qf "%{ui_from_repo} %{name}" | grep -i '^@hdp'


Also if the you just changed the REPO url (not the actual HDP version) then may be you can try this. (Not sure what is your Ambari version , and hence can not tell for sure if the following may work or not)


1. On the ambari agent node where the client installation is failing try to search for the file "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py"


2. Then try to comment a line in this file which is setting package_version = None

Example:

# grep 'package_version = None'  /usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py
    package_version = None



3. After commenting out that line your file grep output should look like following:

# grep 'package_version = None'  /usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py
    # package_version = None


4. Remove the "script.pyo and script.pyc" files. (or move it to /tmp or some other directory)

# rm -f /usr/lib/ambari-agent/lib/resource_management/libraries/script/script.pyc
# rm -f /usr/lib/ambari-agent/lib/resource_management/libraries/script/script.pyo


5. Restart ambari-agent on that node.

# ambari-agent restart.


6. Try starting component on this node from ambari UI and then see if it still fails?


If it still fails then it will require further investigation.



avatar
Contributor

@Jay Kumar SenSharma
Thank you very much. That solved the issue.

And to answer your questions for completeness and for other members of the community..
Ambari Version = 2.6.2.2

Yes, we did install the components using the hortonworks public repo for ubunutu..

Because of the firewall requirements we had to create use our internal repo and hence chanted the repo in ambari server to point to the internal repo server.

After that we are seeing the error mentioned.