Proxy setup for RH repository

proxy setup in Foreman for RedHat repos

we have proxy for accessing repos to sync in Foreman. Repos like Epel and other are working just fine. But I can’t sync RH repos. Repos are empty. I have configure proxy setup in two configurations in Foremam webUI
Infrastructure/ HTTP Proxies and test work well
Administer/ Settings under HTTP(S) proxy

version: Foreman 2.3.3-1/katello 3.18.2

This is the error in /var/log/foreman/production.log

2021-04-16T15:13:51 [E|app|] Failed at scanning for repository: Request Timeout
2021-04-16T15:13:51 [E|app|] Failed at scanning for repository: undefined method resolve_substitutions' for nil:NilClass 2021-04-16T15:13:51 [E|app|] Failed at scanning for repository: undefined method resolve_substitutions’ for nil:NilClass
2021-04-16T15:13:51 [E|app|] Failed at scanning for repository: undefined method resolve_substitutions' for nil:NilClass 2021-04-16T15:13:51 [E|app|] Failed at scanning for repository: undefined method resolve_substitutions’ for nil:NilClass
2021-04-16T15:13:51 [E|app|] Failed at scanning for repository: undefined method resolve_substitutions' for nil:NilClass 2021-04-16T15:13:51 [E|app|] Failed at scanning for repository: undefined method resolve_substitutions’ for nil:NilClass
2021-04-16T15:13:51 [E|app|] Failed at scanning for repository: undefined method `resolve_substitutions’ for nil:NilClass

netstat show:
netstat -antpu|grep SYN_SENT
tcp 0 1 172.129.4.115:33418 2.16.30.83:443 SYN_SENT 1243/sidekiq 5.2.7

It all looks like that it doesn’t use our proxy, when I go to Content/Red Hat Repository I see No repository available after some time. And no logs in proxy server.

image

Refresh manifest doesn’t change anything.

In older version of Foreman, there you could pass proxy config during installation, but now it’s look this is not the proper way .

--katello-proxy-url=http://xxx.xxx.xxx.xxx --katello-proxy-port=xxxx

How can I configure Foreman that it will go true proxy for RH repos?

Thanks

I I found out, that I have to create http proxy as default with hammer. :grinning: There is a lack of information in Foreman documentation.

1 Like

Thanks @jost
I’m so glad you solved your problem.
Which docs did you use?
The sections around here have help for HTTP Proxies. Were these misleading? Content Management Guide
It would be good to fix this, as needed, so that no one else encounters the same issues as you.

I just use satellite 6.8 documentation

satellite 6.8

It would be good, if you could make link in katello documentation:

katello 3.18 http_proxy

that would guide you to this documentation:
Content Management Guide

And If you could also add this chapter in katello/foreman documentation:
4.5.2. Configuring the HTTP Proxy to Connect to Red Hat CDN

1 Like