Status code: 404 for https://rhui-1.microsoft.com/pulp/repos/content/eus/rhel8/rhui/8/x86_64/baseos/os/repodata/repomd.xml

Vempalli, Bhargav 1 Reputation point
2022-12-07T17:05:14.243+00:00

getting 404 error when running chef script. here is the following exception

================================================================================
Error executing action install on resource 'dnf_package[apr]'
================================================================================

RuntimeError  
------------  
dnf-helper.py had stderr output:  

Errors during downloading metadata for repository 'rhel-8-for-x86_64-baseos-eus-rhui-rpms':  
  - Status code: 404 for https://rhui-1.microsoft.com/pulp/repos/content/eus/rhel8/rhui/8/x86_64/baseos/os/repodata/repomd.xml (IP: 13.91.47.76)  
  - Status code: 404 for https://rhui-3.microsoft.com/pulp/repos/content/eus/rhel8/rhui/8/x86_64/baseos/os/repodata/repomd.xml (IP: 13.91.47.76)  
  - Status code: 404 for https://rhui-2.microsoft.com/pulp/repos/content/eus/rhel8/rhui/8/x86_64/baseos/os/repodata/repomd.xml (IP: 13.91.47.76)  
Traceback (most recent call last):  
  File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 573, in load  
    ret = self._repo.load()  
  File "/usr/lib64/python3.6/site-packages/libdnf/repo.py", line 397, in load  
    return _repo.Repo_load(self)  
libdnf._error.Error: Failed to download metadata for repo 'rhel-8-for-x86_64-baseos-eus-rhui-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried  

During handling of the above exception, another exception occurred:  

Traceback (most recent call last):  
  File "/opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/lib/chef/provider/package/dnf/dnf_helper.py", line 85, in <module>  
    query(command)  
  File "/opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/lib/chef/provider/package/dnf/dnf_helper.py", line 30, in query  
    sack = get_sack()  
  File "/opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/lib/chef/provider/package/dnf/dnf_helper.py", line 18, in get_sack  
    base.fill_sack()  
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 399, in fill_sack  
    self._add_repo_to_sack(r)  
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 139, in _add_repo_to_sack  
    repo.load()  
  File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 580, in load  
    raise dnf.exceptions.RepoError(str(e))  
dnf.exceptions.RepoError: Failed to download metadata for repo 'rhel-8-for-x86_64-baseos-eus-rhui-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried  

Resource Declaration:  
---------------------  
# In /tmp/smartgrid/installer/cache/cookbooks/agm/recipes/packages.rb  

 13: package [ "apr" ]  
 14: package [ "apr-util" ]  

Compiled Resource:  
------------------  
# Declared in /tmp/smartgrid/installer/cache/cookbooks/agm/recipes/packages.rb:13:in `from_file'  

dnf_package("apr") do  
  package_name ["apr"]  
  action [:install]  
  default_guard_interpreter :default  
  declared_type :package  
  cookbook_name "agm"  
  recipe_name "packages"  
end  

System Info:  
------------  
chef_version=13.2.20  
platform=redhat  
platform_version=8.6  
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]  
program_name=chef-solo worker: ppid=13333;start=16:57:51;  
executable=/opt/chefdk/bin/chef-solo  

[2022-12-07T16:59:50+00:00] INFO: Running queued delayed notifications before re-raising exception

Running handlers:
[2022-12-07T16:59:50+00:00] ERROR: Running exception handlers
Running handlers complete
[2022-12-07T16:59:50+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 minutes 58 seconds
[2022-12-07T16:59:50+00:00] FATAL: Stacktrace dumped to /tmp/smartgrid/installer/cache/chef-stacktrace.out
[2022-12-07T16:59:50+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2022-12-07T16:59:50+00:00] ERROR: dnf_package[apr] (agm::packages line 13) had an error: RuntimeError: dnf-helper.py had stderr output:

Errors during downloading metadata for repository 'rhel-8-for-x86_64-baseos-eus-rhui-rpms':

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/lib/chef/provider/package/dnf/dnf_helper.py", line 85, in <module>
query(command)
File "/opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/lib/chef/provider/package/dnf/dnf_helper.py", line 30, in query
sack = get_sack()
File "/opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20/lib/chef/provider/package/dnf/dnf_helper.py", line 18, in get_sack
base.fill_sack()
File "/usr/lib/python3.6/site-packages/dnf/base.py", line 399, in fill_sack
self._add_repo_to_sack(r)
File "/usr/lib/python3.6/site-packages/dnf/base.py", line 139, in _add_repo_to_sack
repo.load()
File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 580, in load
raise dnf.exceptions.RepoError(str(e))
dnf.exceptions.RepoError: Failed to download metadata for repo 'rhel-8-for-x86_64-baseos-eus-rhui-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[2022-12-07T16:59:50+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
43,563 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 21,526 Reputation points Moderator
    2022-12-08T15:45:46.737+00:00

    Hi @Vempalli, Bhargav ,

    Thank you for reaching out to Microsoft Q&A.

    DevOps is currently not supported in the Q&A forums. You can ask the experts in the dedicated forum over here:

    Developer Community, or through
    Azure Devops Support.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.