Hello,
Do you have http proxy set on system ? If yes then it should be set as per below docs,
https://theforeman.org/plugins/katello/nightly/advanced/http_proxies.html
If system is not intended to use proxy and still its set then try unsetting it. Below is sort of similar thread,